- #1

- 185

- 4

## Homework Statement

y'' + 4y' + 4y = 0 ---- y(0) = 1, y'(0) = 5

Find the exact solution of the differential equation.

Use the exact solution and Euler's Method to compute Euler's Approximation for time t = 0 to t = 5 using a step h=0.05. Plot Euler's & Exact vs. t and plot Error vs. t. Then, answer the following question:

Is the error really increasing? That is, is Euler's method becoming less accurate as t increases?

## Homework Equations

x

_{1}= y

x

_{2}= y'

x

_{1}' = y'

x

_{2}' = y'' = -4y' - 4y = -4x

_{2}- 4

_{1}

Euler's Method Equations assuming the substitutions made above:

x

_{1(n+1)}= x

_{1(n)}+ hx

_{/2(n)}

x

_{2(n+1)}= x

_{2(n)}+ h*(y''

_{(n)})

## The Attempt at a Solution

[/B]

First, I solved the differential equation. Writing the characteristic equation r

^{2}+ 4r + 4 = 0, I solved for there to be a repeated root at r = -2. Therefore, the general solution is:

y= c

_{1}e

^{-2t}+ c

_{2}te

^{-2t}

Taking a derivative to use the initial conditions:

y' = -c

_{1}/2 * e

^{-2t}+ c

_{2}te

^{-2t}/2 + c

_{2}e

^{-2t}

Applying the initla conditions, I find c

_{1}= 1 and c

_{2}= 11/2

Therefore, the solution becomes:

e

^{-2t}+ 11t/2 * e

^{-2t}

I then created an excel spreadsheet which calculate and then plots the exact solution vs. the eulerapproximation, giving me the graph:

then the error graph looks as follows:

So around time t = 3, it makes sense that the error would be about 0 due to how Euler approximations work. Since Euler Approximations use the tangent lines of the functions at a certain point to approximate the shape of the graph, the more and more linear the solution gets (such as from t --> infinity in this solution), the easier it is to approximate the solution because the slope of a horizontal line is 0. However, I have absolutely no idea what could be going on here that would cause the error to start increasing seemingly linearly after time t = 3 where the solution and the euler approximation is practically horizontal. I cannot fathom that a repeated root would cause this error. Does anyone have any idea what could be causing this?

Thanks in advance.