# Higher Order Differential Equations by yurtgc548

VIEWS: 1 PAGES: 54

• pg 1
```									      Derivative Boundary Value
Problems
d2F                         F
2  f ( x , F, F ' )  
Consider:
dx                          4
Derivative Boundary Value
Problems
d2F                         F
2  f ( x , F, F ' )  
Consider:
dx                          4

with B.C.’s: F (0)  F0  0 and F ( )  Fn  1
                    
Derivative Boundary Value
Problems
d2F                         F
2  f ( x , F, F ' )  
Consider:
dx                          4

with B.C.’s: F (0)  F0  0 and F ( )  Fn  1
                    

Note that in this case, we have derivative
boundary conditions.
Derivative Boundary Value
Problems

Let us solve this using finite differences.
Using the finite difference approximations:
Derivative Boundary Value
Problems

Let us solve this using finite differences.
Using the finite difference approximations:

d2F        Fi 1  2 Fi  Fi 1    Fi
2                 2          
dx x  x           h               4
i
Derivative Boundary Value
Problems

Let us solve this using finite differences.
Using the finite difference approximations:

d2F        Fi 1  2 Fi  Fi 1    Fi
2                 2          
dx x  x           h               4
i

Now if we attempt to set up the difference
equations we obtain:
Derivative Boundary Value
Problems

Our Finite Difference Analog is:
Derivative Boundary Value
Problems

Our Finite Difference Analog is:

    h2 
Fi 1   2   Fi  Fi 1  0
    4
Derivative Boundary Value
Problems

Our Finite Difference Analog is:

    h2 
Fi 1   2   Fi  Fi 1  0
    4

Evaluating this equation at i = 1 through 3,
we obtain:
Derivative Boundary Value
Problems

For i = 1:   F0  2  1    2  F  F  0

    4   4      1
      2
Derivative Boundary Value
Problems

For i = 1:   F0  2  1    2  F  F  0

    4   4      1
      2

For i = 2    F  2  1    2  F  F  0
1  
    4   4      2
      3
Derivative Boundary Value
Problems

For i = 1:   F0  2  1    2  F  F  0

    4   4      1
      2

For i = 2    F  2  1    2  F  F  0
1  
    4   4      2
      3

For i = 3    F2  2  1    2  F  F  0

    4   4      3
      4
Derivative Boundary Value
Problems
These equations become:
F0 -1.84579F1 + F2                    = 0
F1 - 1.84579 F2 + F3            = 0
F2 - 1.84579 F3 + F4 = 0
Notice that we now have 3 equations with 5
unknowns!
But we also know:
Derivative Boundary Value
Problems
These equations become:
F0 -1.84579F1 + F2                    = 0
F1 - 1.84579 F2 + F3            = 0
F2 - 1.84579 F3 + F4 = 0
Notice that we now have 3 equations with 5
unknowns!
But we also know:               Fn 1  Fn 1
Fn 
2h
Derivative Boundary Value
Problems
If we use our knowledge of the derivative at x0
and xn, i.e., F’0 = 0 and F’4 = 1:
Derivative Boundary Value
Problems
If we use our knowledge of the derivative at x0
and xn, i.e., F’0 = 0 and F’4 = 1:

F  F1
F0  1  1
2 / 4
Derivative Boundary Value
Problems
If we use our knowledge of the derivative at x0
and xn, i.e., F’0 = 0 and F’4 = 1:

F  F1                F5  F3
F0  1  1            F4  1 

2 / 4                2 / 4
Derivative Boundary Value
Problems
If we use our knowledge of the derivative at x0
and xn, i.e., F’0 = 0 and F’4 = 1:

F  F1                F5  F3
F0  1  1            F4  1 

2 / 4                2 / 4
Notice, now we have two new equations,
but we have also introduced two new
unknowns!
We need two more equations!
Derivative Boundary Value
Problems
Two that we can use are :
Derivative Boundary Value
Problems
Two that we can use are :

2  1  2  F  F  0
For i = 0   F1 

    4
4  0 1

Derivative Boundary Value
Problems
Two that we can use are :

2  1  2  F  F  0
For i = 0   F1 

    4
4  0 1


2  1  2  F  F  0
For i = 4   F3 

    4
4  4 5

Derivative Boundary Value
Problems
Two that we can use are :

2  1  2  F  F  0
For i = 0   F1 

    4
4  0 1


2  1  2  F  F  0
For i = 4   F3 

    4
4  4 5

This gives us two more equations, and we have
the same number of unknowns.
Derivative Boundary Value
Problems
So now our equations become:
F-1 + -1.84579F0 + F1                   = 0
- F-1                + F1               = 0
-1.84579F1 +         F2                 = 0
F1 - 1.84579 F2 +      F3         = 0
F2 - 1.84579 F3 + F4 = 0
-F3           + F5 = 1.5708
F3 - 1.84579 F4 + F5 = 0
Notice that we now have 7 eqns with 7 unkns!
Derivative Boundary Value
Problems
Or: [A][F] = [b]
where:
Derivative Boundary Value
Problems
1   0    1    0    0    0   0
1   a1   1    0    0    0   0
0   1    a1   1    0    0   0
A      0   0    1    a1   1    0   0
0   0    0    1    a1   1   0
0   0    0    0    1    0   1
0   0    0    0    1    a1 1
Derivative Boundary Value
Problems

where
-a1 = -1.84579
and :
Derivative Boundary Value
Problems
0
where
0
-a1 = -1.84579
and :                0
0
b
0

2
0
Derivative Boundary Value
Problems
0        1.88253
where
0        2.03981
-a1 = -1.84579
and :                0
1.88253
0
b       F=   1.43494
0
0.76606

2        0.02095
0        0.80474
Derivative Boundary Value
Problems
Comparing to exact solution of F = -2cos(x/2):
2

F
j          0

x
j
2. cos        2
2

4
2   0           2   4
x
j
Derivative Boundary Value
xj
Problems    2. cos
2
1.88253
Compared to                  1.414
the exact          2.03981
solution:                      2
1.88253
1.848
F=   1.43494   1.414
0.76606   0.765
0.02095     0
0.80474   0.765
Nonlinear Problems
2
d F      dF
2  F dx  e  0
Consider:                   x
dx
Nonlinear Problems
2
d F      dF
2  F dx  e  0
Consider:                   x
dx
with B.C.’s: F(0)  F0  1 and F(1)  Fn  1
Nonlinear Problems
2
d F      dF
2  F dx  e  0
Consider:                   x
dx
with B.C.’s: F(0)  F0  1 and F(1)  Fn  1

Note that in this case, we have a nonlinear
D.E. (because of the second term)
Nonlinear Problems

Let us solve this using finite differences.
Using the finite difference approximations:
Nonlinear Problems

Let us solve this using finite differences.
Using the finite difference approximations:
2
d F          Fi 1  2 Fi  Fi 1

dx 2 x  x           h2
i
Nonlinear Problems

Let us solve this using finite differences.
Using the finite difference approximations:
2
d F          Fi 1  2 Fi  Fi 1

dx 2 x  x           h2
i

dF          Fi 1  Fi 1

dx x  xi        2h
Nonlinear Problems

Our Finite Difference Analog is:
Nonlinear Problems

Our Finite Difference Analog is:
h                           2 xi
Fi 1  2 Fi  Fi 1  ( Fi Fi 1  Fi Fi 1 )  h e
2
Nonlinear Problems

Our Finite Difference Analog is:
h                           2 xi
Fi 1  2 Fi  Fi 1  ( Fi Fi 1  Fi Fi 1 )  h e
2

Evaluating this equation with h = 0.2 and
thus at i = 1 through 4, we obtain:
Nonlinear Problems
For i = 1:
1  2 F  F2  0.1( F F2  F F0 )  0.04e 0.2
1             1      1
Nonlinear Problems
For i = 1:
1  2 F  F2  0.1( F F2  F F0 )  0.04e 0.2
1             1      1
For i = 2
F  2 F2  F3  0.1( F2 F3  F2 F )  0.04e
1                               1
0. 4
Nonlinear Problems
For i = 1:
1  2 F  F2  0.1( F F2  F F0 )  0.04e 0.2
1             1      1
For i = 2
F  2 F2  F3  0.1( F2 F3  F2 F )  0.04e
1                               1
0. 4

For i = 3
F2  2 F3  F4  0.1( F3 F4  F3 F2 )  0.04e 0.6
Nonlinear Problems
For i = 1:
1  2 F  F2  0.1( F F2  F F0 )  0.04e 0.2
1             1      1
For i = 2
F  2 F2  F3  0.1( F2 F3  F2 F )  0.04e
1                               1
0. 4

For i = 3
F2  2 F3  F4  0.1( F3 F4  F3 F2 )  0.04e 0.6

For i = 4
F3  2 F4  1  0.1(  F4  F4 F3 )  0.04e 0.8
Nonlinear Problems

Using MathCad to solve these four
simultaneous non-linear equations,
the results are :
Nonlinear Problems

Using MathCad to solve these four
simultaneous non-linear equations,
the results are :
1.000
0.49454
[F] =   -0.01211
-0.45794
-0.79503
-1.000
Nonlinear Problems
Graphically:             1

0.5

F         0
i

0.5

1
0   0.5   1
x
i

Consider:
T T
2        2
      0
x 2
y 2

Laplace Equation

Analytical:
4To     
1                y
T 
      2n  1 sin( 2n  1) a
n 0

                 b
sinh( b  1)( 2n  1)   cos ec ( 2n  1)
a                   a

Consider: System of grid-points (i,j)
and its four immediate neighbors
i,j+1

I-1,j        i,j        i+1,j
Dx
Dy
i,j-1

T T
2        2
      0
x 2
y 2

Difference equation:
Ti  1, j  2Ti , j  Ti  1, j

Dx  2

Ti , j  1  2Ti , j  Ti , j  1
0
Dy  2

If Dx = Dy:

Ti  1, j  Ti  1, j  Ti , j  1  Ti , j  1
Ti , j 
4
Example:
What is the temperature at P            0
100        0
P= (100 + 0 + 0 + 0)/4
= 25                            100        0

not very accurate…grid is too coarse!
100        0
0

Apply the equation to each interior node:
0       0
100                   0
Ta = (Tb + 0 + 100 + Tc)/4
a       b
Tb = (0 + 0 + Ta + Td)/4     100                   0
100   c       d
Tc = (Td + Ta + 0 + 100)/4                         0
Td = (0 + Tb + Tc + 0)/4     100                   0
0       0

Four equations --> four unknown!