- By
**chas** - Follow User

- 106 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' Taylor series method' - chas

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

outline

- What is Taylor seriesmethod
- Main Topic 1
- Main Topic 2
- Future work

Problem 1

Result 1

How to solve problem 1

Summary 1

Problem 2

Result 2

How to solve problem 2

Summary 2

WhatisTaylorseries?

The Taylor series of a real or complex-valued functionƒ(x) that is infinitely differentiable at a real or complex number ais the power series which can be written in the more compact sigma notation as

When a = 0, the series is also called a Maclaurin series

WhatisTaylorseries?

Taylor seriesis a representation of a function as an infinite sum of terms that are calculated from the values of the function's derivative at a single point.

Example

WhatisTaylorseries method?

Euler’s method

Tangent line local approximation

Taylor series

Higher degree better approximation

Graph of e^x

Taylortool in matlab

Taylor polynomial of degree 1 (Euler’s M)

Taylor polynomial of degree 2

Problem 1

Compute the Taylor polynomials of degree 4 for the solutions to the given initial value problems. Use these Taylor polynomials to approximate the solution at x = 1.

Subproblem1(Numerical)

Subproblem 1 (Analytical)

Integrating factor

Subproblem 2 (numerical)

Subproblem 2(Analytic)

How can we decrease the error?

Problem (1)

: Increase the degree of Taylor polynomial

Error : 0.247498 Error : 0.000298

How can we decrease the error?

Problem (2)

Euler’s method can decrease the error

When mesh size = 0.1,

y(1) = 2.094317

errer = 0.050841

x=0;

y=4;

for i=1:100

yp=y*(2-y);

y1=y+0.1*yp;

y=y1;

x=x+0.01;

end

Solve D.E in matlab

syms x y

f=dsolve('Dy=x-2*y', 'y(0)=1', 'x')

p=taylor(f,5,x)

f = x/2 + 5/(4*exp(2*x)) - ¼

p = (5*x^4)/6 - (5*x^3)/3 + (5*x^2)/2 - 2*x + 1

Summary 1

Taylor series method can find approximation

But it need higher degree

and some points in some function can not

enable to get approximation

Problem 2

Compare the use of Euler’s method with that of Taylor series to approximate the solution (x) to the initial value problem

Do this by completing the following table:

Problem 2 ( Euler’s method)

x=0;

y=0;

for i=1:10 for i=1:100

slope=-y+cos(x)-sin(x);

y1=y+0.1*slope; y1=y+0.3*slope;

y=y1;

x=x+0.1; x=x+0.3;

end

Graph(degree 2)

y=cos(x)-exp(-x)

y=cos(x)-exp(-x)

Taylor polynomial of degree 2 with step size 0.1

Taylor polynomial of degree 2 with step size 1

Problem 2 ( Taylor’s method)

Degree: 2

Degree: 5

x=0;

y=0;

step=0.1;

for i=1:10

slope=-y+cos(x)-sin(x);

slope2=-2*cos(x)+y;

slope3=cos(x)+sin(x)-y;

slope4=y;

slope5=-y+cos(x)-sin(x);

y1=y+step*slope

+(step)^2/2*slope2

+(step)^3/(3*2*1)*slope3

+(step)^4/(4*3*2*2)*slope4

+(step)^5/(5*4*3*2*1)*slope5;

y=y1;

x=x+step;

end

x=0;

y=0;

step=0.1;

for i=1:10

slope=-y+cos(x)-sin(x);

slope2=-2*cos(x)+y;

y1=y+step*slope+

(step)^2/2*slope2;

y=y1;

x=x+step;

end

Problem 2 ( Analytical)

Integrating factor

Summary 2

Good approximation

In same method

- Step size : small

In same step size

- Taylor Method is better than Euler’s Method

- Taylor polynomial of higher degree is better

than Taylor polynomial of lower degree

But Taylor polynomial of higher degree

needs many calculation

Think more….

How can we get approximation

fast and accurate

with simple code(calculation)?

Runge-Kutta

Download Presentation

Connecting to Server..