0% found this document useful (0 votes)
340 views22 pages

Finite Difference Method 2

The finite difference method is used to solve ordinary differential equations that involve boundary conditions rather than initial conditions. These are called boundary value problems. The method works by approximating derivatives using finite differences and setting up a system of equations to solve for the unknown values. Specifically, it approximates derivatives at a point using the values of the function at neighboring points, replacing derivatives with difference quotients. This leads to a system of algebraic equations that can be solved numerically to obtain approximations to the solution at discrete points along the domain.

Uploaded by

badr am
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
340 views22 pages

Finite Difference Method 2

The finite difference method is used to solve ordinary differential equations that involve boundary conditions rather than initial conditions. These are called boundary value problems. The method works by approximating derivatives using finite differences and setting up a system of equations to solve for the unknown values. Specifically, it approximates derivatives at a point using the values of the function at neighboring points, replacing derivatives with difference quotients. This leads to a system of algebraic equations that can be solved numerically to obtain approximations to the solution at discrete points along the domain.

Uploaded by

badr am
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 22

FINITE DIFFERENCE METHOD

Finite Difference Method for Ordinary Differential Equations

Introduction

The finite difference method is used to solve ordinary differential equations that
have conditions imposed on the boundary rather than at the initial point. These
problems are called boundary-value problems. In this chapter, we solve second-
order ordinary differential equations of the form

2
2
= (, , ),

With boundary conditions

() = and () =

Many academics refer to boundary value problems as position-dependent and


initial value problems as time-dependent. That is not necessarily the case as
illustrated by the following examples.

The differential equation that governs the deflection y of a simply supported


beam under uniformly distributed load (Figure 1) is given by

2 ( )
=
2 2
where
x location along the beam

E Youngs modulus of elasticity of the beam


I second moment of area
q uniform loading intensity
L length of beam

The conditions imposed to solve the differential equation are

( = 0) = 0 (4)

( = ) = 0
Clearly, these are boundary values and hence the problem is considered a
boundary-value problem

Figure 1 Simply supported beam with uniform distributed load.

Now consider the case of a cantilevered beam with a uniformly distributed load
(Figure 2). The differential equation that governs the deflection y of the beam is
given by

2 ( )2
=
2 2
where
x location along the beam

E Youngs modulus of elasticity of the beam


I second moment of area
q uniform loading intensity
L length of beam

The conditions imposed to solve the differential equation are

( = 0) = 0 (6)

( = 0) = 0

Clearly, these are initial values and hence the problem needs to be considered as
an initial value problem.

y
q

Figure 2 Cantilevered beam with a uniformly distributed load.

Numerical method

1 0
| = lim
0 0

About (x=x0)


()
() = ( 0 )
!
=0

(2)
( 0 )2
() = 0 + 01 ( 0 ) +
2!

= 1 () = 1 0 = 1 0 =
(1) 2 (2) 3 (3)
1 = 0 + 0 + (0) + 1
2 6 (0)

1 1 0 (2)
.
2 0

1
= ( () ) ()
+

1
: = (() ( ))

1
: = { ( + ) ( )}
2

= 1 = 1

(1) 2 (2) 3 (3)


= 1 1 = 0 + 0 + 0 + (0)
2 6

(1) 3 (3)
1 1 = 20 + 0
3

3 3
( + ) ( ) = 20
3 0

( + ) ( ) 2 3
| = 0
0 2 6

Error of h2 more accurate.

2
| = ( ) ()
2 0 0

1
= [( + ) ( )]
2
1
= [( + ) ()]

1
= [() ( )]

2 1 1 1
| = [ ] = [1 1 ]
2 0 2 2

1 2 0 0 2 2 20 + 2
= [ ]=
2 2 2 42

2
| =
2 0

0 1 1 1
= [ ] = [ 0 1 ] = 2 [(1 0 ) (0 1 )]

3 2 1 20 + 1
= ( ) = ( ( )) = [ ]
3 2 2

3 1 2 0 1 1 0 2
= [ 2 + ]
3 2 2 2 2

1
2 = [( + ) 2() + ( )] \
2

4 2
2
= ( 2)
4

2 -1 0 +1
2 +1 -2 +1
23 -1 2 0 -2 1
4 +1 -4 +6 -4 +1
1
= (( + ) ()) =

1
: = (( + ) ( )) =
2

1
= (() ( )) =

1
= [( + ) ( )]
2

2 (0 1 )
= = ( )
2

1 1 0 0 1
= ( ( ))

2 1
= (+1 20 + 1 ) = 2
2 2

3 1 1 0 2 1 1 2 0
= ( 2 + ) = [ 2 ( ) + ]
3 2 1 0 1
2 2 2 2

3 1
= (2 + 21 21 + 2 )
3 23

4 2
2 1
= ( ) = ( 41 + 60 41 + 1 )
4 2 4 2
2 -1 0 +1

2 +1 -2 +1

23 -1 2 0 -2 1

