31
Differential Equations and Boundary Value Problems

Differential Equations and Boundary Value Problems

Embed Size (px)

Citation preview

Page 1: Differential Equations and Boundary Value Problems

Differential Equations and Boundary Value Problems

Page 2: Differential Equations and Boundary Value Problems

2

Ordinary Differential Equations

• To solve an RL circuit, we apply KVL around the loop and obtain a differential equation:

• Differential Equation has an independent variable i and the derivative of the independent variable.

i- dependent variable

t- independent variablei

L

R

L

v

dt

di

Page 3: Differential Equations and Boundary Value Problems

3

• ordinary differential equation (or ODE) has one independent variable.

• A partial differential equation (or PDE) involves two or more independent variables.

• Differential equations are also classified as to their order.– A first order equation includes a first derivative as its

highest derivative.– A second order equation includes a second derivative.

• Higher order equations can be reduced to a system of first order equations, by redefining a variable.

Ordinary vs. Partial Differential Equations

Page 4: Differential Equations and Boundary Value Problems

Engineering Problem Solution

Physical Laws (Faraday’s, Ohm’s, KVL) ->

Differential Equation ->

Numerical or Analytical Solution

Page 5: Differential Equations and Boundary Value Problems

Figure PT7_03.jpg

Page 6: Differential Equations and Boundary Value Problems

Figure PT7_04.jpg

Page 7: Differential Equations and Boundary Value Problems

7

Runga-Kutta Methods

