Docsity

Notes on Ordinary Differential Equations - Computational Methods | CMSC 460, Study notes of Computer Science

Partial preview of the text

Download Notes on Ordinary Differential Equations - Computational Methods | CMSC 460 and more Study notes Computer Science in PDF only on Docsity!

Computational Methods CMSC/AMSC/MAPL 460

Ordinary differential equations

Ramani Duraiswami,

Dept. of Computer Science

ODE: Previous class

-^

Standard form

-^

Examples of converting equations to standard form– Volterra equation

-^

Euler Method (an explicit method)

-^

Backward Euler Method (an implicit/nonlinear method)

-^

A predictor corrector method

Today

-^

Theoretical analysis of ODE solvers– Accuracy– Stability– Stiffness

Nonlinearity

-^

In general the quantity on the right hand side,

f

, in the

standard form can be a nonlinear function of

t

and

y.

-^

Nonlinearity implies multiple solutions and “chaos”

-^

Also has a bearing on how well a numerical solver canintegrate the ODE

Linearized differential equations

Jacobian properties

•^

Interesting equation

-^

In one dimension it can be integrated to obtain the local solution

y=C exp(J t)

•^

Express solution similarly for a system.

-^

Use the eigendecomposition of the Jacobian matrix

J=V
V
  • -^

V^

matrix with columns as eigenvectors

Λ

eigenvalues arranged as a diagonal matrix

•^

Why? It removes the coupling of terms in the right hand side bydiagonalizing the matrix

-^

y’=Jy.

So

V

-1^ y’=V

-1^ JVV

-1^ y

•^

Let

V x

y

so

x=V

-1 y

•^

transforms the local system of equations to

-^

dx

/dtk

λk

x k^

x^ k

( t

e

λk

(t-t

)^ c x (

tc

dy

Jy

dt

Eigenvalues of examples considered

Another example from the book •^

one eigenvalue is real and positive,so that component is growing.

-^

One eigenvalue is real and negative,corresponding to a decaying component.

-^

Two eigenvalues are purely imaginary,corresponding to oscillatory components.

Jacobian and ode behavior

-^

J^

f/

∂

y

-^

Then a

single

ODE is

–^

stable

at a point (

t c

, y

)c if

J

( t

, y c

) c

–^

unstable

at a point (

t, y c

)c^

if

J

( t

, y c

)c

–^

stiff

at a point (

tc

, y

) c if

J

( t

c^

, y

)c

-^

A

system

of ODEs is

–^

stable

at a point (

t c

, y

) c if the

real part

of all the

eigenvalues

of the matrix

J

( t

, y c

) c are negative (converse if some are

positive)

-^

stiff

at a point (

t c

, y

) c if the

real parts

of more than one

eigenvalue of

J

( t

, y c

) c are negative and wildly different.

Solution using regular and stiff-solver

-^

choose

=0.01 and 0.

-^

Solve with RK

-^

Observe

-^

Solve with ode23s

-^

Observe

Error control

-^

Get estimate of the error at current step– change step size– change the order

-^

then use the difference in results to get an estimate of theerror

-^

Suppose error estimate is much too large:^ – reduce the stepsize (usually by a factor of 2) and try again.

-^

Suppose error estimate is much smaller than needed:^ – Then we can increase the stepsize (usually doubling it) and save

ourselves some work when we take the

next

step.