Professional Documents
Culture Documents
Ex 1.
a) Consider the boundary-value problem:
(
y ′′ + y = 0
y(0) = 0 , y(b) = β.
Find b and β such that the problem has:
1
Review
b−a
Algorithm linear shooting: Fix ∆x = N
. Use RK4 to solve the two initial value
problems:
y ′′ = p(x)y ′ + q(x)y + r(x)
y ′′ = p(x)y ′ + q(x)y + 0
i) y(a) = α ii) y(a) = α
y (a) = 0.
′
y (a) = 1.
′
Denote by y1 and y2 (resp.) the solutions. The solution of the BVP is given by the linear
combination:
β − y1 (b)
y(x) = y1 (x) + y2 (x).
y2 (b)
3) If |y1 (b) − β| < T OL then STOP: y1 (x) is acceptable for the solution.
Else [correction initial condition] define:
y1 (b) − β
s2 = s1 − (s1 − s0 ).
y1 (b) − y0 (b)