2. Chapter 8 Differential Equations
An equation that defines a relationship between an
unknown function and one or more of its derivatives
is referred to as a differential equation.
A first order differential equation:
dy =
Example:
8-2
f (x, y)
dx
x y x
= = =
5 , with boundary condition 2 at 1.
dy
dx
Solving it, we get 5
y = x +
c
2
2
2
school.edhole.com
y x y x
= = = -
Substituting 2 and 1, we obtain 2.5 0.5
3. Example:
dy = -
A second-order differential equation:
d y =
Example:
8-3
f x y dy
( , , ) 2
2
dx
dx
c( y x)
dx
y''= 2x + xy + y'
school.edhole.com
4. Taylor Series Expansion
Fundamental case, the first-order ordinary differential
equation:
dy = = =
0 0 f (x) subject to y y at x x
dx
Integrate both sides
ò = òx
dy f x dx
0 x
0
y
y
( )
y g x y f x dx
or ( ) ( ) 0
The solution based on Taylor series expansion:
8-4
= = + òx
x
0
y g x g x x x g x x x g x
= = + - + - +
( ) ( ) ( ) '( ) ( )
school.edhole.com
where ( ) and '( ) ( )
''( ) ...
2!
0 0 0 0
0
2
0
0 0
y = g x g x =
f x
5. Example : First-order Differential
Equation
Given the following differential equation:
dy
= 3x2 such that y =1 at x =1
dx
The higher-order derivatives:
8-5
6
6
0 for n 4
d y
d y
3
3
2
2
=
=
= ³
n
dx
n
dx
d y
x
dx
school.edhole.com
6. The final solution:
8-6
x d y
x d y
g x x dy
= + - + - + -
( 1)
x x x x x
= + - + - + -
(6 ) ( 1)
( ) 1 ( 1) ( 1)
1 ( 1)(3 ) ( 1)
x x x
= + - + - + -
1 3( 1) 3( 1) ( 1)
where 1
(6)
3!
2!
3!
2!
0
2 3
3
0
2
2
0
3
3 3
2
2 2
=
x
dx
dx
dx
school.edhole.com
7. 8-7
Table: Taylor Series Solution
x One Term Two Terms Three Terms Four Terms
1 1 1 1 1
1.1 1 1.3 1.33 1.331
1.2 1 1.6 0.72 1.728
1.3 1 1.9 2.17 2.197
1.4 1 2.2 2.68 2.744
1.5 1 2.5 3.25 3.375
1.6 1 2.8 3.88 4.096
1.7 1 3.1 4.57 4.913
1.8 1 3.4 5.32 5.832
1.9 1 3.7 6.13 6.859
2 1 4 7 8
school.edhole.com
9. General Case
The general form of the first-order ordinary
differential equation:
dy = = =
0 0 f (x, y) subject to y y at x x
dx
The solution based on Taylor series expansion:
y = g ( x ) = g ( x , y ) + ( x - x ) g '( x , y ) + ( x - x ) g x y +
0 0 0 0 0 0 0
''( , ) ...
2!
0
8-9
school.edhole.com
10. Euler’s Method
Only the term with the first derivative is used:
e
g(x) = g(x ) + (x - x ) dy + 0 0
dx
This method is sometimes referred to as the one-step
Euler’s method, since it is performed one step at a
time.
8-10
school.edhole.com
11. Example: One-step Euler’s Method
Consider the differential equation:
dy
= 4x2 such that y =1 at x =1
dx
For x =1.1
dy 4x dx y
1 4 1.1
y - = x3 =
Therefore, at x=1.1, y=1.44133 (true value).
8-11
ò = ò 1.1
1
2
1
0.44133
3
1
school.edhole.com
12. D = - =
With a step size of ( ) 0.1, we get
(1.1) 1 0.1[4(1) ] 1.4
g
The error 0.04133 (in absolute value).
Use a step size of 0.05 and apply Euler's equation twice
x x
= =
(at 1 and 1.05) :
g g
= + - = + =
(1.05) (1) (1.05 1.00)[4(1) ] 1 0.2 1.2
= + - =
(1.10) (1.05) (1.10 1.05)[4(1.05) ] 1.4205
The error is reduced to 0.020833.
For a step size of 0.02, after five steps, the estimated value
8-12
g(1.10) 1.43296
The error is 0.008373.
2
2
2
0
=
=
= + =
g g
x x x
school.edhole.com
13. Errors with Euler`s Method
Local error: over one step size.
Global error: cumulative over the range of the solution.
The error e using Euler`s method can be approximated using the
second term of the Taylor series expansion as
2 2
0
e = ( x - x )
d y
2!
2
2
x x
d y
dx
where is the maximum in [ , ].
2 0
dx
If the range is divided into n increments, then the error at the end
of range for x would be ne.
8-13
school.edhole.com
14. Example: Analysis of Errors
8-14
= = =
4 such that 1 at 1
dy
d y
Thus, the error is bounded by ( )
For step sizes of 0.1, 0.05, and 0.02. the upper limits on the error
= =
4(1.1)(0.1) 0.044
= =
2(4)(1.1)(0.05) 0.022
5(4)(1.1)(0.02) 0.0088
at 1.1:
(8 ) 4 ( )
2!
8
2
e
e
0.02
2
0.05
2
0.1
2
0
2
0
2
2
2
= =
=
= - = -
=
e
e
x
x x x x x x
x
dx
x y x
dx
school.edhole.com
15. 8-15
Table: Local and Global Errors with a Step Size of 0.1.
x Exact
solution
Numerical
Solution
Local
Error(%)
Global
Error(%)
1 1 1 0 0
1.1 1.4413333 1.4 -2.8677151 -2.8677151
1.2 1.9706667 1.884 -2.300406 -4.3978349
1.3 2.596 2.46 -1.9003595 -5.238829
1.4 3.3253333 3.136 -1.6038492 -5.6936648
1.5 4.1666667 3.92 -1.396 -5-92
1.6 5.128 4.82 -1.1960478 -6.0062402
1.7 6.2173333 5.844 -1.0508256 -6.004718
1.8 7.4426667 7 -0.9315657 -5.947689
1.9 8.812 8.296 -0.8321985 -5.8556514
2 10.333333 9.74 -0.7483871 -5.7419355 school.edhole.com
16. 8-16
Table: Local and Global Errors with a Step Size of 0.05.
x Exact
solution
Numerical
Solution
Local
Error(%)
Global
Error(%)
1 1 1 0 0
1.05 1.2101667 1.2 -0.8401047 -0.8401047
1.1 1.4413333 1.4205 -0.7400555 -1.4454209
1.15 1.6945 1.6625 -0.6589948 -1.8884627
1.2 1.9706667 1.927 -0.5920162 -2.2158322
1.25 2.2708333 2.215 -0.5357798 -2.4587156
1.3 2.596 2.5275 -0.4879301 -2.6386749
1.35 2.9471667 2.8655 -0.4467568 -2.771023
1.4 3.3253333 3.23 -0.4109864 -2.8668805
1.45 3.7315 3.622 -0.3796507 -2.9344768
1.5 4.1666667 4.4025 -0.352 -2.98
school.edhole.com
17. 8-17
Table: Local and Global Errors with a Step Size of 0.05
(continued).
x Exact
solution
Numerica
l Solution
Local
Error(%)
Global
Error(%)
1.55 4.6318333 4.4925 -0.3274441 -3.0081681
1.6 5.128 4.973 -0.3055122 -3.0226209
1.65 5.6561667 5.485 -0.2858237 -3.0261956
1.7 6.2173333 6.0295 -0.2680678 -3.0211237
1.75 6.8125 6.6075 -0.2519878 -3.0091743
1.8 7.4426667 7.22 -0.2373701 -2.9917592
1.85 8.1088333 7.868 -0.2240355 -2.9700121
1.9 8.812 8.5525 -0.2118323 -2.9448479
1.95 9.5531667 9.2745 -0.2006316 -2.9170083
2 10.333333 10.035 -0.1903226 -2.8870968
school.edhole.com
19. Modified Euler’s Method
Use an average slope, rather than the slope at the start
of the interval :
a. Evaluate the slope at the start of the interval
b. Estimate the value of the dependent variable y at the
end of the interval using the Euler’s metod.
c. Evaluate the slope at the end of the interval.
d. Find the average slope using the slopes in a and c.
e. Compute a revised value of the dependent variable y
at the end of the interval using the average slope of
step d with Euler’s method.
8-19
school.edhole.com
20. Example : Modified Euler’s Method
dy
= x y such that y = 1 at x = 1
dx
D =
The five steps of the first iteration for 0.1:
= =
dy
1a. 1 1 1
1
g g dy
= + - = + =
1b. (1.1) (1.0) (1.1 1.0) 1 0.1(1) 1.1
= =
dy
1c. 1.1 1.1 1.15369
1.1
dx
dy
1d. 1
1
= + =
(1 1.15369) 1.07684
2
g g dy
= + - = + =
1e. (1.1) (1.0) (1.1 1.0) 1 0.1(1.07684) 1.10768
a
a
dx
dx
dx
dx
x
8-20
school.edhole.com
21. The steps for the second interval :
= = =
dy
2a. 1.1 1.10768 1.15771
1.1
g g dy
= + - = + =
2b. (1.2) (1.1) (1.2 1.1) 1.10768 0.1(1.15771) 1.22345
8-21
1.1
= =
dy
2c. 1.2 1.22345 1.32732
1.2
dx
dx
2d. 1
dx
dx
= + =
( ) 1.24251
2
1.1 1.2
g g dy
= + - =
2e. (1.2) (1.1) (1.2 1.1) 1.23193
a
a
dx
dy
dy
dy
dx
x y
dx
school.edhole.com
22. Second-order Runge-Kutta Methods
The modified Euler’s method is a case of the second-order
Runge-Kutta methods. It can be expressed as
y = y + 0.5[ f ( x , y ) + f ( x + h , y +
hf ( x , y ))]
h
i i i i i i i i
y = g x y = g x + D
x
where ( ), ( ),
i i i i
x = x + D x h = D
x
i +
i
+
+
,
1
1
1
8-22
school.edhole.com
23. The computations according to Euler’s method:
1. Evaluate the slope at the start of an interval, that is,
at (xi,yi) .
2. Evaluate the slope at the end of the interval (xi+1,yi+1) :
3. Evaluate yi+1 using the average slope S1 of and S2 :
8-23
( , ) 1 i i S = f x y
( , ) 2 1 S f x h y hS i i = + +
y y S S h i i 0.5( ) 1 1 2 = + + +
school.edhole.com
24. Third-order Runge-Kutta Methods
The following is an example of the third-order Runge-
Kutta methods :
1
y y f x y f x h y hf x y
= + + + + + +
[ ( , ) 4 ( 0.5 , 0.5 ( , ))
6
i i i i i i i i
f ( x h , y hf ( x , y ) 2 hf ( x 0.5 h , y 0.5 hf ( x , y )))]
h
i i i i i i i i
1
+ - + + +
8-24
school.edhole.com
25. The computational steps for the third-order method:
1. Evaluate the slope at (xi,yi).
( , ) 1 i i S = f x y
2. Evaluate a second slope S2 estimate at the mid-point
in of the step as
3. Evaluate a third slope S3 as
4. Estimate the quantity of interest yi+1 as
8-25
( 0.5 , 0.5 ) 2 1 S f x h y hS i i = + +
( , 2 ) 3 1 2 S f x h y hS hS i i = + - +
1
y = y + [ S + 4 S + S ]
h i +
1 i 1 2 3 6
school.edhole.com
26. Fourth-order Runge-Kutta Methods
dy = = = D =
( , ) such that at . 0 0 f x y y y x x x h
dx
1. Compute the slope S1 at (xi,yi).
2. Estimate y at the mid-point of the interval.
i 1/ 2 i 2 i i y = y + h f x y +
3. Estimate the slope S2 at mid-interval.
4. Revise the estimate of y at mid-interval
8-26
( , ) 1 i i S = f x y
( , )
( 0.5 , 0.5 ) 2 1 S f x h y hS i i = + +
y y h S i i = + + school.edhole.com
1/ 2 2 2
27. 5. Compute a revised estimate of the slope S3 at mid-interval.
6. Estimate y at the end of the interval.
7. Estimate the slope S4 at the end of the interval
8. Estimate yi+1 again.
8-27
( 0.5 , 0.5 ) 3 2 S f x h y hS i i = + +
1 3 y y hS i i = + +
( , ) 4 3 S f x h y hS i i = + +
1 6 1 2 3 4 y y h S S S S i i = + + + + +
( 2 2 )
school.edhole.com
28. Predictor-Corrector Methods
Unless the step sizes are small, Euler’s method and
Runge-Kutta may not yield precise solutions.
The Predictor-Corrector Methods iterate several times
over the same interval until the solution converges to
within an acceptable tolerance.
Two parts: predictor part and corrector part.
8-28
school.edhole.com
29. Euler-trapezoidal Method
Euler’s method is the predictor algorithm.
The trapezoidal rule is the corrector equation.
Eluer formula (predictor):
,*
y = y + h dy +
i 1, j i ,*
dx
i
Trapezoidal rule (corrector):
y y h dy
+ = + +
dy
[ ]
2 ,* 1, 1
i 1, j i ,*
dx
i i j
+ -
dx
The corrector equation can be applied as many times as
necessary to get convergence.
8-29
school.edhole.com
30. Example 8-6: Euler-trapezoidal Mehtod
dy
Problem: = x y such that y = 1 at x = 1
dx
The initial (predictor) estimate for at 1.1 is
= =
1 1 1
é
dy
y y 0.1
dy
1 0.1(1) 1.1
1,0
0,0
0,0
1,0 0,*
= + =
ù
úû
êë
= +
=
y
dx
dx
y x
8-30
The corrector equation is used to improve the estimate :
1.1 1.1 1.15369
school.edhole.com
1,0
= =
dy
dx
31. 8-31
[ ]
[ ]
1 0.1
é
y y h dy
= + +
= =
ù
dy
1.1 1.10768 1.15771
1 0.1
é
dy
y y h dy
= + +
dy
= =
ù
1.1 1.10789 1.15782
1 0.1
[1 1.15782] 1.10789
2
dy
y y h dy
2
1 1.15771 1.10789
2
2
1 1.15369 1.10768
2
2
dy
0,0 1,2
1,1
1,2
1,3 0,*
0,0 1,1
1,2 0,*
0,0 1,0
1,1 0,*
ù
= + + = úû
êë é
= + +
= + + = úû
êë
= + + = úû
êë
dx
dx
dx
dx
dx
dx
dx
dx
y y y x
= =
Since , converges to 1.10789 at 1.1.
1,3 1,2
y =
y
And we have .
1,* 1,3
school.edhole.com
32. 8-32
=
For the estimate of at 1.2, the predictor equation :
y y h dy
2,0 1,* 1,* = + = + =
1.10789 0.1(1.15782) 1.22367
dx
y x
The corrector equation :
= =
1.2 1.22367 1.32744
ù
dy
y y h dy
= + +
dy
[ ]
2
é
1.10789 0.1
= + + =
1.15782 1.32744 1.23215
2
1.2 1.23215 1.33203
2,1
2,2
1,* 2,1
2,1 1,*
= =
úû
êë
dy
dx
dx
dx
dx
school.edhole.com
33. 8-33
y y h dy
= + +
dy
dx
1,* 2,2
ù
úû
[ ]
2
2,2 1,*
é
êë
dx
1.10789 0.1
= + + =
1.15782 1.33203 1.23238
2
= =
1.2 1.23238 1.33215
dy
dx
y y h dy
= + +
dy
dx
1,* 2,3
ù
úû
[ ]
2
2,3
2,3 1,*
é
êë
dx
1.10789 0.1
= + + =
1.15782 1.33215 1.23239
2
Again, the corrector algorithm converges in three iterations.
=
y x
The estimate of at 1.2 is 1.23239.
school.edhole.com
34. Milne-Simpson Method
Milne’s equation is the predictor euqation.
The Simpson’s rule is the corrector formula.
Milne’s equation (predictor):
y y 4
h dy
dy
+ - = + - +
dy
i i dx
i i i
For the two initial sampling points, a one-step
method such as Euler’s equation can be used.
Simpsos’s rule (corrector):
8-34
[2 2 ]
3
,* 1,* 2,*
1,0 3,*
- -
dx
dx
dy
y y h dy
+ - = + + +
dy
[ 4 ]
3 1, ,* 1,*
i 1, j i 1,*
dx
dx
i j i i
+ -
dx
school.edhole.com
35. Example 8-7: Milne-Simpson Mehtod
x y y x
= = =
dy
Problem: such that 1 at 1
y x x
= =
dx
We want to estimate at 1.3 and 1.4.
Assume that we have the following values,
obtained from the Euler-trapezoidal method
in Example 8-6.
dy
x y dx
8-35
1 1 1
1.1 1.10789 1.15782
1.2 1.23239 1.33215
school.edhole.com
36. To compute the initial (predictor) estimate for at 1.3 ,
Euler's method can be used :
y y hdy
= + = + =
1.23239 0.1(1.33215) 1.36560
1.3 1.36560 1.51917
3,0
2,*
3,0 2,*
= =
=
dy
dx
dx
y x
8-36
The corrector formular :
4
ù
dy
dy
[ ]
y y 0.1
dy
1.10789 0.1
= + + +
1.37474
1.51917 4(1.33215) 1.15782
3
3
3,0 2,* 1,*
3,1 1,*
=
úû
êë é
= + + +
dx
dx
dx
school.edhole.com
37. 8-37
= =
1.3 1.37474 1.52424
[ ]
1.10789 0.1
= + + +
=
= =
1.3 1.37491 1.52434
[ ]
1.10789 0.1
= + + +
1.37492
1.52434 4(1.33215) 1.15782
3
1.37491
1.52424 4(1.33215) 1.15782
3
3,1
3,2
3,2
3,3
=
dy
dx
y
dy
dx
y
The computations for x=1.3 are complete.
school.edhole.com
38. The Milne predictor equation for estimating y at x=1.4:
8-38
y y 4
h dy
ù
é
dy
= + - +
dy
( ) [ ( ) ( )]
1 4 0.1
= + - +
1.53762
2 1.52434 1.33215 2 1.15782
3
2 2
3
3,* 2,* 1,*
4,0 0,*
=
úû
êë
dx
dx
dx
The corrector formular:
1.4 1.53762 1.73610
4,1
= =
dy
dx
school.edhole.com
39. 8-39
dy
y y h dy
= + + +
4
ù
úû
dy
[ ( ) ]
3
é
êë
1.23239 0.1
= + + +
1.53791
1.73601 4 1.52434 1.33215
3
=
= =
1.4 1.53791 1.73617
[ ( ) ]
1.23239 0.1
1.73617 4 1.52434 1.33215 1.53791
3
Then it is complete.
4,2
4,2
4,0 3,* 2,*
4,1 2,*
= + + + =
dy
dx
y
dx
dx
dx
school.edhole.com
40. Least-Squares Method
The procedure for deriving the least-squares
function:
1. Assume the solution is an nth-order polynomial:
2. Use the boundary condition of the ordinary
differential equation to evaluate one of (bo,b1,b2,
…,bn).
3. Define the objective function:
8-40
n
x ny = b + b + b x2 ++ b x
0 1 2 ˆ
x = ò 2
F e dx
dy
dx
e = dy - ˆ
where
dx
school.edhole.com
41. 4. Find the minimum of F with respect to the unknowns
(b1,b2, b3,…,bn) , that is
F = 2 e ¶
e
0
¶
dx
b
b
5. The integrals in Step 4 are called the normal
equations; the solution of the normal equations yields
value of the unknowns (b1,b2, b3,…,bn).
8-41
ò =
¶
¶
all x
i i
school.edhole.com
42. Example 8-8: Least-squares Method
xy y x
dy
= = =
Problem: such that 1 at 0
Solve it for the interval 0 x 1.
Analytical solution :
y ex
2 / 2 dx
=
£ £
8-42
• First, assume a linear model is used:
y = b +
b x
0 1
Using the boundary condition
ˆ 1 (0)
y = = b +
b
yields 1. Thus the linear model is
y = +
b x
1
1
0
0 1
ˆ 1
ˆ
ˆ
b
dy
dx
b
=
=
school.edhole.com
43. 8-43
e = b - xy = b - x +
b x
e de
x
de
x x
ò ò
dx b x b x x dx
= - + - =
x
) 0
(1 )
The error function :
= -
db
0 0
b x x b x x b x
3 4 5
2
1
2
(
2 2[ (1 )](1 ) 0
0
5
1
3 4
1
2
1
2
1 1
1
2
1
1 1 1
- - + + =
db
£ £
Since we are interested in the range 0 1, solve the
above integral with 1, we get b . Thus,
y x
x
x
15
32
15
32
1
ˆ 1
= +
= =
school.edhole.com
44. 8-44
x True y Value Numerical y Value Error (%)
y = ex2 / 2 y ˆ = 1+ 15
x 32
0 1. 1. -
0.2 1.0202 1.0938 7.2
0.4 1.0833 1.1875 9.6
0.6 1.1972 1.2812 7.0
0.8 1.3771 1.3750 0.0
1.0 1.6487 1.46688 -10.9
school.edhole.com
45. Next, to improve the accuracy of estimates, a
quadratic model is used:
8-45
ˆ
y = b + b x +
b x
2
0 1 2
Using the boundary condition
ˆ 1 (0) (0 )
y = = b + b +
b
=
0 1 2
yields 1.
0
b b x
dy
= +
2
1 2
The error function is
2
e = b + b x - xy = b + b x - x + b x +
b x
2 2 (1 )
b x b x x x
dx
b
= - + - -
(1 ) (2 )
ˆ
3
2
2
1
2
1 2 1 2 1 2
school.edhole.com
46. 8-46
= -
1
e
[ ( ) ( ) ]( )
b x b x x x x dx
- + - - - =
1 2 1 0
b x b x b x b x x b x b x x
=
¶
ò
é
x
Using 1 as the upper limit :
1
4
5
12
8
15
0
4 2 5 6 4
3
3
2
1 2
0
6 4
2
5
1
4 2
2 2
2
3
1
1
0
3 2
2
2
1
2
1
+ =
ù
= úû
êë
- + - - + + +
¶
b b
x
b
x
x
school.edhole.com
47. 8-47
x x
= -
[ ( ) ( ) ]( )
b x b x x x x x dx
e
¶
ò
b
- + - - - =
2 1 2 2 0
b x b x b x b x x b x b x x
x
=
é
Using 1 as the upper limit :
7
15
b 71
b
+ =
105
9
20
b b
= - =
We get 0.14669 and 0.78776.
2
0
1 2
1 2
0
7 5
2
5
1
5 2
2
4
2
4
2 1
1
3 3
2
2
1
3
2
ˆ 1 0.14669 0.78776
0
3 5 7 5
2
5
4
3
4
4
2
2
y x x
x
x
= - +
ù
= úû
êë
- + - - + + +
¶
school.edhole.com
48. 8-48
x True y Value Numerical y Value Error (%)
y = ex2 / 2 yˆ = 1- 0.14669x + 0.78776x2
0 1. 1. -
0.2 1.0202 1.0022 -1.8
0.4 1.0833 1.0674 0.0
0.6 1.1972 1.1956 0.0
0.8 1.3771 1.38668 0.0
1.0 1.6487 1.6411 0.0
school.edhole.com
49. Galerkin Method
ò = =
w edx i n
w
0 1,2...
where is a weighting factor.
i
x i
For the least squares method,
Example: Galerkin Method
w = ¶
e
b
i
i
¶
The same problem as Example 8-8.
Use the quadratic approximating equation.
8-49
Let and 2.
1 2 w = x w = x
school.edhole.com
50. 8-50
b x b x x x xdx
- + - - =
[ (1 ) (2 ) ] 0
b x b x x x x dx
- + - - =
[ (1 ) (2 ) ] 0
ò
We get the following normal equations :
2
7
b b
+ =
1 2
15
1
b b
+ =
1 2
1
0
3 2
2
2
1
1
0
3
2
2
1
1
3
1
4
3
1
12
2
15
The final result :
ˆ 1 0.26316 0.85526
y = - x +
x
ò
school.edhole.com
51. Table: Example for the Galerkin method
x True y value Numerical y value Error
(%)
y = ex2 / 2 yˆ = 1- 0.26316x + 0.85526x2
0 1. 1. --
0.2 1.0202 0.9816 0.0
0.4 1.0833 1.0316 0.0
0.6 1.1972 1.1500 0.0
0.8 1.3771 1.3368 0.0
1.0 1.6487 1.5921 0.0
8-51
school.edhole.com
52. Higher-Order Differential Equations
Second order differential equation:
2
d y , , 2
f x y dy
= æ
ö çè
÷ø
dx
dx
Transform it into a system of first-order differential
equations.
dy
dx
( , , )
y y y dy
dx
y
dy
dy
dx
f x y y
dx
= = =
=
=
1
1 2
2
1
1 2
2
where and
8-52
school.edhole.com
53. In general, any system of n equations of the following
type can be solved using any of the previously
discussed methods:
8-53
( , , ,... )
n
( , , ,... )
n
( , , ,... )
3 1 2
( , , ,... )
1 2
3
2 1 2
2
1 1 2
dy
1
n n
n
n
f x y y y
dy
dy
dy
dx
f x y y y
dx
f x y y y
dx
f x y y y
dx
=
=
=
=
school.edhole.com
54. Example: Second-order Differential Equation
8-54
2 10 Problem: = = -
d Y X X
2
EI
M
EI
dX
2
It can be transformed into :
M
= = -
Z
dZ
dY
dX
X X
EI
EI
dX
=
10
2
EI X Y Z
= = = = -
Assume 3600 at 0, 0 and 0.02314
Use Euler's method to solve the following equations :
Z = Z +
f ( X , Y , Z )
h
i +
i i i i
1 2
= +
Y Y f ( X , Y , Z )
h
i +
1 i 1
i i i
school.edhole.com
55. Table: Second-order Differential Equation
Using a Step Size of 0.1 Ft
X
(ft)
Y
(ft)
Exact Z Exact Y
(ft)
dZ
Z = dY
0 0 -0.0231481 0 -0.0231481 0
0.1 0.000275 -0.0231481 -0.0023148 -0.0231344 -0.0023144
0.2 0.0005444 -0.0231206 -0.0046296 -0.0230933 -0.004626
0.3 0.0008083 -0.0230662 -0.0069417 -0.0230256 -0.0069321
0.4 0.0010667 -0.0229854 -0.0092483 -0.0229319 -0.0092302
0.5 0.0013194 -0.0228787 -0.0115469 -0.0228125 -0.0115177
0.6 0.0015667 -0.0227468 -0.0138347 -0.0226681 -0.0137919
0.7 0.0018083 -0.0225901 -0.0161094 -0.0224994 -0.0160505
0.8 0.0020444 -0.0224093 -0.0183684 -0.0223067 -0.018291
0.9 0.002275 -0.0222048 -0.0206093 -0.0220906 -0.020511
8-55
dX
dX
school.edhole.com
56. Table: Second-order Differential Equation
Using a Step Size of 0.1 Ft (continued)
X
(ft)
Y
(ft)
Exact Z Exact Y
(ft)
dZ
Z = dY
1 0.0025 -0.0219773 -0.0228298 -0.0218519 -0.0227083
2 0.0044444 -0.0185565 -0.0434305 -0.0183333 -0.04296663
3 0.0058333 -0.0134412 -0.0298019 -0.0131481 -0.0588194
4 0.0066667 -0.007187 -0.0704998 -0.0068519 -0.0688889
5 0.0069444 -0.0003495 -0.0746352 0.00000000 -0.071228
6 0.0066667 0.0065157 -0.0718747 0.0068519 -0.0688889
7 0.0058333 0.0128532 -0.06244066 0.0131481 -0.0588194
8 0.0044444 0.0181074 -0.0471107 0.0183333 -0.042963
9 0.0025 0.0217227 -0.0272183 0.0278519 -0.0227083
10 0.000000 0.0231435 -0.00466523 0.0231481 0.000000
8-56
dX
dX
school.edhole.com