User:Egm4313.s12.team4.friedman/R2

=Problem 2.2=

Problem Statement
Find and plot the solution for L2-ODE-CC (2.2.1) with the given initial conditions (2.2.2, 2.2.3) and excitation function (2.2.4).


 * {| style="width:100%" border="0"

$$\displaystyle y'' - 10y' + 25y = r(x)$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.1)
 * }

Initial conditions:
 * {| style="width:100%" border="0"

$$\displaystyle y(0) = 1$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.2)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle y'(0) = 0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.3)
 * }

No excitation:
 * {| style="width:100%" border="0"

$$\displaystyle r(x) = 0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.4)
 * }

Solution
Using the following:


 * {| style="width:100%" border="0"

$$\displaystyle {y}'=\frac{dy}{dx}$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.5)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle {y}''=\frac{d^{2}y}{dx^{2}}$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.6)
 * }

The given equation can be rewritten as follows, using (2.2.5) and (2.2.6):
 * {| style="width:100%" border="0"

$$\displaystyle \frac{d^{2}y}{dx^{2}}-10\frac{dy}{dx}+25y=0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.7)
 * }

Substituting
 * {| style="width:100%" border="0"

$$\displaystyle D= \frac{d}{dx}$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.8)
 * }

The ODE can be expressed as follows:
 * {| style="width:100%" border="0"

$$\displaystyle (D^{2}-10 D+25)y=0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.9)
 * }

Solving
 * {| style="width:100%" border="0"

$$\displaystyle D^{2}-10 D+25=0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.10)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle (D-5)^{2}=0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.11)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle D=5,5$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.12)
 * }

The general solution for this problem is :


 * {| style="width:100%" border="0"

$$\displaystyle y=(c_1 + c_2 x) e^{5 x}$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.13)
 * }

Use initial condition (2.2.2) to find the particular solution,
 * {| style="width:100%" border="0"

$$\displaystyle y(0) = 1 = (c_1 + c_2 (0)) e^0$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.14)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle c_1 = 1$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.15)
 * }

Find the derivative to apply the second initial condition (2.2.3).
 * {| style="width:100%" border="0"

$$\displaystyle y' = 5 c_1 e^{5 x} + 5 c_2 x e^{5 x} + c_2 e^{5 x}$$
 * style="width:95%" |
 * style="width:95%" |
 * (2.2.16)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle y'(0) = 0 = 5 (1) e^0 + 5 c_2 (0) e^0 + c_2 e^0$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.2.17)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle 0 = 5 + c_2$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.2.18)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle c_2 = -5$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.2.19)
 * }

The solution to the initial value problem:
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.2.20)
 * }

Plot of the solution:
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.2.21)
 * }

=Problem 2.9=

Problem Statement
Find and plot the solution for the L2-ODE-CC corresponding to (2.9.1).

In another figure, superpose 3 figures: (a) this figure, (b) the solution to Problem 1, (c) the solution to Problem 6.


 * {| style="width:100%" border="0"

$$\displaystyle \lambda^2 + 4 \lambda + 13 = 0$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.1)
 * }

Initial conditions:
 * {| style="width:100%" border="0"

$$\displaystyle y(0) = 1$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.2)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle y'(0) = 0$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.3)
 * }

No excitation:
 * {| style="width:100%" border="0"

$$\displaystyle r(x) = 0$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.4)
 * }

Solution to R2.1:
 * {| style="width:100%" border="0"

$$\displaystyle y = \frac{5}{7} e^{-2 x} + \frac{2}{7} e^{5 x}$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.a)
 * }

Solution to R2.6:
 * {| style="width:100%" border="0"

$$\displaystyle y = e^{-3 x} (c_1 + c_2 x)$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.b)
 * }

Solution
Equation (2.9.1) corresponds to the following differential equation:


 * {| style="width:100%" border="0"

$$\displaystyle y'' + 4 y' + 13 = 0$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.5)
 * }

To find the solution, solve for $$\displaystyle \lambda$$ using the quadratic formula:
 * {| style="width:100%" border="0"

$$\displaystyle \lambda = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.6)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle \lambda = \frac{-4 \pm \sqrt{4^2 - 4 \cdot 1 \cdot13}}{2 \cdot 1}$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.7)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle \lambda = -2 \pm 3i$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.8)
 * }

This leads to a general solution of


 * {| style="width:100%" border="0"

$$\displaystyle y = e^{-2 x} (c_1 \cos 3 x + c_2 \sin 3 x)$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.9)
 * }

Use initial condition (2.9.2) to find the particular solution,


 * {| style="width:100%" border="0"

$$\displaystyle y(0) = 1 = e^0 (c_1 \cos 0 + c_2 \sin 0)$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.10)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle c_1 = 1$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.11)
 * }

Find the derivative to apply the second initial condition (2.9.3).


 * {| style="width:100%" border="0"

$$\displaystyle y' = e^{-2 x} (c_2 \cos 3 x - c_1 \sin 3 x) - 2 e^{-2x} (c_1 \cos 3 x + c_2 \sin 3 x)$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.12)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle y'(0) = 0 = e^0 (c_2 \cos 0 - \sin 0) - 2 e^0 (\cos 0 + c_2 \sin 0)$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.13)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle 0 = c_2 - 2$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.14)
 * }


 * {| style="width:100%" border="0"

$$\displaystyle c_2 = 2$$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.15)
 * }

The solution to the initial value problem:


 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.16)
 * }

Plot of the solution (2.9.16):
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.17)
 * }

Plot of the solution (2.9.16), plot of (2.9.a), and plot of (2.9.b).
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">(2.9.18)
 * }