Professional Documents
Culture Documents
Conm 5555
Conm 5555
(6.1)
Where m represents the highest order derivative, and y and its derivatives are functions
of t. The order of the differential equation is the order of its highest derivative and its
degree is the degree of the derivative of the highest order after the equation has been
rationalized in derivatives. If no product of the dependent variable y(t) with itself or
any one of its derivatives occur, then the equation is said to be linear, otherwise it is
nonlinear. A linear differential equation of order m can be expressed in the form
m
p =0
(t ) y ( p ) (t ) = r (t )
(6.2)
In which p ((t ) are known functions. If the general nonlinear differential equation (6.1)
of order m can be written as
(6.3)
y ( m ) = F (t , y, y1 , y n ,..... y ( m 1) )
Then the equation (6.3) is called a canonical representation of the differential equation
(6.1). In a such form ,the highest order derivative is expressed in terms of the lower
order derivatives and he independent variable.
Initial value problem:
A general solution of an ordinary differential equation such as(6.1) is a relation between y,
t and m arbitrary constants , which satisfies the equation, but which contains no
derivatives. The solution may be an implicit relation of the form
w(t , y, c1 , c2 ,...cm ) = 0
(6.4)
y = w((tt , c1 , c2 ,...cm ).
)
O an explicit
Or
li i function
f
i off t off the
h form
f
(6.5)
(6 5)
y ( v ) (t0 ) = v , v = 0,1,2,,.....,, m 1
((6.6))
At on point t = t0 , which are called initial conditions. The point t 0 is called the initial
point. The differential equation (6.1) together with the initial conditions (6.6) is called an
mth order initial value problem.
If the m conditions are prescribed at more than one point to determine the m arbitrary
constants In the general solution (6.1)
(6 1) together with the boundary conditions is known as
the boundary value problem .
EULER METHOD:
u j +1 u j
tj,
= f (tas
j ,u j )
we write h
(6.58)
u j +1 = u j + hf j , j = 0,1,2,......, N 1
where f j = f (t j , u j ). This is called the Euler method. Applying the method at the mesh
points
Choosing a suitable value of h and the initial condition, u1 is obtained from the first
equation , u2 is obtained from the second equation and so on. The method (6.58) is called
an explicit method , since using u j , h
max
[ t 0 ,b ]
T j + 1 = Tand
max u ( )
''
[ t o ,b ]
= M 2 , thenwehave
h2
T
M
2
2.
(6 59)
(6.59).
5
u ' = 2 tu
, u (0 ) = 1
With h=0.2,0.1 and 0.05 on the interval [0.1].Neglecting the round off errors, determine the bound for
the
h error. Applying
l
Richardsons
h d extrapolation
l
to improve the
h counted
d value
l u(1.0).
( )
We have
2
u j +1 = u j 2ht j u j ; j = 0,1,2,3,4
u (0.4) u2 = u1 2ht1u12
= 1 2(0.2)(0.2)(12 ) = 0.92.
For j=2 :
t 2 = 0.4, u2 = 0.92
u (0.6) u3 = u2 2ht 2u22
= 0.92 2(0.2)(0.4)(0.92) 2 = 0.78458.
Similarly , we get u ( 0 .8 ) u 4
Wh h
When
h=0.1
0 1 , we get
For j=0 : t = 0 , u = 1
0
u ( 0 . 1) u 1 = u 0 2 ht 0 u 02 = 1 . 0
For j=1 : t1 = 0 . 1, u 1 = 1
u ( 0 . 2 ) u 2 = u1 2 ht 1u12
= 1 2 ( 0 . 1)( 0 . 1)(1) 2 = 0 . 98 .
For j=2 : t 2 = 0.2, u2 = 0.98
u (0.3) u3 = u2 2ht 2u22
= 0.98 2(0.1)(0.2)(0.98) 2 = 0.94158.
Similarly, we get
F h
For
h=0.05,
0 05 we gett u (0.05) 1.0, u (0.1) 0.995,
u (0.15) 0.9851, u (0.2) 0.97054,
u (0.25) 0.9517, u (0.3) 0.92906,
u (0.35) 0.90316, u (0.4) 0.87461,
u (0.45) 0.84401, u (0.5) 0.81195,
u (0.55) 0.77899, u (0.6) 0.74561,
u (0.65) 0.71225, u (0.7) 0.67928,
u (0.75) 0.64698, u (0.8) 0.61559,
u (0.85) 0.58527, u (0.9) 0.55615,
u (0.95) 0.52831, u (1.0) 0.50179.
max u
(t ) .
0 t 1
max
0 t 1
2(1 3t 2 )
2h 2
2 3
(1 + t )
2
As the absolute maximum of (1 3t ) in[0,1] is 2.
u ( k ) ( h) =
2k u j
( k 1)
(h / 2) u (jk 1) (h)
2k 1
The
h equation at j j 1 = f (t j , u j ) the
h mesh
h point t = t j +1 may b
be written as u j +1 = u j + hf j +1 ((6.60))
h
where
f j +1 = f (t j +1 , u j +1 ) . This is called the Backward Euler Method . The solution values
u1 = u0 + hf1
u 2 = u1 + hf 2
...................
u N = u N 1 + hf N
The method (6.60) involves the unknown value u j +1 on both sides of the equation and hence u j +1
i li i l SSuch
implicitly.
h a method
h d iis called
ll d an implicit
i li i method.
h d
Since f(t,u) is nonlinear,(6.60)produces a nonlinear algebraic equation for the solution of u j +1 . For the
solution of this nonlinear equation, we can use the NewtonRAPHSON METHOD . Applying the Newton
Raphson method to (6.60). We get
ff
Or after rearrangement as
f ( s +1)
(6 61)
(6.61)
9
Where
(s +1)
j+1
(s)
j+1
TOL
= f (t , u ), u (t0 ) = 0
Where TOL is a specified absolute error tolerance. Since the solution u(t) of
dt
Varies continuously, we may take the initial approximation as u 0 = u The local truncation error at the
j +1
j
point t = t
p
in the method(6.60)
(
) is ggiven byy
j +1
T j +1 = u ( t j +1 ) u j +1
= u ( t j +1 ) [ u ( t j ) + hf ( t j +1 , u ( t j +1 ))]
h2
=
u ' ' ( ), t j < < t j +1 .
2
(6.63)
It may be noted that the truncation errors of Euler and backward Euler methods are equal but are of
opposite signs.
Example 6.12 : Solve the initial value problems
u= 2 tu 2 , u ( 0 ) = 1
with h=0.2 , on the interval [0,0.4],using the backward Euler method.
The backward Euler method gives
2
This is an implicit equation in u j + 1 and can be solved by using an iterative method. We generally use
NewtonRaphson method.
2
Denote F( u j +1 )=u j + 1 u j +0.4 t j + 1 +u j +1
10
We have
F ' ( u j + 1 ) = 1 + 0 . 8 t j + 1u j + 1
u (j s++11 ) = u (j s+)1
F ( u (j s+)1 )
F ' (u
(s)
j +1
s = 0 ,1, 2 ,.....( 6 . 64 )
(0)
Taking u j +1 = u j, we obtain from (6.64), for
J=0 t1 = 0.2, u1( 0 ) = u0 = 1,
J=0,
Therefore , u(0.2)
= 0 . 93070331
11
u j +1 u j 1
2h
= f (t j , u j )
This is called the midpoint method. The solution values are given by
u2 = u0 + 2hf1
u3 = u1 + 2hf 2
....................
u N = u N 1 + 2hf N 1
(6.66)
The value is u1 known from the initial condition. The value u1 is unknown and has to be determined
by some other method after which (6.66) is used to determine successively u 2 , u 3 ,.... u N .
The local truncation error is given by T j +1 = u (t j +1 ) u j +1
= u (t j +1 ) [u j 1 + 2hf (t j , u (t j ))]
h3
= u ' ' ' ( ),
) t j 1 < < t j +1.
3
3
The bound on the truncation error is given by T h M 3
J +1
Where
(6 67)
(6.67)
(6.68)
t[t0 ,b]
12
from
u 1 the Taylor series method of second order. We have
h2
u1 u (h) = u (0) + hu ' (0) + u ' ' (0)
2
Where
We obtain
u1 u ( 0 .2 ) = 1 + 0 +
0 .04
( 2 ) = 0 .96 .
2
have
have, for
u2,u3,u4,uWe
5.
j = 1 : u 0 = 1, u 1 = 0 . 96 , t1 = 0 . 2 ,
u ( 0 . 4 ) u 2 = u 0 0 . 8 t1u 12 .
= 1 ( 0 . 8 )( 0 . 2 )( 0 . 96 ) 2 = 0 . 852544 .
j = 2 : u 1 = 0 . 96 , u 2 = 0 . 852544 , t 2 = 0 . 4 ,
u ( 0 . 6 ) u 3 = u 1 0 . 8 t 2 u 22 .
= 0 . 96 ( 0 . 8 )( 0 . 4 )( 0 . 852544 ) 2 = 0 . 7274139 .
j = 3 : u 2 = 0 . 858544 , u 3 = 0 . 7274139 , t 3 = 0 . 6
u ( 0 . 8 ) u 4 = u 2 0 . 8 t 3 u 32
0 . 852544 4 ( 0 . 2 )( 0 . 6 )( 0 . 7274139 ) 2 = 0 . 5985611 .
j = 4 : u 3 = 0 . 7274139 , u 4 = 0 . 5985611 , t 4 = 0 . 8 ,
u (1 . 0 ) u 5 = u 3 0 . 8 t 4 u 42
13
= 0 . 7274139 ( 0 . 8 )( 0 . 8 )( 0 . 5985611 ) 2 = 0 . 4981176
u ( t ) = 1 /(1 + t 2 ). Therefore
, u(1)=0.5.
*
The percentage error is defined as p.e = u u *100
*
Where u is the exact solution and u is the approximate solution. Therefore:
p.e =
0.5 0.4981176
*100= 0.38%.
0.5
14
(6.70)
Can be classified mainly into two types. They are (1) single step methods and (2) multistep methods.
In single step methods
methods, the solution at any point is obtained using the solution at only the previous point
point.
Thus, a general single step method can be written as
uj+1 = uj + h(t j+1, t j , uj+1, uj , h)
(6.71)
Where is a function of the arguments t j , t j +1 , u j , u j +1 , h and also depends on f.
f We often write it as
(t, u, h) . This function is called the increment function . If u j + 1 can be obtained simply by evaluating
the right hand side of (6.71) , then the method is called an explicit method . In this case , the method is
of the form
u j +1 = u j + h (t j , u j , h).
(6.72)
If the right hand side of (6.71) depends on u j +1 also, then it is called an implicit method. The general
form in this case is as given in (6.71).
15
(6.75)
h2
1 p ( p)
u ( t j + 1 ) = u ( t j ) + hu ' ( t j ) +
u ' ' ( t j ) + ... +
h u (t j )
2!
p!
1
h p + 1u ( p + 1 ) ( t j + h )
+
( p + 1)!
1
= u ( t j ) + h ( t j , u ( t j ), h ) +
h p + 1u ( p + 1 ) ( t j + h )
( p + 1)!
h2
h p ( p)
Where h(t j , u(t j ), h) = hu' (t j ) + u' ' (t j ) + ...... u (t j ).
2!
p!
16
u ( t j +1 ) .
..........................................................
Where
f t , f u ..... represents the partial derivatives of f with respect to t and u and so on. The values
17
h p +1 ( p +1)
u
(t j + h)
( p + 1)!
The number of terms to be included in (6.76) is fixed by the permissible error. If this error is
series is truncated at the term u ( p ) (t j ) then
h p +1 u ( p +1) (t j + h) < ( p + 1)!
Or
(6.78)
h p +1 f ( p ) (t j + h) < ( p + 1)!
We assume that an estimate of f ( p ) (t + h is known.
and the
Foe a given h and ,(6.78) will determine p, and if p and are specified ,then it will give an upper
bound on h.
Since t j + h is not known, f ( p) (t j + h) in (6.78) is replaced by its maximum value in [t0 , b] . A way of
determining this value is as follows. Write one more nonvanishing term in the series than is required and
then differentiate this series p times. The maximum value of this quantity in [t0 , b] gives a rough required
bound.
18
Example 6.15 :
Given the initial value program u ' = t 2 + u 2 , u(0)=0
u(0) 0
Determine the first three nonzero terms in the Taylor series for u(t) and hence obtain the value for u(1) .
Also determine t when the error in u(t) obtained from the first two nonzero terms is to be less than
10 6 after rounding.
We have u(0)=0,u(0)=0
u=2t+2uu,u(0)=0
((u ' ) 2),
u=2+2(uu+
(
),u(0)=2
( )
u ( 4 ) = 2(uu ' ' '+3u ' u ' ' ), u ( 4) (0) = 0
u (5) = 2[uu ( 4 ) + 4u ' u ' ' '+3(u ' ' ) 2 ], u (5) (0) = 0
u ( 6 ) = 2(uu (5) + 5u ' u ( 4 ) + 10u ' ' u ' ' ' ), u ( 6 ) (0) = 0
u ( 7 ) = 2(uu ( 6) + 6u ' u (5) + 15u ' ' u ( 4 ) + 10(u ' ' ' ) 2 ), u ( 7 ) (0) = 80
u (8) (0) = u (9 ) (0) = u (10) (0) = 0
u (11) = 2[uu (10) + 10u ' u ( 9 ) + 45u ' ' u (8) + 120u ' ' ' u ( 7 )
+ 210u ( 4)u ( 6) + 126(u (5) ) 2 ],
] u (11) (0) = 38400
12 1 7
2 11
t . The approximate value of u(1) is given
Thus , the Taylor series for u(t) becomes u(t) = t + t +
3
63
2079
by u (1) = 1 + 1 + 2 0.350168 . If only the first two terms are used , then the value of t is obtained from
3
63
2079
2 11
t < 0.5 *107 .solving we get
2079
t 0.41.
19