BIT203 · 2078 · 10 marks
What do you mean by boundary value problem? Use shootuing method, solve the equation: y'' = 6x², with y(0) = 1 and y(1) = 2 in the interval (0, 1) for y(0.5) taking h = 0.5
What do you mean by boundary value problem? Use shootuing method, solve the equation: y'' = 6x², with y(0) = 1 and y(1) = 2 in the interval (0, 1) for y(0.5) taking h = 0.5[10]
Boundary Value Problem and Shooting Method
Given
- ODE: $y'' = 6x^2$
- Boundary conditions: $y(0) = 1$, $y(1) = 2$
- Interval: $(0, 1)$
- Step size: $h = 0.5$
- Required: $y(0.5)$
Boundary Value Problem (Definition)
A boundary value problem (BVP) is a differential equation together with conditions specified at two or more different points (the boundaries of the domain), rather than all at a single point.
General second order form: $$y'' = f(x, y, y'), \quad a \le x \le b, \quad y(a) = \alpha, \ \ y(b) = \beta$$
Shooting Method (Idea)
The shooting method converts a BVP into an initial value problem (IVP) by guessing the unknown initial slope $y'(0) = t$, integrating forward, and adjusting $t$ until the far boundary condition $y(b) = \beta$ is met. Since this ODE is linear, only two trial slopes (or the decomposition method) are needed, and the correct $t$ follows by linear interpolation.
Solution
Reduce to a first-order system with $y_1 = y$, $y_2 = y'$: $$y_1' = y_2, \qquad y_2' = 6x^2$$ with $y_1(0) = 1$, $y_2(0) = t$ (unknown).
Use Euler's method, $h = 0.5$, two steps ($x = 0, 0.5, 1.0$).
Trial 1: guess $t = t_1 = 0$
| $x$ | $y_1$ | $y_2$ | $y_2'=6x^2$ |
|---|---|---|---|
| 0.0 | 1.0000 | 0.0000 | 0.0 |
| 0.5 | $1+0.5(0)=1.0000$ | $0+0.5(0)=0.0000$ | $6(0.25)=1.5$ |
| 1.0 | $1+0.5(0)=1.0000$ | $0+0.5(1.5)=0.75$ | -- |
So with $t_1 = 0$: $y(1) = 1.0000 \equiv \beta_1$
Trial 2: guess $t = t_2 = 1$
| $x$ | $y_1$ | $y_2$ | $y_2'=6x^2$ |
|---|---|---|---|
| 0.0 | 1.0000 | 1.0000 | 0.0 |
| 0.5 | $1+0.5(1)=1.5000$ | $1+0.5(0)=1.0000$ | $1.5$ |
| 1.0 | $1.5+0.5(1)=2.0000$ | $1+0.5(1.5)=1.75$ | -- |
So with $t_2 = 1$: $y(1) = 2.0000 \equiv \beta_2$
Linear interpolation for correct slope
Target $\beta = 2$. Since the ODE is linear: $$t = t_1 + (t_2 - t_1)\cdot \frac{\beta - \beta_1}{\beta_2 - \beta_1} = 0 + (1-0)\cdot\frac{2 - 1}{2 - 1} = 1$$
Thus the correct slope is $t = 1$, and Trial 2 is exactly the required solution.
Read off $y(0.5)$
From Trial 2 at $x = 0.5$: $$\boxed{y(0.5) = 1.5000}$$
Verification with Exact Solution
Integrating twice: $$y' = 2x^3 + C_1, \qquad y = \frac{x^4}{2} + C_1 x + C_2$$
Apply $y(0)=1 \Rightarrow C_2 = 1$. Apply $y(1)=2 \Rightarrow \tfrac12 + C_1 + 1 = 2 \Rightarrow C_1 = \tfrac12$.
$$y = \frac{x^4}{2} + \frac{x}{2} + 1$$
Exact value: $$y(0.5) = \frac{(0.5)^4}{2} + \frac{0.5}{2} + 1 = \frac{0.0625}{2} + 0.25 + 1 = 0.03125 + 1.25 = 1.28125$$
Note: The Euler shooting result $y(0.5) = 1.5$ differs from the exact $1.28125$. This gap is due to the very large step size $h = 0.5$ used by Euler's method (only two steps). Euler's method reproduces the correct boundary values $y(0)=1$ and $y(1)=2$ exactly because the slope-parameter interpolation is exact for the linear problem, but the intermediate point $y(0.5)$ carries the local truncation error of Euler's scheme. The method-consistent answer requested by the problem (using shooting with $h=0.5$) is:
$$y(0.5) \approx 1.5$$
while the true analytic value is $1.28125$.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.