• solving ordinary differential equations of the form

),( yxfdx

dy

Page 8: Differential Equations and Boundary Value Problems

8

• The first derivative

• provides a direct estimate of the slope at xi

where f(xi,yi) is the differential equation evaluated at xi and yi. This estimate can be substituted into the equation:

• A new value of y is predicted using the slope to extrapolate linearly over the step size h.

),( ii yxf

hyxfyy iiii ),(1

Euler’s Method

Page 9: Differential Equations and Boundary Value Problems

9

Page 10: Differential Equations and Boundary Value Problems

10

Figure 25.3

Page 11: Differential Equations and Boundary Value Problems

11

Figure 25.4

Page 12: Differential Equations and Boundary Value Problems

12

Heun’s Method/• One method to improve the estimate of the slope

involves the determination of two derivatives for the interval:– At the initial point– At the end point

• The two derivatives are then averaged to obtain an improved estimate of the slope for the entire interval.

hyxfyxf

yy

hyxfyy

iiiiii

iiii

2

),(),(:Corrector

),( :Predictor0

111

01

Page 13: Differential Equations and Boundary Value Problems

13

Page 14: Differential Equations and Boundary Value Problems

14

The Midpoint (or Improved Polygon) Method/• Uses Euler’s method t predict a value of y at the

midpoint of the interval:

hyxfyy iiii ),( 2/12/11

Page 15: Differential Equations and Boundary Value Problems

15

Figure 25.12

Page 16: Differential Equations and Boundary Value Problems

16

• Once n is chosen, values of a’s, p’s, and q’s are evaluated by setting general equation equal to terms in a Taylor series expansion.

),(

),(

)(

11112

1

22111

hkqyhpxfk

yxfk

hkakayy

ii

ii

ii

Page 17: Differential Equations and Boundary Value Problems

17

• Values of a1, a2, p1, and q11 are evaluated by setting the second order equation to Taylor series expansion to the second order term. Three equations to evaluate four unknowns constants are derived.

2

12

1

1

112

12

21

qa

pa

aa

A value is assumed for one of the unknowns to solve for the other three.

Page 18: Differential Equations and Boundary Value Problems

18

• Because we can choose an infinite number of values for a2, there are an infinite number of second-order RK methods.

• Every version would yield exactly the same results if the solution to ODE were quadratic, linear, or a constant.

• However, they yield different results if the solution is more complicated (typically the case).

• Three of the most commonly used methods are:

– Huen Method with a Single Corrector (a2=1/2)– The Midpoint Method (a2=1)– Raltson’s Method (a2=2/3)

Page 19: Differential Equations and Boundary Value Problems

19

Figure 25.14

Page 20: Differential Equations and Boundary Value Problems

20

Boundary-Value and Eigenvalue Problems

• An ODE is accompanied by auxiliary conditions. These conditions are used to evaluate the integral that result during the solution of the equation. An nth order equation requires n conditions.

• If all conditions are specified at the same value of the independent variable, then we have an initial-value problem.

• If the conditions are specified at different values of the independent variable, usually at extreme points or boundaries of a system, then we have a boundary-value problem.

Page 21: Differential Equations and Boundary Value Problems

21

Figure 27.1

Page 22: Differential Equations and Boundary Value Problems

22

General Methods for Boundary-value Problems

Figure 27.2

Page 23: Differential Equations and Boundary Value Problems

23

200)(

40)0(

01.0

10

20

0)(

2

1

2

2

2

TLT

TT

mh

mL

T

TThdx

Td

a

a

Boundary Conditions

204523.534523.73 1.01.0 xx eeT

Analytical Solution:

(Heat transfer coefficient)

Page 24: Differential Equations and Boundary Value Problems

24

The Shooting Method/• Converts the boundary value problem to initial-value

problem. A trial-and-error approach is then implemented to solve the initial value approach.

• For example, the 2nd order equation can be expressed as two first order ODEs:

• An initial value is guessed, say z(0)=10.• The solution is then obtained by integrating the two

1st order ODEs simultaneously.

)( aTThdx

dz

zdx

dT

Page 25: Differential Equations and Boundary Value Problems

25

• Using a 4th order RK method with a step size of 2:T(10)=168.3797.

• This differs from T(10)=200. Therefore a new guess is made, z(0)=20 and the computation is performed again.z(0)=20 T(10)=285.8980

• Since the two sets of points, (z, T)1 and (z, T)2, are linearly related, a linear interpolation formula is used to compute the value of z(0) as 12.6907 to determine the correct solution.

Page 26: Differential Equations and Boundary Value Problems

26

Figure 27.3

Page 27: Differential Equations and Boundary Value Problems

27

Nonlinear Two-Point Problems.• For a nonlinear problem a better approach involves

recasting it as a roots problem.

• Driving this new function, g(z0), to zero provides the solution.

200)()(

)(200

)(

00

0

010

zfzg

zf

zfT

Page 28: Differential Equations and Boundary Value Problems

28

Figure 27.4

Page 29: Differential Equations and Boundary Value Problems

29

Finite Differences Methods.• The most common alternatives to the shooting method.• Finite differences are substituted for the derivatives in the

original equation.

• Finite differences equation applies for each of the interior nodes. The first and last interior nodes, Ti-1 and Ti+1, respectively, are specified by the boundary conditions.

• Thus, a linear equation transformed into a set of simultaneous algebraic equations can be solved efficiently.

aiii

aiiii

iii

TxhTTxhT

TThx

TTTx

TTT

dx

Td

21

21

211

211

2

2

)2(

0)(2

2

Page 30: Differential Equations and Boundary Value Problems

30

Eigenvalue Problems

• Special class of boundary-value problems that are common in engineering involving vibrations, elasticity, and other oscillating systems.

• Eigenvalue problems are of the general form:

0)(

0)(

0)(

2211

2222121

1212111

nnnnn

nn

nn

xaxaxa

xaxaxa

xaxaxa

0 XIA

Page 31: Differential Equations and Boundary Value Problems

31

• l is the unknown parameter called the eigenvalue or characteristic value.

• A solution {X} for such a system is referred to as an eigenvector.

• The determinant of the matrix [[A]-l[I]] must equal to zero for nontrivial solutions to be possible.

• Expanding the determinant yields a polynomial in l.

• The roots of this polynomial are the solutions to the eigen values.