1 / 92

# Solutions to ODEs - PowerPoint PPT Presentation

Solutions to ODEs. A general form for a first order ODE is Or alternatively. A general form for a first order ODE is Or alternatively We desire a solution y(x) which satisfies (1) and one specified boundary condition. .

Related searches for Solutions to ODEs

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Solutions to ODEs' - cyma

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

### Solutions to ODEs

• We denote the approximation at the base pts by so that variable x for the interval [a,b] into subintervals or steps.

• The true derivation dy/dx at the base points is approximated by or just

• where

• Assuming no roundoff error the difference in the calculated and true value is the truncation error,

• Numerical algorithms for solving 1 the numerical methods.st order odes for an initial condition are based on one of two approaches:

• Direct or indirect use of the Taylor series expansion for the solution function

• Use of open or closed integration formulas.

• The various procedures are classified into: the numerical methods.

• One-step: calculation of given the differential equation and

• Multi-step: in addition the previous information they require values of x and y outside of the interval under consideration

### Taylor Expansion the numerical methods.

• where starting point using a Taylor expansion.

• Where starting point using a Taylor expansion.

• And

• etc.

• Consider the example, where starting point using a Taylor expansion.

• And initial condition

• Differentiating and then applying initial conditions,

• Consider the example, where starting point using a Taylor expansion.

• And initial condition

• Differentiating and then applying initial conditions,

• Consider the example, where starting point using a Taylor expansion.

• And initial condition

• Differentiating and then applying initial conditions,

• Consider the example, where starting point using a Taylor expansion.

• And initial condition

• Differentiating and then applying initial conditions,

• Continuing, starting point using a Taylor expansion.

. .

. .

Here the third derivative and higher are zero.

• Integrating, starting point using a Taylor expansion.

• Simplifying,

Homework (Due Thursday) there is no truncation error.

• Consider the function

• Initial condition

• Write the Taylor expansion and show that it can be written in the form,

• Show if terms up to are retained, the error is,

### Eulerâ€™s Method that is known, therefore must be replaced by .

y inaccuracy in the formula.

y1

y(x)

y(x0)

y(x1

h

x0

x1

x

• The geometric interpretation is shown the diagram.

y inaccuracy in the formula.

y1

y(x)

y(x0)

y(x1

h

x0

x1

x

• The solution across the interval[x0,x1] is assumed to follow the line tangent to y(x) at x0.

From the graph, as h -> 0, the approximation becomes better because the curve in the region becomes approx. linear.

y

y1

y(x)

y(x0)

y(x1

h

x0

x1

x

### Modified Euler method.

• However it is not possible to implement this directly. region.

• Instead we first â€śpredictâ€ť a value for using the simple Euler method.

• Then use this value to determine the gradient of the slope at . This gives a â€ścorrectedâ€ť value for .

• However since the predicted value is not usually accurate, is also inaccurate.

Corrector curve using region.

values of predictor

Predictor curve using

the Simple Euler

True value

### Runge-Kutta Methods region.

• The solution of a differential equation using higher order derivatives of the Taylor expansion is not practical.

• Since for only the simplest functions, these higher orders are complicated. Also there is no simple algorithm which can be developed.

• This is because each series expansion is unique.

• However we have methods which use only 1 derivatives of the Taylor expansion is not practical.st order derivates while simulating higher order(producing equivalent results).

• These one step methods are called Runge-Kutta methods.

• However we have methods which use only 1 derivatives of the Taylor expansion is not practical.st order derivates while simulating higher order(producing equivalent results).

• These one step methods are called Runge-Kutta methods.

• Approximation of the second, third and fourth order (retaining h2, h3, h4 respectively in the Taylor expansion) require estimation at 2, 3 , 4 pts respectively in the interval (xi,xi+1).

• The Runge-Kutta methods have algorithms of the form, at more than m nearby points.

• where is the increment function.

• The increment function is a suitably chosen approximation to on the interval .

• Because of the amount of algebra involved, on the simplest case(2nd order) will be derived in detail.

### Derivation of the 2 at more than m nearby points.nd order Runge-Kutta

• Recall: variables and dropping terms higher than h,

• Substituting for ,

• Recall: variables and dropping terms higher than h,

• Substituting for ,

• Assuming that we compare coefficients. So that, variables and dropping terms higher than h,

• Therefore,

• However we have four unknowns and only three equations.

• We have the variable b which can be chosen arbitrarily.

• Two common choices are and

• For . and we get, variables and dropping terms higher than h,

• which can be written as,

• where

• This improved Euler method or Heunâ€™s Method.

• For . and we get, variables and dropping terms higher than h,

• where

• This improved polygon method or the modified Eulerâ€™s Method.

Higher Orders variables and dropping terms higher than h,