Using Taylor Series for Initial Value Problems

roldy
Messages
206
Reaction score
2

Homework Statement


I posted this already but decided to revive this thread since I re-worked the problem.

Consider dy/dx=x+y, a function of both x and y subject to initial condition, y(x0)=y0.
Use Taylor series to determine y(x0+\Deltax) to 4th order accuracy.

Initial condition: x0=0, y(x0)=1
step size: \Deltax=0.1

Show 5 significant digits in the answer.
Do the calculations for only one step.

Homework Equations


\epsilon=O(\Deltax5)

The Attempt at a Solution


dy/dx=f(x,y)

Taylor series:
y(x0+\Deltax)=y(x0)+\Deltaxf'(x0,y(x0))+
\Delta[/itex]x21/2!f''(x0,y(x0))+\Deltax31/3!f'''(x0,y(x0))+\Deltax41/4!f''''(x0,y(x0))+\epsilon+<br /> <br /> Is this correct?<br /> <br /> My solution:<br /> <br /> The derivatives:<br /> f&#039;(x,y)=dy/dx=y+x=1+0=1<br /> f&#039;&#039;(x,y)=d<sup>2</sup>y/dx<sup>2</sup>=dy/dx+1=1+1=2<br /> f&#039;&#039;&#039;(x,y)=d<sup>3</sup>y/dx<sup>3</sup>=dy<sup>2</sup>/dx<sup>2</sup>=2<br /> f&#039;&#039;&#039;&#039;(x,y)=d<sup>4</sup>y/dx<sup>4</sup>=d<sup>3</sup>y/dx<sup>3</sup>=2<br /> <br /> y(0+.1)=1+(.1)(1)+1/2!(.1)<sup>2</sup>(2)+1/3!(.1)<sup>3</sup>(2)+1/4!(.1)<sup>4</sup>(2)+(.1)<sup>5</sup><br /> <br /> y(.1)=1+.1+.01+.001/3+.0001/12+.00001=1.11035<br /> <br /> Did I solve this correctly? I want to be able to have something decent when I meet with the professor tomorrow.
 
Physics news on Phys.org
Everything looks right. I am not willing to double check all your arithmetic.
 
That's fine. I just wanted to know if I was on the right track. Thanks for taking a look.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top