Using Taylor Series for Initial Value Problems

In summary, the conversation discusses using Taylor series to determine y(x0+\Deltax) to 4th order accuracy for the function dy/dx=x+y, with an initial condition of y(x0)=y0. The solution involves finding the derivatives and plugging them into the Taylor series formula, resulting in an answer of y(.1)=1.11035. The individual asking for help is seeking confirmation on whether their solution is correct.
  • #1
roldy
237
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+[itex]\Delta[/itex]x) to 4th order accuracy.

Initial condition: x0=0, y(x0)=1
step size: [itex]\Delta[/itex]x=0.1

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

Homework Equations


[itex]\epsilon[/itex]=O([itex]\Delta[/itex]x5)

The Attempt at a Solution


dy/dx=f(x,y)

Taylor series:
y(x0+[itex]\Delta[/itex]x)=y(x0)+[itex]\Delta[/itex]xf'(x0,y(x0))+
\Delta[/itex]x21/2!f''(x0,y(x0))+[itex]\Delta[/itex]x31/3!f'''(x0,y(x0))+[itex]\Delta[/itex]x41/4!f''''(x0,y(x0))+[itex]\epsilon[/itex]+[itex]

Is this correct?

My solution:

The derivatives:
f'(x,y)=dy/dx=y+x=1+0=1
f''(x,y)=d2y/dx2=dy/dx+1=1+1=2
f'''(x,y)=d3y/dx3=dy2/dx2=2
f''''(x,y)=d4y/dx4=d3y/dx3=2

y(0+.1)=1+(.1)(1)+1/2!(.1)2(2)+1/3!(.1)3(2)+1/4!(.1)4(2)+(.1)5

y(.1)=1+.1+.01+.001/3+.0001/12+.00001=1.11035

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
  • #2
Everything looks right. I am not willing to double check all your arithmetic.
 
  • #3
That's fine. I just wanted to know if I was on the right track. Thanks for taking a look.
 

FAQ: Using Taylor Series for Initial Value Problems

What is a Taylor series?

A Taylor series is a mathematical representation of a function as an infinite sum of terms. It is used to approximate a function near a specific point by adding up the values of the function's derivatives at that point.

How do you find the Taylor series of a function?

To find the Taylor series of a function, you need to take the derivatives of the function at a specific point, evaluate them at that point, and then plug them into the Taylor series formula. The formula is: f(x) = f(a) + f'(a)(x-a) + (f''(a)/2!)(x-a)^2 + (f'''(a)/3!)(x-a)^3 + ...

What is the purpose of a Taylor series?

The purpose of a Taylor series is to approximate a function near a specific point. It allows us to represent a function using a simpler form, making it easier to calculate or analyze. It is also useful for finding solutions to differential equations and for numerical analysis.

How do you check if a Taylor series is correct?

To check if a Taylor series is correct, you can compare it to the original function and see if the values match up. You can also use mathematical tests, such as the ratio test or the remainder test, to determine the accuracy of the series.

Can a Taylor series accurately represent any function?

No, a Taylor series can only accurately represent functions that are infinitely differentiable. Functions with discontinuities, poles, or singularities cannot be represented by a Taylor series. Also, the accuracy of the series depends on the point chosen for the approximation and the number of terms used in the series.

Back
Top