CHAP 25 (Runge Kutta Method)

8
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. ACTIVITY: Numerical Differentiation 1 1. Use forward and backward difference approximations of O(h 2 ) to estimate the first derivative of the function Evaluate the derivative at x = 2 using step size of h = 0.25. Compare your results with the true value of the derivative. Interpret your results on the basis of the remainder term of the Taylor Series expansion. 88 7 2 ^ 6 3 ^ 25 ) ( x x x x f

description

fhkjkhgb jgjg hjgu

Transcript of CHAP 25 (Runge Kutta Method)

Mathematical Modeling and Engineering Problem solving

ACTIVITY: Numerical Differentiation11. Use forward and backward difference approximations of O(h2 ) to estimate the first derivative of the function

Evaluate the derivative at x = 2 using step size of h = 0.25. Compare your results with the true value of the derivative. Interpret your results on the basis of the remainder term of the Taylor Series expansion.

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.ACTIVITY: Numerical Differentiation22. Use a centered difference approximation of O(h2) to estimate the second derivative of the function examined in Problem 1. Perform the evaluation at x = 2 using step sizes of h= 0.2 and 0.1. Compare your estimates with the true value of the second derivative. Interpret your results on the basis of the remainder term of the Taylor series expansionCopyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Activity 3 (Solution to Differential equation)3Solve the following initial-value theorem problem analytically over the interval from x = 0 to 2:dy/dx = (yx2 1.2y)

where y(0) = 1. Use Eulers method with h = 0.5 and 0.25xYtrueyeulerGlobalCopyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.4

Numerical SolutionofOrdinary Differential Equations

Chapter 25Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Differential equations play a fundamental role in engineering. Many physical phenomena are best formulated in terms of their rate of change:

Equations which are composed of an unknown function and its derivatives are called differential equations.

One independent variable ordinary differential equation (or ODE) Two or more independent variables partial diff. equation (or PDE)

A first order equation includes a first derivative as its highest derivativeSecond order equation includes second derivative

Higher order equations can be reduced to a system of first order equations, by redefining the variables.

v- dependent variablet- independent variableDifferential EquationsCopyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.ODEs and Engineering Practice

6

Falling parachutist problemSwinging pendulumA second-order nonlinear ODE.

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Solving Ordinary Differential Equations (ODEs)This chapter is devoted to solving ordinary differential equations (ODEs) of the form

7

Eulers MethodFirst derivative provides a direct estimate of the slope at xi:

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Example: Eulers MethodSolve numerically :

From x=0 to x=4 with step size h=0.5initial condition: (x=0 ; y=1)

Exact Solution: y = -0.5x4 + 4x3 - 10x2 + 8.5x + 1Numerical Solution:

y(0.5) = y(0)+f(0, 1)0.5 = 1+8.5*0.5 = 5.25(true solution at x=0.5 is y(0.5) = 3.22 and et = 63%)

y(1) = y(0.5)+f(0.5, 5.25)0.5 = 5.25+[-2(0.5)3+12(0.5)2-20(0.5)+8.5]*0.5 = 5.25+0.625 = 5.875(true solution at x=1 is y(1) = 3 and et = 96%)y(1.5) = y(1)+f(1, 5.875)0.5 = 5.125.

8

XyeulerytrueErrorGlobalErrorLocal011%%0.55.2503.21863.163.11.05.8753.00095.8281.55.1252.218131.01.412.04.5002.000125.020.5Percent Relative ERRORCopyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.