Tayor series with truncation error

  • Thread starter Thread starter roldy
  • Start date Start date
  • Tags Tags
    Error Series
Click For Summary
The discussion focuses on using the Taylor series to approximate the solution of the differential equation dy/dx = x + y with the initial condition y(0) = 1 and a step size of Δx = 0.1. The user calculates y(0.1) as 1.10001 but questions whether they have missed any steps in the process. They are reminded that to achieve 4th order accuracy, higher derivatives of the function need to be considered. The conversation highlights confusion regarding the necessity of calculating derivatives beyond the first order for a single step approximation. Overall, the importance of including higher-order derivatives in the Taylor series expansion for accurate results is emphasized.
roldy
Messages
206
Reaction score
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+\Deltax) to 4th order accuracy.

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

Show 5 significant digits in the answer.

Homework Equations


\epsilon=O(\Deltax5)
Do the calculations for only one step.


The Attempt at a Solution


dy/dx=f(x,y)

Taylor series:
y(x0+\Deltax)=y(x0)+\Deltaxf(x0,y(x0))+\epsilon


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
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+\Deltax) to 4th order accuracy.

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

Show 5 significant digits in the answer.

Homework Equations


\epsilon=O(\Deltax5)
Do the calculations for only one step.


The Attempt at a Solution


dy/dx=f(x,y)

Taylor series:
y(x0+\Deltax)=y(x0)+\Deltaxf(x0,y(x0))+\epsilon


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
 
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?
 
Can anyone provide some insight on this. This is review and I don't ever remember doing a Taylor series on a differential equation.
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
9
Views
6K
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K