Beruflich Dokumente
Kultur Dokumente
10
Problems proposed in the course of Math-III
Civil Engineering
1. M-file. RK1. Use Euler’s explicit method to obtain a six decimal approximation of the indicated
′
value y = f (x, y), y(a) = α, a ≤ x ≤ b.
Algorithm for the Euler’s explicit method:
(a) Solve by hand using h = 0.1. (b) Write a Matlab program in a script file that solves the equation
using h = 0.05 (c) Use the program from part (b) to solve the equation using h = 0.01
′
a) y = 2x − 3y, y(1) = 5, find y(1.5)
′
b) y = x + y 2 , y(0) = 0, find y(0.5)
2. M-file. RK1. Use Euler’s explicit method to obtain a six decimal approximation of the indicated
value. (a) Write a Matlab program in a script file that solves the equation using h = 0.05 (b) Use
the program from part (a) to solve the equation using h = 0.01
′
a) y = y, y(0) = 1, find y(1)
′
b) y = 2xy, y(1) = 1, find y(1.5)
′
c) y = e−y , y(0) = 0, find y(0.5)
′
d ) y = xy, y(0) = 1, find y(0.5)
e) y = xy 2 − xy , y(1) = 1,
′
find y(1.5)
where (yi ) exact solution, (wi ) approximate solution, (abi ) absolute error, (rei ) relative error, (pri )
percentage error.
c
LL.
Copyright All rights reserved 1
where
∗
wi+1 = wi + hf (xi , wi )
to approximate the solutions of the following initial value problem. (a) Solve by hand using h = 0.2
by find y(1). (b) Write a Matlab program in a script file that solves the equation using h = 0.1 (c)
Use the program from part (b) to solve the equation using h = 0.01
′
a) y = te3t − 2y, y(0) = 0, analitical solution y(t) = 51 te3t − 1 3t
25
e + 1 −2t
25
e
′
b) y = cos 2t + sin 3t, y(0) = 1, analitical solution y(t) = 12 sin 2t − 1
3
cos 3t + 43 .
4. M-file. Use RK4 method to obtain a six decimal approximation of the indicated value. (a) Solve
by hand using h = 0.1 (b) Write a Matlab program in a script file that solves the equation using
h = 0.01
′
a) y = 2x − 3y + 1, y(1) = 5, y(1.5)
′
b) y = 1 + y 2, y(0) = 0, y(0.5)
′
c) y = x2 + y 2, y(0) = 1, y(0.5)
′ √
d ) y = xy + y, y(0) = 1, y(0.5)
k1 = f (xi , yi )
1 1
k2 = f (xi + h, yi + k1 h)
2 2
1 1
k3 = f (xi + h, yi + k2 h)
2 2
k4 = f (xi + h, yi + k3 h)
c
LL.
Copyright All rights reserved 2