Solving Boundary Value Problems using ODE Solvers

The first and second order ODE solver apps solve initial value problems, but they can be used in conjuection with Goal Seek or the Solver tool to solve boundary value problems. (In an initial value problem, the conditions at the start are specified, while in a Boundary Value problem, the conditions at the start are to be found.)

This is best illustrated by an example. Let us say that we have to find y'(0) given the differential equation:

y'' + 2y' + 2y = x

If y(0) = 1 and y'(3) = 0, what is y'(0)?

To find the answer, we first set these up in the second order ODE solver, we have

a = b = 2

Range of x is from 0 to 3.

We put y(0) = 1 and guess the initial value of y' as 0.

BVP Setup

Now we pull out the value of y'(3) into the cell B18 from the table under column X, thus we have y'(3) = 0.5067.

We can use either goal seek or the solver tool to set this value to 0 by changing y'(0).

BVP Goal Seek

The goal seek tool gives us the answer: y'(0) = 8.9934.

BVP Solution

The file containing this example can be downloaded here. In this file use the Goal Seek tool to set B18 to 0 by changing B16.