Lec12 - Solving Initial Value ODEs Elementary Techniques:...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Solving Initial Value ODEs Elementary Techniques: Euler, Heun’s, Midpoint, and Runge-Kutta methods
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 12 2 The problem (, ) dy fty dt = Solve this numerically (nonlinear -- can’t solve analytically) First, let’s review how we might solve this if we could solve it analytically
Background image of page 2
Lecture 12 3 An example that can be solved (, ) dy fty dt = 2 (, ) 3 t t = ++ if , then we can integrate the equation e.g. () ft = If , then maybe we can integrate to solve ODE 2 23 3 11 3 dy t t dt yt t t C =+ + + + ∫∫ Note integration constant 30 20 10 0 y 3 2 1 0 t C =1 C =4 C =7 (0) yC = different curves for different initial condition This is an initial value problem
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 12 4 Ordinary Differential Equations: Classification z To obtain a unique solution to a differential equation, we need to specify data at one point in time or space – initial data , or data at two points – boundary data . This divides the ODE field into two major classes: z Initial Value Problems , e.g. chemical kinetics z Boundary Value Problems , e.g. steady-state heat or mass transport
Background image of page 4
Lecture 12 5 Graphical solution y t 1 2 3 0.0 0.5 1.0 2 1 3 t dy ey dt =− Initial condition: y 0 = y (0)=1 Then we could try to step forward to an approximation to y 1 = y(t 1 ) = y(h), h = t 1 –t 0 , using the initial slope h Forward difference approximation
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 12 6 Forward Euler Method z More generally, this scheme is called the Forward Euler Method , or sometimes just the Euler Method z One derivation: Evaluate the ODE at time t n : Approximate the derivative by a first-order forward difference approximation: Solve for the future value of the function: Example of an “explicit method” – only need present and past values of y to predict future values
Background image of page 6
Lecture 12 7 Euler Method: Alternative Derivation z An alternative derivation of the Forward Euler Method is
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2011 for the course CHE 132b taught by Professor Ceweb during the Fall '09 term at UCSB.

Page1 / 21

Lec12 - Solving Initial Value ODEs Elementary Techniques:...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online