Lab 12 (1/11/2017)


In this lab, we will continue implementing ways of solving ordinary differential equations. We shall implement Finite difference and Shooting methods for solving Boundary Value Problems. $$ \frac{d^2y}{dx^2} + f(x) = 0 $$ with two boundary conditions given by $y(0) = A, y(1) = B$. Read Pages 48 - 51 of
Jeffrey R. Chasnov. Introduction to Numerical Methods for details.

Problems

  1. Solve: $y^\prime(x) + 4y = 0, ~~~y(0) = -2, y(\pi/4) = 10$. What happens if we change the second boundary condition to $y(2\pi) = -2$?
  2. Use Shooting method to solve $$ \frac{d^2y}{dx^2} + \frac{1}{x}\frac{dy}{dx} - \frac{y}{x^2} = 0$$ with $y(5) = 0.003873, y(8) = 0.003070$.