# Differential Equations : Numerical Solutions of Ordinary Differential Equations

## Example Questions

### Example Question #1 : Numerical Solutions Of Ordinary Differential Equations

Use Euler's Method to calculate the approximation of  where  is the solution of the initial-value problem that is as follows.

Explanation:

Using Euler's Method for the function

first make the substitution of

therefore

where  represents the step size.

Let

Substitute these values into the previous formulas and continue in this fashion until the approximation for  is found.

Therefore,

### Example Question #1 : Numerical Solutions Of Ordinary Differential Equations

Approximate  for  with time steps  and .

Explanation:

Approximate  for  with time steps  and .

The formula for Euler approximations .

Plugging in, we have

Here we can see that we've gotten trapped on a horizontal tangent (a failing of Euler's method when using larger time steps). As the function is not dependent on t, we will continue to move in a horizontal line for the rest of our Euler approximations. Thus .

### Example Question #1 : Euler Method

Use Euler's Method to calculate the approximation of  where  is the solution of the initial-value problem that is as follows.

Explanation:

Using Euler's Method for the function

first make the substitution of

therefore

where  represents the step size.

Let

Substitute these values into the previous formulas and continue in this fashion until the approximation for  is found.

Therefore,

### Example Question #1 : Euler Method

Use the implicit Euler method to approximate  for , given that , using a time step of

Explanation:

In the implicit method, the amount to increase is given by , or in this case . Note, you can't just plug in to this form of the equation, because it's implicit:  is on both sides. Thankfully, this is an easy enough form that you can solve explicitly. Otherwise, you would have to use an approximation method like newton's method to find . Solving explicitly, we have  and .

Thus,

Thus, we have a final answer of

### Example Question #1 : Euler Method

Use two steps of Euler's Method with  on

To three decimal places

4.413

4.425

4.420

4.428

4.408

4.425

Explanation:

Euler's Method gives us

Taking one step

Taking another step

### Example Question #1 : Numerical Solutions Of Ordinary Differential Equations

The two-step Adams-Bashforth method of approximation uses the approximation scheme .

Given that  and , use the Adams-Bashforth method to approximate  for  with a step size of

Explanation:

In this problem, we're given two points, so we can start plugging in immediately. If we were not, we could approximate  by using the explicit Euler method on .

Plugging into  , we have

.

Note, our approximation likely won't be very good with such large a time step, but the process doesn't change regardless of the accuracy.

### Example Question #1 : Second Order Boundary Value Problems

Find the solutions to the second order boundary-value problem. .

There are no solutions to the boundary value problem.

Explanation:

The characteristic equation of  is , with solutions of . Thus, the general solution to the homogeneous problem is . Plugging in our conditions, we find that , so that . Plugging in our second condition, we find that  and that .

Thus, the final solution is .

### Example Question #1 : Second Order Boundary Value Problems

Find the solutions to the second order boundary-value problem. .