4 +1 -4 +6 -4 +1

4
4 : 1 -4 6 -4 1
4

4 1
= { 41 + 60 41 + 2 }
4 4 2

2 4 1 2
( ) = 4 2 {2 41 + 60 41 + 2 }
2 4

4(0 21 + 2 ) + (1 22 + 3 )}

6
6
= 3 62 + 151 200 + 151 62 + 3
6

1 -6 15 -20 15 -6 1

2' 1' 1 2 3 4 5
4 3
=0 1 = 1 =0 | = |(3) = 0
4 3 (3)

(1) 61 4(1 + 2 ) + (2 + 3 ) = 0

4(1 + 2 ) + ( 2 + 3 ) = 0 (1)

(2) 62 4(3 ) + 1 + 4 = 0 (2)

(3) 63 4(2 + 4 ) + 5 = 0 (3)

(3) 23 + (2 + 4 ) = 0 (4)


(3) 22 24 1 + 5 = (5)
2

(1) 1 + 2 = 0 (6)

2 = 1

4(22 ) + 2 + 3 = 0

72 43 + 4 = 0

63 42 44 + 5 = 0

23 + 2 + 4 = 0


22 24 1 + 5 =
23

2 = 82 3 = 52

4 = 43 72 = 23 2 = 52 3 = 32

5 = 63 + 42 + 14(3 ) 282 = 103 242 = 62


2 = 52 4 = 52 5 = 62 3 = 32


22 2(52 ) + 62 =
23


22 = 2 = 2
23 3

6
3 =
3

+ 81 = () (0) = (0) = (1) = (1) = 0


() = 729 2 (0) =0 3 = 2


(0) = 0 = 2 21 + 4 = 0


(1) = 0 = 0 + 22 24 + 5 = 0

4 = 21 2

22 41 + 22 + 5 = 0

5 = 41 42

1 4 1
( ) [3 40 + 62 41 + 4 ] + 812 = 729 ( )
2 4

1 4
( ) [0 42 + 61 44 + 5 ] + 811 = 729
2

1 729
[2 + 62 41 + 21 2 ] + 812 =
16 4

1
[42 + 61 81 + 42 + 41 42 ] + 811 = 729
16
1 729
[62 21 ] + 812 =
16 4

1 729
[21 42 ] + 811 =
16 4

729
0.3752 0.1251 + 812 =
4

729
0.1251 0.2502 + 811 =
4

P P
3 0 1 2 4

3 = 1 2 = 4


1. ) (3 40 + 61 42 + 0 ) + ( 21 + 2 ) = 0
0

2. ) (0 41 + 62 40 + 4 ) + ( 22 + 0 ) = 0
1
1
(1 + 61 42 ) + (21 + 2 ) = 0
2
1
(41 + 62 2 ) + ( 22 ) = 0
2 1

2
= 71 42 + (21 + 2 ) = 0

41 + 52 + (1 22 ) = 0

1 (7 2) + 2 ( 4) = 0

1 (7 4) + 2 (5 2) = 0
(7 2) ( 4)
| |=0
( 4) (5 2)

2 -1 0 +1

2 +1 -2 +1

23 -1 2 0 -2 1

4 +1 -4 +6 -4 +1

q(x)
1
Ex: + =

x

. (0) = = 0 y

() = () = () = 0
L

=

1
D.E [2 41 + 60 41 + 2 ] + 0 =
4

(0) () = 0 , (0) = 0 () = (+)

() () = 0

() = 0 = 0 ( ) 2() + ( + ) = 0

( + ) = ( )


= 2 =
2

(0) = 0 ( ) = (+ )
2 2

() = 0

3
( ) = ( )
2 2

. =
2
1 2 1
[ ( ) 4( (0) + ()) + 6 ( )] + ( ) =
4 2 2 2
(2)

4
. ( ) =
2 96 + 4

= 3 = ( ) = ( )
3 3 3

2 4
( ) = ( )
3 3

1 2 1
( ) { ( ) 4 ( (0) + ( )) + 6 ( )} + ( ) =
3 4 3 3 3 3
(3)

2 1 2 2 1
( ) {(0) 4 ( ( ) + ()) + 6 ( )} + ( ) =
3 3 3 3
3

( ) 4
{387 +
4
324 } { 3 } = { }
324 405 + 4 2 4
( )
3

(729 + 4 )4
( ) =
3 (405 + 4 )(567 + 4 ) (324)2
2 (891 + 4 )4
( ) =
3 (405 + 4 )(567 + 4 ) (324)2

0 1
= ( 3 )
2 1

0 1
= ( 4 )
2 2

2 0 1
= ( 20 + 3 )
2 2 1

2 0 1
= ( 20 + 4 )
2 2 2

2
2 2
0 = ( 2 ) + ( 2 )
0 0

1
2 0 = ( + 2 + 3 + 4 40 )
2 1

