User:Egm4313.s12.team8.tclamb/R3

=Problem R3.2 - Perturbation method for double real roots=

Problem Statement
Develop the 2nd homogeneous solution for the case of double real root as a limiting case of distinct roots. Consider two distinct real roots of the form:
 * $$\displaystyle \lambda_1 = \lambda, \ \ \lambda_2 = \lambda + \epsilon$$

1. Find the homogeneous L2-ODE-CC having the above distinct roots

2. Show that the following is a homogeneous solution:
 * $$\displaystyle \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon}$$

3. Find the limit of the homogeneous solution in part 2 as $$\displaystyle \epsilon \to 0$$

4. Take the derivative of $$\displaystyle e^{\lambda x}$$ with respect to $$\displaystyle \lambda$$

5. Compare the results in parts 3 and 4, and relate to the result by variation of parameters.

6. Numerical experiment: Compute the homogeneous solution in part 2 using $$\displaystyle \lambda = 5, \ \ \epsilon = 0.001$$, and compare to the value obtained from the exact 2nd homogeneous solution.

Find the homogeneous L2-ODE with two distinct roots
Starting from the characteristic equation of a homogeneous L2-ODE-CC with two distinct roots:
 * $$\displaystyle (r - \lambda_1) (r - \lambda_2) = 0$$

Substitute in given roots:
 * $$\displaystyle (r - \lambda) (r - (\lambda + \epsilon)) = 0$$

Expand:
 * $$\displaystyle r^2 - (2 \lambda + \epsilon) r + (\lambda^2 + \lambda \epsilon) = 0$$

Multiply by $$\displaystyle y$$ and substitute $$r = \displaystyle \frac{d}{d x}$$: $$\displaystyle y'' - (2 \lambda + \epsilon) y' + (\lambda^2 + \lambda \epsilon) y = 0$$

Verify a solution
Take derivatives of solution:
 * $$\displaystyle \begin{align}

y  &= \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon} \\ y' &= \frac{(\lambda + \epsilon) e^{(\lambda + \epsilon) x} - \lambda e^{\lambda x}}{\epsilon} \\ &= e^{(\lambda + \epsilon) x} + \lambda \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon} \\ &= e^{(\lambda + \epsilon) x} + \lambda y \\ y'' &= (\lambda + \epsilon) e^{(\lambda + \epsilon) x} + \lambda y' \\ &= (\lambda + \epsilon) e^{(\lambda + \epsilon) x} + \lambda (e^{(\lambda + \epsilon) x} + \lambda y) \\ &= (2\lambda + \epsilon) e^{(\lambda + \epsilon) x} + \lambda^2 y \end{align}$$

Substitute in $$y$$, $$y'$$, and $$y''$$ to L2-ODE-CC:
 * $$\displaystyle \left((2\lambda + \epsilon) e^{(\lambda + \epsilon) x} + \lambda^2 \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon}\right) - (2 \lambda + \epsilon) \left(e^{(\lambda + \epsilon) x} + \lambda \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon}\right) + (\lambda^2 + \lambda \epsilon) \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon} = 0$$

Simplify: $$\displaystyle 0 = 0$$

Find limit of solution
Write limit as $$\displaystyle \epsilon \to 0$$:
 * $$\displaystyle \lim_{\epsilon \to 0} \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon}$$

Use L'Hôpital's Rule to evaluate the limit: $$\displaystyle \begin{align} &\lim_{\epsilon \to 0} \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon} \\ &= \lim_{\epsilon \to 0} \frac{x e^{(\lambda + \epsilon) x}}{1} \\ &= x e^{\lambda x} \end{align}$$

Take derivative of solution
$$\displaystyle \frac{d}{d \lambda}e^{\lambda x} = x e^{\lambda x}$$

Compare results
The results from evaluating the limit and taking the derivative are equivalent.

By variation of parameters, since $$\displaystyle e^{\lambda x}$$ is a homogeneous solution, we use the modification rule to obtain the second solution $$\displaystyle x e^{\lambda x}$$, which is also equivalent.

Numerical experiment
Evaluate exact and approximate solution at $$\displaystyle\lambda = 5, \ \ \epsilon = 0.001$$: $$\displaystyle \begin{align} x e^{\lambda x} &= x e^{5 x} \\ \frac{e^{(\lambda + \epsilon) x} - e^{\lambda x}}{\epsilon} = \frac{e^{5.001 x} - e^{5 x}}{0.001} &= 1000 (e^{5.001 x} - e^{5 x}) \end{align}$$

This graph of the percent error of the approximate solution shows strong agreement between the approximate and exact solutions, increasing linearly with x.