Beruflich Dokumente
Kultur Dokumente
1. Use forward and backward difference approximations of O(h2 ) to estimate the first derivative of the function
f ( x) 25 x ^3 6 x ^ 2 7 x 88
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.
1
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2. 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 expansion
2
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Solve the following initial-value theorem problem analytically over the interval from x = 0 to 2: dy/dx = (yx2 1.2y)
3
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
4
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Differential Equations
Differential equations play a fundamental role in engineering. Many physical phenomena are best formulated in terms of their rate of change:
dv c g v dt m
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 derivative Second order equation includes second derivative Higher order equations can be reduced to a system of first order equations, by redefining the variables.
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Swinging pendulum
d 2 g sin 0 2 dt l
A second-order nonlinear ODE. Falling parachutist problem
6
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
This chapter is devoted to solving ordinary differential equations (ODEs) of the form
dy f ( x, y ) dx
New value old value slope * (step_size) yi 1 yi * h
Eulers Method
First derivative provides a direct estimate of the slope at xi:
f ( x i , yi )
then, y i 1 y i f ( x i , y i ) h
7
Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Error
Local
From x=0 to x=4 with step size h=0.5 initial condition: (x=0 ; y=1) Exact Solution: y = -0.5x4 + 4x3 - 10x2 + 8.5x + 1
Numerical Solution:
0 0.5 1.0
1 5.250 5.875
% 63.1 95.8
% 63.1 28
yi 1 yi f ( xi , yi )h
1.5
2.0
5.125
4.500
2.218
2.000
131.0
125.0
1.41
20.5