2 2 4 (6 8 ) 12 10 6 8 + 10 12
0 = ( )= =
2 42 42

3 1
0 = ( 20 + 4 )
2 2 2
1
= (( 8 ) 2(1 3 ) + (12 10 ))
23 6
1
= 3 [6 8 10 + 12 21 + 23 ]
2
4 1
0 = { 43 + 60 41 + 5 }
4 4 9

4 1
0 = { 42 + 60 44 + 11 }
4 4 7

-1 1 1 -2 1

3 3
2 3 2 3
2 +2 -2 2

-1 1 -1 +2 -1
1 2 1

4
4 -2 4 -2
2 2

1 -2 1

2 -8 2

2 4
1 -8 20 -8 1

2 -8 2

Example : determine the deflection of the clamped square plate under


uniform pressure: y

12(1 )
4 =
3 a P

Boundary Conditions ; x=0,a w=w,x=0


a
Y=0,a w=w,y=0
2
x
= =2

2 1 2

2

=
2

1 12(1 )
{201 + 42 } =
4 3
(2 )

1 = +2

24 12(1 )
16 =
4 1 3

1
1 =
32 3

=4 =
4

1 1
(0) {200 321 + 82 } = 12
4 3
(4 )

1 1
(1) {201 8(0 + 22 ) + 41 + 21 } = 12
4 3
(4 )

1 1
(2) {202 8(21 ) + 4(0 ) + 42 } = 12
4 3
(4 )

2 16 24 0 1 3(1 )4
{8 26 16}
{ 1 } = { 1}
2 64 3
20 32 8 1

3(1 )4
=
64 3

328
0 =
45568
220
1 =
45568

149
2 =
45568

Example

= 120`` q(x)

= 43.4 103 / x 1 2 3

= 2604 // y

= 30 106
l
= 3 103 4

()
+ =

B . C

``
=0 (0) = 0 =0 (0) = 0

``
= () = 0 =0 () = 0

`
(0) = 0 (1`) = (1)

``
() = 0 (3`) = (3`)

1 -4 6
-4 1
1 1
(1) 4
[ 1` 40 + 61 42 + 3 ] + 1 = ()

1 1
(2) [ 0 41 + 62 43 + ] + 2 = ()
4

1 1
(3) [ 1 42 + 63 4 + 3` ] + 3 = ()
4

1 1
[ 71` 42 + 3 ] + =
4 1 ()

1 1
[ 41 + 62 43 ] + 2 = ()
4

1 1
[ 4 + 5 ] + =
4 1 2 3
3 ()

4
7+ 4 1
1 1 4
4
4 6+ 4 {2 } = {1} ()
3
1

{ 1 4 5+
}

7.023 4 1 1 1
{ 4 6.023 4 } {2 } = {1} (0.391)
1 4 5.023 3 1

7.023 4 1
{ 4 6.023 4 }
1 4 5.023

7.023 [ 14.254 ] + 4 [16.092 ] + [ 9.977 ] = 45.715


1 14.254 16.092 9.977 1
{2 } = 0.022 {16.092 34.277 +24.092} {1} (0.391 )
3 9.977 +24.092 26.300 1
1 40.323 0.345
{2 } = 0.009 {74.461} = {0.637}
3 60.369 0.516


( ) = 0.637
2

0.345
0.516

0.637

4 43.4 103 (120)4


( ) = =
2 96 + 4 (96)(30 106 )(3 103 ) + (2604)(120)4
= 0.980


( ) = 0.980
2

0.637 0.980
= | | = 0.538 = 53.8 %
0.637

3 2 1 4
q(x)

B . C

=0 ` = 0 1 = 2

=0 ``` = 0 3 + 2 2 21 = 0 3 = 2 2 22
=0

= `` = 0 1 = (4)

= () = 0

1
+ =

1 1
[ 2 4(0) + 61 4() + 4 ] + =
4 1 ()

4 4
{1 + 6 1 1 } + 1 =

4 4
(6 + ) 1 =

6.023 1 = 0.391

1 = 0.065

5 1
0 = { 3 + 42 + 51 + 51 42 + 3 }
5 25
6 1
0 = { (2 4 ) + 4(1 3 ) 5(0 + 2
6 46
+ 5(2 4 ) 4(3 1 ) + (4 2 ) }

6 1
0 = { 43 + 42 + 41 10 0 + 4 43 + 42 + 1 }
6 46 4

66
4 =
6 0

1 -4 4 4 -10 4 4 -4 1

Or

3 3 1 3
( ) = 6 { 3 { 2 + 21 21 + 2 } }
3 3 0 4

1 (1)4 + 2 3 21 + 0 ) + 2(3 + 2 3 20 + 1 )
= { }
46 (2)(1 + 2 0 22 + 3 ) + (0 + 2 1 23 + 4 )

66
4 = 4 43 + 42 + 41 10 0 + 41 + 42 43 + 4
6 0

1 -4 4 4 -10 4 4 -4 1

You might also like