Tayor series with truncation error

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 and a step size of \Deltax=0.1. The solution involves calculating the first derivative of the function at x0 and using it in the Taylor series formula, taking into account the second, third, and fourth derivatives as well. The person asking for help is unsure if they have completed the calculations correctly and is seeking clarification on whether or not they needed to take derivatives in their solution.
  • #1
roldy
237
2

Homework Statement


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.

Homework Equations


[itex]\epsilon[/itex]=O([itex]\Delta[/itex]x5)
Do the calculations for only one step.


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))+[itex]\epsilon[/itex]


My solution:

f(x0,y(0))=f(0,1)=0+1=1

y(0+0.1)=1+0.1(1)+.00001=1.10001

Does this seem correct. It feels like I missed something. On the other hand it makes sense. Did I miss something or mess up a step?
 
Physics news on Phys.org
  • #2
roldy said:

Homework Statement


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.

Homework Equations


[itex]\epsilon[/itex]=O([itex]\Delta[/itex]x5)
Do the calculations for only one step.


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))+[itex]\epsilon[/itex]


My solution:

f(x0,y(0))=f(0,1)=0+1=1

y(0+0.1)=1+0.1(1)+.00001=1.10001

Does this seem correct. It feels like I missed something. On the other hand it makes sense. Did I miss something or mess up a step?

To 4th order in h (= Delta x), y(x0 + h) = y(x0) + sum{D^k y(x0) * h^k/k!: k=1..4}, where D^k y(x0) = (d/dx)^k y(x)|_{x = x0} = kth derivative of y(x) at x0. Can you figure out (d/dx)^2 y, (d/dx)^3 y, etc?

RGV
 
  • #3
I thought that doing calculations for one step meant that I didn't need to take any derivatives. For example, a calculation using 3 steps would mean the Taylor series would have the original function, 1st and 2nd derivatives. Wouldn't I just get zeros beyond the first derivative of x+y anyways?
 
  • #4
Can anyone provide some insight on this. This is review and I don't ever remember doing a Taylor series on a differential equation.
 

What is a Taylor series with truncation error?

A Taylor series with truncation error is a mathematical formula used to approximate a function using a finite number of terms. The truncation error refers to the difference between the actual value of the function and the approximation obtained from the Taylor series.

How is a Taylor series with truncation error calculated?

A Taylor series with truncation error is calculated by taking the derivatives of a function at a specific point and using those derivatives to construct a polynomial approximation of the function. The more terms included in the series, the more accurate the approximation will be.

What is the significance of the truncation error in a Taylor series?

The truncation error in a Taylor series is important because it quantifies the accuracy of the approximation. It tells us how much the approximation differs from the actual value of the function, and helps us determine how many terms are needed to achieve a desired level of accuracy.

What is the relationship between the number of terms in a Taylor series and the truncation error?

The number of terms in a Taylor series is directly related to the truncation error. The more terms that are included, the smaller the truncation error will be. However, including more terms also means more calculations and a more complex approximation.

How is a Taylor series with truncation error used in practical applications?

A Taylor series with truncation error is used in various fields of science and engineering to approximate functions and make predictions. It is especially useful in situations where the exact solution is difficult or impossible to obtain, and helps us to understand the behavior of complex systems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
534
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
752
  • Calculus and Beyond Homework Help
Replies
6
Views
746
  • Advanced Physics Homework Help
Replies
2
Views
819
  • Calculus and Beyond Homework Help
Replies
3
Views
263
  • Calculus and Beyond Homework Help
Replies
2
Views
702
  • Calculus and Beyond Homework Help
Replies
3
Views
245
  • Calculus and Beyond Homework Help
Replies
9
Views
5K
  • Programming and Computer Science
Replies
6
Views
1K
Back
Top