Extrapolation using Taylor series - giving negative results for increasing positive inputs

570 Views Asked by At

I would like to use a 2nd order Taylor series expansion to perform an extrapolation to predict points outside of a known range. I am using the following formulation:

\begin{equation*} d(N+ \Delta N) = d\bigr|_{@N} + \Delta N \frac{\partial d}{\partial N}\Bigr|_{@N} + \frac{(\Delta N)^2}{2} \frac{\partial^2 d}{\partial N^2}\Bigr|_{@N} \end{equation*}

where, d is an increasing function ($d_N > d_{N-1} > d_{N-2}$) and the differentials are discretized as follows:

\begin{align*} \frac{\partial d}{\partial N}\Bigr|_N &= d_N - d_{N-1}\\\\ \frac{\partial^2 d}{\partial N^2}\Bigr|_N &= \frac{\partial d}{\partial N}\Bigr|_N - \frac{\partial d}{\partial N}\Bigr|_{N-1} \\ \\ &= (d_N - d_{N-1}) - (d_{N-1} - d_{N-2}) \\ &= d_N - 2 d_{N-1} + d_{N-2} \end{align*}
Hence the extrapolation equation is reduced to: \begin{equation*} d_{N+\Delta N} = d_N + \Delta N (d_N - d_{N-1}) + \frac{(\Delta N)^2}{2}(d_N - 2 d_{N-1} + d_{N-2}) \end{equation*}

My question is, for all positive and increasing values of d, is it possible that the extrapolated value $d_{N+\Delta N}$ could be less than $d_N$ or even worse, negative?

Consider the following example where, \begin{align*} d_{N-2} &= 0.3737 &\\ d_{N-1} &= 0.5185 &\\ d_N &= 0.6153 & \\ \Delta N &= 10 \end{align*}

It can be seen that the slope from $d_{N-2}$ to $d_{N-1}$ and $d_{N-1}$ to $d_{N}$ are both positive. But after extrapolation using the above equation, I get a value $ {d_{N+ \Delta N} = -0.8167}$.

I understand that $d_{N-1}$ is closer to $d_{N}$ than $d_{N-2}$. But still, since the inputs are all increasing and positive, why is the Taylor expansion giving a negative value? I am failing to find an explanation to this. If not for a fix or a correction, it would be really helpful if someone could atleast comment on this and help me understand why this is happening. Please feel free to correct me if I am wrong. Many thanks! Cheers!

P.S. I cannot use higher order terms in the approximation since the extrapolation is part of a bigger implementation and using higher order terms would complicate things a lot.

Edit 1

In my problem, d is a strictly non decreasing function in [0,1]. A negative value for $d$ doesnt make physical sense.

I am looking for an extrapolation scheme using 3 past values ($d_N, d_{N-1}, d_{N-2}$) (hence with quadratic terms). What would be one of the better schemes that I can use to give me positive extrapolated values with larger $\Delta N$'s?

Using a first order Taylor expansion gave higher error in the predicted value. And using higher order terms than 2nd order would be difficult with the already existing solution methodology that I have. Any suggestion would be helpful. Thanks a lot..

1

There are 1 best solutions below

3
On BEST ANSWER

Note that $d_N - 2d_{N-1} + d_{N-2}$ is negative, so your approximation is a quadratic function with a $\cap$-shape. As with any Taylor approximation, the approximation is good near the reference point (i.e. $\Delta N$ near zero) and worsens as you get farther away. Note that in this particular case (where you know your function is increasing), a quadratic is particularly bad because no quadratic is globally increasing. (It may be a good local approximation though.)

You can check that when $\Delta N$ is small, you see an increase due to the positive slope. But when $\Delta N$ is large, the quadratic tends to negative infinity, so you will always see smaller values.