I was playing around with stuff and I realized I'm incredibly bad and unaware of tools to construct real functions which satisfy things.

For example: I want to construct a function that is infinitely differentiable, bounded between 2 continuous functions (on a closed interval or $R$) and I'd like to decide what the derivatives are for as many points as possible. Meaning I'd like to be able to say $f(1)=5,f'(1)=7,f''(3)=19,f(12)=19...$ for example. Even if I'm only giving a finite amount of those conditions (Derivatives at points), I'm not exactly sure how to do this. I was thinking to interpolate a polynomial $p(x)$ and then take a bunch of different modified $s(k,c,x) = e^{-(k(x-c)^2}$ (choose fixed c,k and you've got a function) which I smooth into 0 outside of a small neighborhood of $c$. Then in the case of an interval I can add a bunch of appropriate different $s(k,c,x)$ to the polynomial to condense it to be between the 2 continuous functions.

Even with all this, what I said doesn't exactly work (both smoothing $s$ so that it's infinitely differentiable and adding appropriate ones to condense the function), and it's incredibly inelegant.

What are some tools to create examples of functions (Which obviously exist!)? My question isn't specific because I'd like to know what I can do, for example a version of Tietze extension theorem would be great that extends my function to a not only continuous but infinitely differentiable one.


you can construct a polynomial that will go through any number of points and have a derivatives equal to what you need them to be a some other set of points. And the function will be bounded over any closed interval.

You build a "divided difference table." And I am not going to go into the full construction of it here, but this is the idea.

$\begin{matrix} x_0&f(x_0)\\x_1&f(x_1)&\frac{f(x_1) - f(x_0)}{x_1-x_0}\\ x_2&f(x_2)&\frac{f(x_2) - f(x_1)}{x_2-x_1}&\frac{\frac{f(x_2) - f(x_1)}{x_2-x_1}-\frac{f(x_1) - f(x_0)}{x_1-x_0}}{x_2-x_0} \end{matrix}$

For each new point, add a row. Each time you move to the right, you take the value to the left - the entry one up and to the left and divide by the differnce in the corresponding x values.

If you want your curve to go through (a,f(a)) and have a slope equal to f'(a). Put a, f(a) in your divided difference table twice, and put f'(a) as the divided difference.

$f(x) = f(x_2) + \frac{f(x_2) - f(x_1)}{x_2-x_1}(x-x_2) + \frac{\frac{f(x_2) - f(x_1)}{x_2-x_1}-\frac{f(x_1) - f(x_0)}{x_1-x_0}}{x_2-x_0}(x-x_2)(x-x_1)$

I hope I have that right.

  • $\begingroup$ Thanks for the answer Doug. This isn't as powerful as I want though (I know it's possible to interpolate a polynomial and the derivatives of $e^{-x^2}$ are 0 at 0 which is why I was using them to move my function around. Unless I misunderstood you, you're describing polynomial interpolation in your answer. $\endgroup$ – user157036 May 5 '16 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy