Tayor series with truncation error

  • Thread starter Thread starter roldy
  • Start date Start date
  • Tags Tags
    Error Series
Click For Summary

Homework Help Overview

The problem involves using a Taylor series to approximate the solution of the differential equation dy/dx = x + y, given an initial condition y(0) = 1 and a step size of Δx = 0.1. The goal is to determine y(0.1) to fourth order accuracy.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the application of the Taylor series expansion and the need to calculate higher-order derivatives of the function. There is a focus on whether the calculations for a single step require derivatives beyond the first.

Discussion Status

Some participants express uncertainty about the correctness of their calculations and whether they have missed any steps. Others are questioning the necessity of higher-order derivatives in the context of a single step calculation.

Contextual Notes

There is mention of a truncation error term ε = O(Δx^5), which may influence the accuracy of the approximation. Participants are also reflecting on their prior experiences with Taylor series in relation to differential equations.

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.
 

Similar threads

Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
9
Views
7K
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