5.4. Boundary value problems exercises#

Answer the following exercises based on the content from this chapter. The solutions can be found in the appendices.

Exercise 5.1

Determine which of the following BVPs have a unique solution

(a)   \(y'' = - \dfrac{4}{t} y' + \dfrac{2}{t^2 } y - \dfrac{2\ln (t)}{t^3 }, \qquad y(1) = 1/2, \qquad y(2) = \ln (2)\);

(b)   \(y'' = e^t + y\cos(t) - (t + 1) y', \qquad y(0) = 1, \qquad y(2) = \ln(3)\);

(c)   \(y'' = (t^3 + 5)y + \sin(t), \qquad y(0) = 0,\qquad y(1) = 1\);

(d)   \(y'' = (5y + \sin(3t)) e^t, \qquad y(0) = 0,\qquad y(1) = 0\).

Exercise 5.2

Consider the following boundary value problem

\[ y'' = 2t, \qquad y(0) = 1, \qquad y(2) = 3. \]

Using a pen and calculator, calculate the Euler method solutions using a step length of \(h=0.4\) and guess values of \(y'(0) = 1\) and \(y'(0) = -1\).

Exercise 5.3

Use the Secant method to calculate the next value of \(s\) for your solutions to the boundary value problem in Exercise 5.2 and hence calculate the Euler method using this new guess value.

Exercise 5.4

Calculate the solution of the boundary value problem in Exercise 5.2 using the finite-difference method with a step length \(h=0.4\).

Exercise 5.5

The exact solution to the boundary value problem in Exercise 5.2 is \(y = \frac{1}{3} t^3 - \frac{1}{3} t + 1\). Write a Python or MATLAB program to perform the numerical calculations for Exercise 5.3 and Exercise 5.4 and produce a plot of the numerical solutions and the exact solutions on the same set of axes. Comment on your plot.