Differential Equations and Boundary Value Problems

Download Report

Transcript Differential Equations and Boundary Value Problems

Differential Equations and Boundary Value Problems

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

di dt

v L

R i L

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

2

Ordinary vs. Partial Differential Equations

• • • •

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

highest derivative.

includes a first derivative as its –

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.

3

Engineering Problem Solution

Physical Laws (Faraday’s, Ohm’s, KVL) -> Differential Equation -> Numerical or Analytical Solution

Figure PT7_03.jpg

Figure PT7_04.jpg

Runga-Kutta Methods

• solving ordinary differential equations of the form

dy dx

f

(

x

,

y

) 7

• •

Euler’s Method

The first derivative provides a direct estimate of the slope at

x i

 

f

(

x i

,

y i

) • where

f(x i ,y i ) x i

and

y i

equation: is the differential equation evaluated at . This estimate can be substituted into the

y i

 1 

y i

f

(

x i

,

y i

)

h

A new value of

y

is predicted using the slope to extrapolate linearly over the step size

h

.

8

9

Figure 25.3

10

Figure 25.4

11

• • 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.

Predictor Corrector : :

y y i

0  1 

i

 1 

y y i

i

f

(

x i

,

y i

)

h f

(

x i

,

y i

)  2

f

(

x i

 1 ,

y i

0  1 )

h

12

13

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

y

at the

y i

 1 

y i

f

(

x i

 1 / 2 ,

y i

 1 / 2 )

h

14

Figure 25.12

15

• 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.

k y i

 1  1 

f k

2 

y i

 (

a

1

k

1

f

(

x i

, (

x i

y i

)

p

1

h

, 

y i a

2

k

2 )

h

q

11

k

1

h

) 16

• Values of a 1 , a 2 , p 1 , and q 11 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.

a

1 

a

2  1

a

2

p

1  1 2

a

2

q

11  1 2

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

17

• • • • Because we can choose an infinite number of values for

a 2

, 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 (

a 2 =1/2

) The Midpoint Method (

a 2 =1

) Raltson’s Method (

a 2 =2/3

) 18

Figure 25.14

19

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

n th

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

.

20

Figure 27.1

21

General Methods for Boundary-value Problems

Figure 27.2

22

d T a

2

dx

L

2

T

 20  10

h m

 (

T a

T

)  0

h

  0 .

01

m

 2

(Heat transfer coefficient)

T

( 0 )

T

(

L

) 

T

1 

T

2   40 200

Boundary Conditions Analytical Solution:

T

 73 .

4523

e

0 .

1

x

 53 .

4523

e

 0 .

1

x

 20 23

• • • • 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 2 nd order equation can be expressed as two first order ODEs:

dT

z dx dz dx

h

 (

T

T a

) An initial value is guessed, say

z(0)=10

.

The solution is then obtained by integrating the two 1 st order ODEs simultaneously.

24

• Using a 4 th 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.

25

Figure 27.3

26

Nonlinear Two-Point Problems.

For a nonlinear problem a better approach involves recasting it as a roots problem.

T

10  200 

f f g

(

z

0 )  (

z

0 ) (

f z

0 ) (

z

0 )  200 • Driving this new function,

g(z 0 ),

solution.

to zero provides the 27

Figure 27.4

28

• •

Finite Differences Methods.

The most common alternatives to the shooting method.

Finite differences are substituted for the derivatives in the original equation.

d

2

T i

 1

T dx

2 

T

 2

T i

x

2

i

 1   2

T i

x

2 

T i

 1 

T i

 1

h

 (

T i

T i

 1  ( 2 

h

 

x

2 )

T i

T

T i

 1

a

)   0

h

 

x

2

T a

• • Finite differences equation applies for each of the interior nodes. The first and last interior nodes,

T i-1

and

T i+1

, respectively, are specified by the boundary conditions.

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

29

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: (

a

11   )

x

1

a

21

x

1   (

a

22

a

12

x

2    )

x

2   

a n

1

x

1 

    

X a

 

n

2 

x

2 0        

a

1

n x a

2

n x n n

 0  0 (

a nn

   )

x n

 0 30

• • • • •  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

]  [

I

]] must equal to zero for nontrivial solutions to be possible.

Expanding the determinant yields a polynomial in  .

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

31