Numerical Analysis Home

Higher-order Taylor's Method

    


Recall that the Euler's method was derived by approximating \(y(t)\) by its Taylor polynomial of degree \(1\) about \(t=t_i\). Similarly we can approximate \(y(t)\) by its Taylor polynomial of degree \(k\) for any given integer \(k\geq 2\). By Taylor's theorem on \(y\) about \(t=t_i\), \[\begin{array}{rrl} &y(t) &= y(t_i)+(t-t_i)y'(t_i)+\frac{(t-t_i)^2}{2!}y''(t_i)+\cdots+\frac{(t-t_i)^k}{n!}y^{(k)}(t_i)+\frac{(t-t_i)^{(k+1)}}{(k+1)!}y^{(k+1)}(\xi_i)\\ \implies &y(t_{i+1}) &= y(t_i)+hy'(t_i)+\frac{h^2}{2!}y''(t_i)+\cdots+\frac{h^k}{k!}y^{(k)}(t_i)+\frac{h^{(k+1)}}{(k+1)!}y^{(k+1)}(\xi_i) \end{array}\] Since \(y'=f(t,y)\), \(y''=f'(t,y),\ldots,y^{(k)}=f^{(k-1)}(t,y)\). Thus \[\begin{array}{rrl} & y(t_{i+1}) &= y(t_i)+hf(t_i,y(t_i))+\frac{h^2}{2!}f'(t_i,y(t_i))+\cdots+\frac{h^k}{k!}f^{(k-1)}(t_i,y(t_i))+\frac{h^{(k+1)}}{(k+1)!}f^{(k)}(\xi_i,y(\xi_i))\\ & &\approx y_i+h\Big[ f(t_i,y_i)+\displaystyle\frac{h}{2!}f'(t_i,y_i)+\cdots+\frac{h^{k-1}}{k!}f^{(k-1)}(t_i,y_i) \Big]+O(h^{k+1})\\ \implies & y(t_{i+1})& \approx y_i+h T_k(t_i,y_i)=:y_{i+1}, \end{array}\] where \(T_k(t_i,y_i)=f(t_i,y_i)+\displaystyle\frac{h}{2!}f'(t_i,y_i)+\cdots+\frac{h^{k-1}}{k!}f^{(k-1)}(t_i,y_i)\).
Thus the Taylor's Method of order \(k\) finds \(y_0,y_1,\ldots,y_n\) such that \(y_i\approx y(t_i),\,i=0,1,\ldots,n\): \[\boxed{ \begin{aligned} y_0 &=c\\ y_{i+1} &=y_i+hT_k(t_i,y_i),\, i=0,1,\ldots,n-1. \end{aligned}}\]


Example. Use Taylor's method of order 2 with step size \(h=0.5\) to approximate the solution of the following IVP: \[\frac{dy}{dt}=t^2-y,\, 0\leq t\leq 2,\, y(0)=1\] Solution. We have \(h=0.5,\, t_0=0,\, y_0=1\) and \(y'=f(t,y)=t^2-y\).Then \(f'(t,y)=2t-y'=2t-(t^2-y)=-t^2+2t+y\). So by the Taylor's method of order 2, \[\begin{align*} y_{i+1}& =y_i+hf(t_i,y_i)+\displaystyle\frac{h^2}{2!}f'(t_i,y_i)\\ y_{i+1}& =y_i+0.5(t_i^2-y_i)+\displaystyle\frac{(0.5)^2}{2}(-t_i^2+2t_i+y_i)=\frac{3t_i^2+2t_i+5y_i}{8} \end{align*}\] \[\begin{align*} t_1&=0+1\cdot 0.5=0.5, &&y_1=(3t_0^2+2t_0+5y_0)/8=0.625\\ t_2&=0+2\cdot 0.5=1, &&y_2=(3t_1^2+2t_1+5y_1)/8=0.6093 \; \text{etc.} \end{align*}\] \[\begin{array}{|c|l|l|} \hline i & t_i & y_i\\ \hline 0&0 &1\\ \hline 1&0.5 &0.625 \\ \hline 2&1 &0.6093\\ \hline 3&1.5 &1.0058\\ \hline 4&2 &1.8474\\ \hline \end{array}\] Using the solution \(y=(t^2-2t+2)-e^{-t}\), we get the actual absolute error for \(y(1)\): \[|y(1)-y_2|=|(1-e^{-1})-0.6093|=0.02.\] So the Taylor's method of order 2 is better than the Taylor's method of order 1, i.e., the Euler's method.


Example. Using Taylor's method of order 3 with step size \(h=0.5\), set up an iteration formula for \(\{y_i\}\) to approximate the solution of the following IVP: \[\frac{dy}{dt}=t^2-y,\, 0\leq t\leq 2,\, y(0)=1\] Solution. We have \(h=0.5,\, t_0=0,\, y_0=1\) and \(y'=f(t,y)=t^2-y\). Then \[\begin{align*} f'(t,y) &=2t-y'=2t-(t^2-y)=-t^2+2t+y\\ f''(t,y) &=-2t+2+y'=-2t+2+(t^2-y)=t^2-2t+2-y \end{align*}\] So by the Taylor's method of order 3, we have \[\begin{align*} y_{i+1}& =y_i+hf(t_i,y_i)+\displaystyle\frac{h^2}{2!}f'(t_i,y_i)+\frac{h^3}{3!}f''(t_i,y_i)\\ y_{i+1}& =y_i+0.5(t_i^2-y_i)+\displaystyle\frac{(0.5)^2}{2}(-t_i^2+2t_i+y_i)+\frac{(0.5)^3}{6}(t_i^2-2t_i+2-y_i)\\ y_{i+1}& =\frac{19t_i^2+10t_i+2+29y_i}{48},\; y_0=1.\; (t_i=0+0.5i) \end{align*}\]


Last edited