User:Egm4313.s12.team8/R3

=R3.1 - Solution to a non-homogeneous ODE=

Problem Statement
Consider the same system as in the Example p.7-3, i.e., with the same L2-ODE-CC (4) p.5-5 and initial conditions (2) p.3-4, but with the following excitation:
 * $$r(x)\;=\;7e^{5x}\,-\,2x^2$$

(4) p.5-5: $$y''\,-\,10y'\,+\,25\;=\;r(x)$$

(2) p.3-4: $$\displaystyle y(0) = 4\text{, }y'(0) = -5$$

Find the homogeneous solution
Solve the characteristic equation:
 * $$\left(\lambda - 5\right)^2 = 0$$


 * $$\displaystyle\lambda = 5$$

The homogeneous solution is then:
 * $$\displaystyle y_h(x) = K_1 e^{5x} + K_2 x e^{5x}$$

Find the particular solution
Following the sum and modification rule from p.7-2:
 * $$\begin{align}

7e^{5x} &\Rightarrow C_1 x^2 e^{5x} \\ -2x^2 &\Rightarrow C_2 x^2 + C_3 x + C_4 \end{align}$$

By the sum rule:
 * $$\displaystyle y_p(x) = C_1 x^2 e^{5x} + C_2 x^2 + C_3 x + C_4$$

Taking derivatives:
 * $$\begin{align}

y'_p(x) &= C_1 e^{5x} \left(5 x^2 + 2 x\right) + 2 C_2 x + C_3 \\ y''_p(x) &= C_1 e^{5x} \left(5\left(5 x^2 + 2 x\right) + 10 x + 2\right) + 2 C_2 \\ &= C_1 e^{5x} \left(25 x^2 + 20 x + 2\right) + 2 C_2 \end{align}$$

Substitute particular solution and its derivatives into the original ODE:
 * $$\begin{align}

&\left(C_1 e^{5x} \left(25 x^2 + 20 x + 2\right) + 2 C_2\right) \\ - 10 &\left(C_1 e^{5x} \left(5 x^2 + 2 x\right) + 2 C_2 x + C_3\right) \\ + 25 &\left(C_1 x^2 e^{5x} + C_2 x^2 + C_3 x + C_4\right) \\ &= 7 e^{5x} - 2 x^2 \end{align}$$

Reduce:
 * $$2 C_1 e^{5x} + 25 C_2 x^2 + \left(-20 C_2 + 25 C_3\right) x + \left(2 C_2 - 20 C_3 + 25 C_4\right) = 7 e^{5x} - 2 x^2$$

Equate coefficients from each side:
 * $$\begin{align}

2 C_1 &= 7 \\ 25 C_2 &= -2 \\ -20 C_2 + 25 C_3 &= 0 \\ 2 C_2 - 20 C_3 + 25 C_4 &= 0 \end{align}$$

Solve for constants:
 * $$\begin{align}

C_1 &= \frac{7}{2} \\ C_2 &= -\frac{2}{25} \\ C_3 &= -\frac{8}{125} \\ C_4 &= -\frac{12}{625} \end{align}$$

Substitute in constants to find particular solution:
 * $$y_p(x) = \frac{7}{2} x^2 e^{5x} - \frac{2}{25} x^2 - \frac{8}{125} x - \frac{12}{625}$$

Finding the solution

 * $$\begin{align}

y(x) &= y_h(x) + y_p(x) \\ &= \left(K_1 e^{5x} + K_2 x e^{5x}\right) + \left(\frac{7}{2} x^2 e^{5x} - \frac{2}{25} x^2 - \frac{8}{125} x - \frac{12}{625}\right) \end{align}$$

Find the first derivative:
 * $$y'(x) = 5 K_1 e^{5x} + K_2 e^{5x} + 5 K_2 x e^{5x} + \frac{7}{2} e^{5x} \left(5 x^2 + 2 x\right) - 2 \frac{2}{25} x - \frac{8}{125}$$

Solve for constants using initial conditions:
 * $$\begin{align}

y(0) = 4 = K_1 - \frac{12}{625} &\Rightarrow K_1 = \frac{2512}{625} \\ y'(0) = -5 = 5 \frac{2512}{625} + K_2 - \frac{8}{125} &\Rightarrow K_2 = -\frac{3129}{125} \end{align}$$

Therefore: $$y(x) = \frac{2512}{625} e^{5x} - \frac{3129}{125} x e^{5x} + \frac{7}{2} x^2 e^{5x} - \frac{2}{25} x^2 - \frac{8}{125} x - \frac{12}{625}$$

=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.

=R3.3 - Solution to non-homogeneous L2-ODE-CC=

Problem Statement
Find the complete solution for $$\displaystyle y''-3y'+2y=4x^2 $$ (3.1) with the initial conditions $$\displaystyle y(0)=1,y'(0)=0 $$. Plot the solution $$\displaystyle y(x) $$.

Solution
First, we set r(x), or the right side of the given equation, equal to 0, to solve for the homogenous equation. We solve this by plugging into the quadratic formula, which gives us: $$\displaystyle \frac{3\pm \sqrt{9-4(1)(2)}}{2(1)} $$ This gives us the solutions for the roots of equation (3.1) to be $$\displaystyle \lambda _{1}=2,\lambda _{2}=1 $$ Using these roots and the fact that they are both real and positive, we know that the homogenous equation of (3.1) is equal to: $$\displaystyle y_{h}=c_{1}e^{2x}+c_{2}e^{x} $$ (3.2) The next step in this solution is to solve for the particular solution of (3.1). Using the Basic Rule and (3.2), we find that $$\displaystyle y_{p}(x)=c_{0}+c_{1}x+c_{2}x^2 $$ (3.3) We also need the first and second derivatives of (3.3), and solving for these gives us: $$\displaystyle y_{p}'(x)=c_{1}+2c_{2}x $$  (3.4) and $$\displaystyle y_{p}''(x)=2c_{2} $$   (3.5) To solve for the unknown c constants in (3.3),(3.4), and (3.5), we plug these equations into (3.1), giving us: $$\displaystyle 2c_{2}-3(c_{1}+2c_{2}x)+2(c_{0}+c_{1}x+c_{2}x^2)=(0*1)+(0*x)+4x^2 $$ Simplifying this equation... $$\displaystyle 2c_{2}-3c_{1}-6c_{2}x+2c_{0}+2c_{1}x+2c_{2}x^2=4x^2 $$   (3.6) Creating equations for the non-coefficient terms, along with the coefficients of x and x squared terms, respectively, we get: $$\displaystyle 2c_{0}-3c_{1}+2c_{2}=0 $$   (3.7) $$\displaystyle 0(c_{0})+2c_{1}-6c_{2}=0 $$  (3.8) $$\displaystyle 0(c_{0})+0(c_{1})+2c_{2}=4$$  (3.9) In matrix form of Ac=d, these would appear as: $$\displaystyle \begin{bmatrix} 2 & -3 & 2\\ 0& 2 & -6\\  0& 0 & 2 \end{bmatrix}\begin{Bmatrix} c_{0}\\c_{1} \\c_{2} \end{Bmatrix}=\begin{Bmatrix} 0\\ 0\\ 4 \end{Bmatrix}$$ Using this, we can solve for all three c constants, as shown: $$\displaystyle 2c_{2}=4 $$ which leads to $$\displaystyle c_{2}=2 $$ $$\displaystyle 2c_{1}-(6)(2)=0 $$ which leads to  $$\displaystyle 2c_{1}=12 $$ and finally $$\displaystyle c_{1}=6 $$ $$\displaystyle 2c_{0}-(3)(6)+(2)(2)=0 $$ which leads to $$\displaystyle 2c_{0}=14 $$ and finally $$\displaystyle c_{0}=7 $$ Plugging these constants back into (3.3) gives us the final particular solution of (3.1): $$\displaystyle y_{p}(x)=2x^2+6x+7 $$   (3.10) To find the general solution of (3.1), we combine the particular (3.10) and homogenous (3.2) equations to get: $$\displaystyle y(x)=2x^2+6x+7+c_{1}e^{2x}+c_{2}e^{x} $$   (3.11) To solve for the final two constants, we use the given initial conditions in (3.11) and the derivative of that, which is: $$\displaystyle y'_{p}=4x+6+2c_{1}e^{2x}+c_{2}e^{x} $$   (3.12) Using the initial conditions in (3.11) and (3.12) allows us to obtain the following: $$\displaystyle y_{p}(0)=1=7+6(0)+2(0)^2+c_{1}e^{0}+c_{2}e^{0} $$ which leads to $$\displaystyle 1=7+c_{1}+c_{2} $$ and finally gives us $$\displaystyle -6=c_{1}+c_{2} $$    (3.13) $$\displaystyle y'_{p}(0)=0=6+4(0)+2c_{1}e^{0}+c_{2}e^{0} $$ Which leads to $$\displaystyle 0=6+c_{1}+c_{2} $$ And finally comes out to $$\displaystyle -6=2c_{1}+c_{2} $$    (3.14) Solving for $$\displaystyle c_{1} $$ in equation (3.13) and plugging that into equation (3.14) allows us to solve for $$\displaystyle c_{2} $$: $$\displaystyle -6=2(-c_{2}-6)+c_{2} $$ $$\displaystyle -6=-2c_{2}+12+c_{2} $$ $$\displaystyle c_{2}=-6 $$    (3.15) Plugging (3.15) into (3.13) allows us to solve for the remaining constant: $$\displaystyle -6=c_{1}-6 $$ $$\displaystyle 0=c_{1} $$    (3.16) Plugging (3.15) and (3.16) into (3.11) gives us our final general solution of: $$\displaystyle y(x)=2x^2+6x+7-6e^{x} $$    (3.17)

=R3.4 - Verify form of particular solution=

Problem Statement
Use the Basic Rule and the Sum Rule to show that the appropriate particular solution to $$\displaystyle y''-3y'+2y=4x^2-6x^5 $$      (4.1) is of the form $$\displaystyle y_{p}(x)=\sum_{j=0}^{n}c_{j}x^{j} $$ with n=5, i.e, $$\displaystyle y_{p}(x)=\sum_{j=0}^{5}c_{j}x^{j} $$.

Solution
The Basic rule and Sum rule allow us to choose our particular y forms from table 2.1 on page 82 in the Kreyszig Advanced Engineering Mathematics book. These rules state that, using your given $$\displaystyle r(x)$$, you can find what $$\displaystyle y_{p}(x) $$ you should choose to use. From (4.1), we know that: $$\displaystyle r(x)=4x^2-6x^5 $$     (4.2) Referring to table 2.1, and knowing that the Basic rule tells us that we can match up the form of our $$\displaystyle r(x)$$ to one in the table, and use the $$\displaystyle y_{p}(x) $$ accordingly, we find the following two equations: The $$\displaystyle y_{p}(x) $$ for $$\displaystyle 4x^{2} $$ is: $$\displaystyle k_{2}x^{2}+k_{1}x^{1}+k_{0} $$     (4.3) And the $$\displaystyle y_{p}(x) $$ for $$\displaystyle 6x^{5} $$ is: $$\displaystyle K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x^{1}+K_{0} $$     (4.4) The sum rule tells us that we are able to add these equations, (4.3) and (4.4), to obtain a final solution for $$\displaystyle y_{p}(x) $$. The solution for this is as follows: $$\displaystyle k_{2}x^{2}+k_{1}x^{1}+k_{0} +K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x^{1}+K_{0} $$ Adding similar variables gives us: $$\displaystyle K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+(K_{2}+k_{2})x^2+(K_{1}+k_{1})x^1+(K_{1}+k_{0}) $$    (4.5) Since these k and K values are just constants, we can set: $$\displaystyle K_{5}=c_{5} $$ $$\displaystyle K_{4}=c_{4} $$ $$\displaystyle K_{3}=c_{3} $$ $$\displaystyle (K_{2}+k_{2})=c_{2} $$ $$\displaystyle (K_{1}+k_{1})=c_{1} $$ $$\displaystyle (K_{1}+k_{0})=c_{0} $$ Our FINAL solution for the $$\displaystyle y_{p}(x) $$ of (4.1) is: $$\displaystyle y_{p}(x)=c_{5}x^{5}+c_{4}x^{4}+c_{3}x^{3}+c_{2}x^{2}+c_{1}x^{1}+c_{0} $$    (4.6) And, as was the original problem statement, equation (4.6) is of the form: $$\displaystyle y_{p}(x)=\sum_{j=0}^{5}c_{j}x^{j} $$

=R3.5 - Particular solution to L2-ODE-CC from series=

Problem Statement
Complete the solution for equation (2) p 7-11 as follows:

$$ \displaystyle {y}''-3{y}'+2y=4x^{2}-6x^{5} $$

Step 1
Obtain equations for 2, 3, 4, and 6 from p 7-14

-coefficients of $$ \displaystyle x $$

-coefficients of $$ \displaystyle x^{2} $$

-coefficients of $$ \displaystyle x^{3} $$

-coefficients of $$ \displaystyle x^{5} $$

Use equation (2) from p 7-13:

$$ \ \sum_{j = 0}^{3} \left [ c_{j+2} (j+2) (j+1) - 3c_{j+1} (j+1) + 2c_j\right] x^j - 3c_5(5)x^4 + 2 \left [c_4x^4 + c_5x^5 \right ] = 4x^2 - 6x^5\ $$

For the coefficients of x, let j=1 to get:

$$ \displaystyle (c_3(3)(2)-3c_2(2)+2c_1)x=0 $$

Reducing to:

$$ \displaystyle 6c_3-6c_2+2c_1=0 $$

For the coefficients of x^{2}, let j=2 to get:

$$ \displaystyle (c_4(4)(3)-3c_3(3)+2c_2)x^{2}=4x^{2} $$

Reducing to:

$$ \displaystyle 12c_4-9c_3+2c_2=4 $$

For the coefficients of x^{3}, let j=3 to get:

$$ \displaystyle (c_5(5)(4)-3c_4(4)+2c_3)x^{3}=0 $$

Reducing to:

$$ \displaystyle 20c_5-12c_4+2c_3=0 $$

For the coefficients of x^{5}, let j=5 to get:

$$ \displaystyle 2c_5x^{5}=-6x^{5} $$

Reducing to:

$$ \displaystyle 2c_5=-6 $$

Step 2
Verify all equations by long-hand expansion of the series in equation (4) p 7-12:

$$ \ \sum_{j = 2}^{5} c_j(j)(j-1)(x^{j-2}) - 3\sum_{j = 1}^{5} c_j(j)(x^{j-1}) + 2\sum_{j = 0}^{5} c_jx^j = 4x^2 - 6x^5\ $$

Expanding these series the following terms are obtained:

$$ \displaystyle c_2(2)(1)+c_3(3)(2)x+c_4(4)(3)x^2+c_5(5)(4)x^3-3c_1(1)-3c_2(2)x-3c_3(3)x^2-3c_4(4)x^3-3c_5(5)x^4 $$

$$ \displaystyle +2c_0+2c_1x+2c_2x^2+2c_3x^3+2c_4x^4+2c_5x^5= 4x^2-6x^5  $$

Collecting like coefficients the equation can be rearranged to:

$$ \displaystyle (2c_0-3c_1+2c_2)+(2c_1-6c_2+6c_3)x+(2c_2-9c_3+12c_4)x^2+(2c_3-12c_4+20c_5)x^3+(2c_4-15c_5)x^4+(2c_5)x^5=4x^2-6x^5  $$

Examining this equation it can be seen that the coefficients match those previously found so the equations are verified.

Step 3
Put the system of equations into matrix form:

$$ \ \begin{bmatrix} 2 & -3 & 2 & 0 & 0 & 0 \\ 0 & 2 & -6 & 6 & 0 & 0 \\ 0 & 0 & 2 & -9 & 12 & 0 \\ 0 & 0 & 0 & 2 & -12 & 20 \\ 0 & 0 & 0 & 0 & 2 & -15 \\ 0 & 0 & 0 & 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} c_0 \\ c_1 \\ c_2 \\ c_3 \\ c_4 \\ c_5 \end{bmatrix}= \begin{bmatrix} 0 \\ 0 \\ 4 \\ 0 \\ 0 \\ -6 \end{bmatrix} $$

Step 4
Solve for the coefficients by back substitution.

This is done by first solving for $$ \displaystyle c_5 $$ and then $$ \displaystyle c_4 $$ and eventually all the way back to $$ \displaystyle c_0 $$

$$ \displaystyle 2c_5=-6 $$

$$ \displaystyle c_5=-3 $$

$$ \displaystyle -15c_5+2c_4=0 $$

$$ \displaystyle 2c_4=-45 $$

$$ \displaystyle c_4=-22.5 $$

$$ \displaystyle 20c_5-12c_4+2c_3=0 $$

$$ \displaystyle 2c_3=-210 $$

$$ \displaystyle c_3=-105 $$

$$ \displaystyle 12c_4-9c_3+2c_2=4 $$

$$ \displaystyle 2c_2=-671 $$

$$ \displaystyle c_2=-335.5 $$

$$ \displaystyle 6c_3-6c_2+2c_1=0 $$

$$ \displaystyle 2c_1=-1383 $$

$$ \displaystyle c_1=-691.5 $$

$$ \displaystyle 2c_2-3c_1+2c_0=0 $$

$$ \displaystyle 2c_0=-1403 $$

$$ \displaystyle c_0=-701.75 $$

Step 5
Consider the initial conditions:

$$ \displaystyle y(0)=1 $$

$$ \displaystyle y'(0)=0 $$

Find the solution y(x) and plot it

$$ \displaystyle y(x)= y_p + y_h $$

$$ \displaystyle y_p= c_0 + c_1x + c_2x^2 + c_3x^3 + c_4x^4 + c_5x^5 $$

So for our equation:

$$ \displaystyle y_p=-701.75-691.5x-335.5x^2-105x^3-22.5x^4-3x^5 $$

$$ \displaystyle y_h= C_1e^{\lambda_1x}+C_2e^{\lambda_2x} $$

where:

$$ \displaystyle \lambda_1=1 $$ and $$ \displaystyle \lambda_2=2 $$ from quadratic equation.

So the overall solution becomes:

$$ \displaystyle y(x)= -701.75-691.5x-335.5x^2-105x^3-22.5x^4-3x^5+C_1e^{x}+C_2e^{2x} $$

Now use the given initial conditions to solve for the constants:

$$ \displaystyle y(0)=1=-701.75 + C_1 + C_2 $$

$$ \displaystyle y'(0)=0=-691.5 + C_1 + 2C_2 $$

Cleaning up to:

$$ \displaystyle 702.75 = C_1 + C_2 $$

$$ \displaystyle 691.5 = C_1 + 2C_2 $$

Subtracting the first equation from the second the constants can then be solved for.

$$ \displaystyle C_2=-11.25 $$

$$ \displaystyle C_1=714 $$

Yielding the final complete solution of:

$$ \displaystyle y(x)= -701.75-691.5x-335.5x^2-105x^3-22.5x^4-3x^5+714e^{x}-11.25e^{2x} $$

Graph


=R3.6 - Solutions to two non-homogeneous L2-ODE-CC=

Problem Statement
Solve the following differential equation with initial conditions y(0)=1 and y'(0)=0. Consider the following two L2-ODEs-CC: (1)$$\displaystyle y_{p1}''-3y_{p1}'+2y_{p1}=r_1(x)=4x^2$$ (2)$$\displaystyle y_{p2}''-3y_{p2}'+2y_{p2}=r_2(x)=-6x^5$$

The particular solution for (1) is $$\displaystyle y_{p1}=7+6x+2x^2$$. Find the particular solution for (2) and then obtain the solution y for the L2-ODE-CC. Compare the result with that obtained in R3.5.

Solution
Given: Initial conditions: y(0)=1 and y'(0)=0 $$\displaystyle y_{p1}=7+6x+2x^2$$

The characteristic equation of (2) is as follows: $$\displaystyle \lambda^2-3\lambda+2=0$$ $$\displaystyle \lambda=1,\lambda=2$$ Therefore the general solution of (2) is: $$\displaystyle y_h=c_1e^{1x}+c_2e^{2x}$$

The particular solution is given by the following: $$\displaystyle y_p=\sum_{j=0}^{5}c_jx^j$$ So by expanding the series the particular solution yp is: (3)$$\displaystyle y_p=c_0x^0+c_1x^1+c_2x^2+c_3x^3+c_4x^4+c_5x^5$$ (4)$$\displaystyle y_p'=c_1+2c_2x^1+3c_3x^2+4c_4x^3+5c_5x^4$$ (5)$$\displaystyle y_p''=2c_2+6c_3x^1+12c_4x^2+20c_5x^3$$

Then we put (3)-(5) into the form $$\displaystyle y_{p2}''-3y_{p2}'+2y_{p2}=-6x^5$$. $$\displaystyle (2c_2+6c_3x^1+12c_4x^2+20c_5x^3)-3(c_1+2c_2x^1+3c_3x^2+4c_4x^3+5c_5x^4)+2(c_0x^0+c_1x^1+c_2x^2+c_3x^3+c_4x^4+c_5x^5)=0+0x+0x^2+0x^3+0x^4-6x^5$$

By matching coefficients we obtain the following system of equations: $$\displaystyle 2c_0-3c_1+2c_2=0$$ $$\displaystyle 2c_1-6c_2+6c_3=0$$ $$\displaystyle 2c_2-9c_3+12c_4=0$$ $$\displaystyle 2c_3-12c_4+20c_5=0$$ $$\displaystyle 2c_4-15c_5=0$$ $$\displaystyle 2c_5=-6$$

Solving the system of equations we obtain c0= -708.75, c1= -697.5, c2= -337.5, c3= -105, c4= -22.5, c5= -3.

Therefore the particular solution for yp2 is as follows:

(6) $$\displaystyle y_{p2}=-708.75-697.5x^1-337.5x^2-105x^3-22.5x^4-3x^5$$

Now if we add the particular solution from yp1 we have the following: $$\displaystyle y_p=y_{p1}+y_{p2}$$ $$\displaystyle y_p=7+6x+2x^2-708.75-697.5x^1-337.5x^2-105x^3-22.5x^4-3x^5$$ $$\displaystyle y_p=-701.75-691.5x^1-335.5x^2-105x^3-22.5x^4-3x^5$$

To obtain the solution y we have to add yh+yp. $$\displaystyle y=y_h+y_p$$ $$\displaystyle y=c_1e^{1x}+c_2e^{2x}+-701.75-691.5x^1-335.5x^2-105x^3-22.5x^4-3x^5$$ Using the initial conditions we can solve for c1 and c2 $$\displaystyle y(0)=1=c_1+c_2-701.75$$ ===> $$\displaystyle c_1+c_2=702.75$$ $$\displaystyle y'(0)=0=c_1+2c_2-691.5$$ ===> $$\displaystyle c_1+2c_2=691.5$$

So c1=714 and c2=-11.25 and our solution is as follows:

$$\displaystyle y=714e^{1x}-11.25e^{2x}-701.75-691.5x^1-335.5x^2-105x^3-22.5x^4-3x^5$$

As you can see, this solution is identical to the solution from R3.5 due to the principle of superposition.

=R3.7 - Verify equality of two series=

Problem Statement
Expand the series on both sides of (1)-(2) p.7-12b to verify equality.

$$ \displaystyle \sum_{j=2}^5 c_j j (j-1) x^{j-2} = \sum_{k=0}^{3} c_{k+2} (k+2) (k+1) x^{k} = \sum_{j=0}^{3} c_{j+2} (j+2) (j+1) {x^j}$$

$$ \displaystyle \sum_{j=1}^5 c_j \cdot j \cdot x^{j-1} = \sum_{k=0}^{4} c_{k+1} (k+1) x^{k} = \sum_{j=0}^{4} c_{j+1} (j+1) x^{j} $$

Solution
Negate middle portion of (1) and (2) as they display the transitional meaning to the function.

Series 1

 * $$ \displaystyle \sum_{j=2}^5 c_j j (j-1) x^{j-2} = \sum_{j=0}^{3} c_{j+2} (j+2) (j+1) {x^j}$$


 * $$ \displaystyle (c_2 2 (2-1) x^{2-2})+(c_3 3 (3-1) x^{3-2})+(c_4 4 (4-1) x^{4-2})+(c_5 5 (5-1) x^{5-2}) = (c_{0+2}(0+2)(0+1){x^0})+(c_{1+2}(1+2)(1+1){x^1})

+(c_{2+2}(2+2)(2+1){x^2})+(c_{3+2}(3+2)(3+1){x^3}) $$


 * $$ \displaystyle (c_2 2 (1) x^{0})+(c_3 3 (2) x^{1})+(c_4 4 (3) x^{2})+(c_5 5 (4) x^{3}) = (c_{2}(2)(1){x^0})+(c_{3}(3)(2){x^1})+(c_{4}(4)(3){x^2})+(c_{5}(5)(4){x^3}) $$

$$ \displaystyle (2 c_2)+(6 c_3 x)+(12 c_4 x^{2})+(20 c_5 x^{3}) = 2c_2+ 6c_3 x + 12c_4 x^{2}+ 20c_5 x^{3} $$

Series 2

 * $$ \displaystyle \sum_{j=1}^5 c_j \cdot j \cdot x^{j-1} = \sum_{j=0}^{4} c_{j+1} (j+1) x^{j} $$


 * $$ \displaystyle (c_1 (1) x^{1-1})+(c_2 (2) x^{2-1})+(c_3 (3) x^{3-1})+(c_4 (4) x^{4-1})+(c_5 (5) x^{5-1}) = (c_{0+1} (0+1) x^{0})+(c_{1+1} (1+1) x^{1})+(c_{2+1} (2+1) x^{2})+(c_{3+1} (3+1) x^{3})+(c_{4+1} (4+1) x^{4}) $$


 * $$ \displaystyle (c_1 x^{0})+(c_2 (2) x^{1})+(c_3 (3) x^{2})+(c_4 (4) x^{3})+(c_5 (5) x^{4}) = (c_{1} (1))+(c_{2} (2) x)+(c_{3} (3) x^{2})+(c_{4} (4) x^{3})+(c_{5} (5) x^{4}) $$

$$ \displaystyle c_1+ 2c_2 x + 3c_3 x^{2} + 4c_4 x^{3}+ 5c_5 x^{4} = c_1+ 2c_2 x + 3c_3 x^{2} + 4c_4 x^{3}+ 5c_5 x^{4}  $$

=R3.8 - General solutions to two non-homogeneous L2-ODE-CC=

Problem Statement
Find a real, general solution to each L2-ODE-CC.

Number 5) $$\ y''+4y'+4y=e^{-x}cosx$$

Number 6) $$\ y''+y'+(\pi^2+\frac{1}{4})y=e^{-x/2}sin(\pi x)$$

Number 5
$$\ y''+4y'+4y=e^{-x}cosx$$

To find homogeneous solution => r(x)=0

$$\ y''+4y'+4y=0$$

$$\ \lambda ^{2}+4\lambda +4=0$$

$$\ (\lambda+2)(\lambda+2)=0$$

$$\ \lambda+2=0 => \lambda=-2,-2$$

Because of the double real root at $$\ \lambda=-2$$, the homogeneous solution will be in the form:

$$\ y_{h}(x)=c_{1}e^{-2x}+c_{2}xe^{-2x}$$

To find the particular solution, we must find the form $$\ y_{p}(x)$$ will take based on r(x):

$$\ r(x)=e^{-x}cosx$$

From table 2.1 p. 82, the form of $$\ y_{p}(x)$$ will be:

$$\ y_{p}(x)=e^{-x}(Kcosx+Msinx)$$

Differentiating $$\ y_{p}(x)$$ gives:

$$\ y'_{p}(x)=-e^{-x}(Kcosx+Msinx)+e^{-x}(Mcosx-Ksinx)$$

Differentiating $$\ y'_{p}(x)$$ gives:

$$\ y''_{p}(x)=e^{-x}(Kcosx+Msinx)-e^{-x}(Mcosx-Ksinx)-e^{-x}(Mcosx-Ksinx)+e^{-x}(-Kcosx-Msinx)$$

Cancelling like terms gives:

$$\ y''_{p}(x)=-e^{-x}(2Mcosx-2Ksinx)$$

Then, we substitute $$\ y_{p}(x)$$, $$\ y'_{p}(x)$$, $$\ y''_{p}(x)$$ into the original ODE:

$$\ y''+4y'+4y=e^{-x}cosx$$

$$\ -e^{-x}(2Mcosx-2Ksinx)+4[-e^{-x}(Kcosx+Msinx)+e^{-x}(Mcosx-Ksinx)]+4[e^{-x}(Kcosx+Msinx)]=e^{-x}cosx$$

$$\ e^{-x}(2Mcosx-2Ksinx)=e^{-x}cosx$$

Equating like terms gives:

$$\ e^{-x}(2Mcosx)=e^{-x}cosx =>  M=\frac{1}{2}$$

$$\ e^{-x}(-2Ksinx)=0 =>  K=0$$

So by substituting M and K, we get $$\ y_{p}(x)$$:

$$\ y_{p}(x)=\frac{1}{2}e^{-x}sinx$$

To find the final solution to the ODE, we add the homogeneous and particular solutions:

$$\ y(x)=y_{h}(x)+y_{p}(x)$$

$$\ y(x)=c_{1}e^{-2x}+c_{2}xe^{-2x}+\frac{1}{2}e^{-x}sinx $$

Number 6
$$\ y''+y'+(\pi^2+\frac{1}{4})y=e^{-x/2}sin(\pi x)$$

To find the homogeneous solution, we set r(x)=0:

$$\ y''+y'+(\pi^2+\frac{1}{4})=0$$

$$\ \lambda^2+\lambda+(\pi^2+\frac{1}{4})=0$$

$$\ \lambda=\frac{-b \pm \sqrt{b^2-4ac}}{2a}$$

$$\ \lambda=\frac{-1 \pm \sqrt{1-4(\pi^2+\frac{1}{4})}}{2}$$

$$\ \lambda=\frac{-1 \pm \sqrt{-4\pi^2}}{2}$$

$$\ \lambda=-\frac{1}{2} \pm \pi i=\alpha +\omega i => \alpha=-\frac{1}{2},  \omega =\pi $$

The homogeneous solution with complex roots will take the form:

$$\ y_{h}(x)=e^{\alpha x}(Acos\omega x+Bsin\omega x)$$

By substituting alpha and omega, we get the homogenous solution:

$$\ y_{h}(x) = e^{-x/2} (A \cos \pi x + B \sin \pi x)$$

The form of the particular solution is based on r(x):

$$\ r(x)=e^{-x/2}sin(\pi x)$$

By the modification rule, we determine the following form:

$$\ y_{p}(x) = x e^{-x/2} (K \sin \pi x + M \cos \pi x)$$

Differentiating this gives:

$$\ y'_{p}(x) = e^{-x/2} (K \sin \pi x + M \cos \pi x) - \frac{1}{2} x e^{-x/2} (K \sin \pi x + M \cos \pi x) + x e^{-x/2} (K \pi \cos \pi x - M \pi \sin \pi x)$$

Factoring this gives:

$$\ y'_p(x) = \frac{1}{2} e^{-x/2} \left( (2 K \pi x - M x + 2 M) \cos \pi x + (-2 M \pi x - K x + 2 K) \sin \pi x \right)$$

Differentiating again and factoring gives:

$$\ y''_{p}(x) = - \frac{1}{4} e^{-x/2} \left( (4 M \pi^2 x + 4 K \pi x - M x - 8 K \pi + 4 M) \cos \pi x + (4 K \pi^2 x - 4 M \pi x - K x + 8 M \pi + 4 K) \sin \pi x \right)$$

Then, we substitute $$\ y_{p}(x)$$, $$\ y'_{p}(x)$$, $$\ y''_{p}(x)$$ into the original ODE:

$$\ y''+y'+(\pi^2+\frac{1}{4})y = e^{-x/2} \sin \pi x$$

$$\begin{align}&\ \ \left( - \frac{1}{4} e^{-x/2} \left( (4 M \pi^2 x + 4 K \pi x - M x - 8 K \pi + 4 M) \cos \pi x + (4 K \pi^2 x - 4 M \pi x - K x + 8 M \pi + 4 K) \sin \pi x \right) \right) \\ &+ \left(\frac{1}{2} e^{-x/2} \left( (2 K \pi x - M x + 2 M) \cos \pi x + (-2 M \pi x - K x + 2 K) \sin \pi x \right)\right) \\ &+ (\pi^2 + \frac{1}{4})\left(x e^{-x/2} (K \sin \pi x + M \cos \pi x)\right) \\ &= e^{-x/2} \sin \pi x\end{align}$$

Factoring gives:

$$\ 2 e^{-x/2} \pi \left( K \cos \pi x - M \sin \pi x \right) = e^{-x/2} \sin \pi x$$

Dividing by$$\; e^{-x/2}$$:

$$\ 2 \pi \left( K \cos \pi x - M \sin \pi x \right) = \sin \pi x$$

Equating like terms gives:

$$\ 2 \pi K = 0 \Rightarrow K = 0$$

$$\ - 2 \pi M = 1 \Rightarrow M = - \frac{1}{2\pi}$$

Substituting K and M into the general form of the particular solution gives:

$$\ y_{p}(x) = - \frac{1}{2\pi} x e^{-x/2} \cos \pi x$$

To find the final solution to the ODE, we add the homogeneous and particular solutions:

$$\ y(x) = y_{h}(x) + y_{p}(x)$$

$$\ y(x) = e^{-x/2} (A \cos \pi x + B \sin \pi x) - \frac{1}{2\pi} x e^{-x/2} \cos \pi x$$

=R3.9 - Solutions to two non-homogeneous L2-ODE-CC with initial conditions=

Problem Statement
Find the solution the L2-ODE-CC using the given initial values.

Number 13) $$\ 8y''-6y'+y=6coshx$$  y(0)=0.2,  y'(0)=0.05

Number 14) $$\ y''+4y'+4y=e^{-2x}sin2x$$  y(0)=1,  y'(0)=-1.5

Number 13
$$\ 8y''-6y'+y=6coshx$$

$$\ 6coshx=6\frac{e^{x}+e^{-x}}{2}=3e^{x}+3e^{-x}$$

$$\ 8y''-6y'+y=3e^{x}+3e^{-x}$$

The homogeneous solution will take the form:

$$\ y_{h}(x)=c_{1}e^{\lambda_{1}x}+c_{2}e^{\lambda_{2}x}$$

To find the homogeneous solutions, set r(x)=0:

$$\ 8y''-6y'+y=0$$

$$\ 8\lambda^{2}-6\lambda+1=0$$

$$\ (2\lambda-1)(4\lambda-1)=0$$

$$\ \lambda_{1}=\frac{1}{2},   \lambda_{2}=\frac{1}{4}$$

$$\ y_{h}(x)=c_{1}e^{x/2}+c_{2}e^{x/4}$$

To find the particular solution, we must find the form $$\ y_{p}(x)$$ will take based on r(x):

$$\ r(x)=3e^{x}+3e^{-x}$$

From table 2.1 p. 82, the form of $$\ y_{p}(x)$$ will be:

$$\ y_{p}(x)=Me^{x}+Ne^{-x}$$

Differentiating $$\ y_{p}(x)$$ gives:

$$\ y'_{p}(x)=Me^{x}-Ne^{-x}$$

Differentiating $$\ y'_{p}(x)$$ gives:

$$\ y''_{p}(x)=Me^{x}+Ne^{-x}$$

Then, we substitute $$\ y_{p}(x)$$, $$\ y'_{p}(x)$$, $$\ y''_{p}(x)$$ into the original ODE:

$$\ 8[Me^{x}+Ne^{-x}]-6[Me^{x}-Ne^{-x}]+[Me^{x}+Ne^{-x}]=r(x)=3e^{x}+3e^{-x}$$

By collecting like terms, we get:

$$\ 3Me^{x}+15Ne^{-x}=3e^{x}+3e^{-x}$$

By equating like terms, we get:

$$\ 3Me^{x}=3e^{x}  =>  M=1$$

$$\ 15Ne^{-x}=3e^{-x}   => N=\frac{1}{5}$$

By substituting M and N into the general form for the particular solution we get:

$$\ y_{p}(x)=e^{x}+\frac{1}{5}e^{-x}$$

To find the final solution to the ODE, we add the homogeneous and particular solutions:

$$\ y(x)=y_{h}(x)+y_{p}(x)$$

$$\ y(x)=c_{1}e^{x/2}+c_{2}e^{x/4}+e^{x}+\frac{1}{5}e^{-x}$$

To find the unknown coefficients, we apply the initial conditions:

$$\ y(0)=0.2, y'(0)=0.05$$

$$\ y(0)=0.2=c_{1}e^{0}+c_{2}e^{0}+e^{0}+\frac{1}{5}e^{0}=c_{1}+c_{2}+1.2$$

$$\ c_{1}+c_{2}=-1$$ (Eqn. 1)
 * 

Then we find the derivative of the general solution:

$$\ y'(x)=\frac{1}{2}c_{1}e^{x/2}+\frac{1}{4}c_{2}e^{x/4}+e^{x}-\frac{1}{5}e^{-x}$$

Then we apply initial conditions:

$$\ y'(0)=0.05=\frac{1}{2}c_{1}e^{0}+\frac{1}{4}c_{2}e^{0}+e^{0}-\frac{1}{5}e^{0}=\frac{1}{2}c_{1}+\frac{1}{4}c_{2}+0.8$$

$$\ \frac{1}{2}c_{1}+\frac{1}{4}c_{2}=-0.75$$ (Eqn. 2)
 * 

By substituting Equation 1 into Equation 2, we get:

$$\ 0.5c_{1}+0.25(-1-c_{1})=-0.75  =>  c_{1}=-2$$

$$\ (-2)+c_{2}=-1 =>  c_{2}=1$$

By substituting the known coefficients into the general solution, we get the final solution:

$$\ y(x)=-2e^{x/2}+e^{x/4}+e^{x}+\frac{1}{5}e^{-x}$$

Number 14
$$\ y''+4y'+4y=e^{-2x}sin2x$$

The homogeneous solution will take the form:

$$\ y_{h}(x)=c_{1}e^{\lambda_{1}x}+c_{2}e^{\lambda_{2}x}$$

To find the homogeneous solutions, set r(x)=0:

$$\ y''+4y'+4y=0$$

$$\ \lambda^{2}+4\lambda+4=0$$

$$\ (\lambda+2)(\lambda+2)=0$$

$$\ \lambda_{1}=-2,   \lambda_{2}=-2$$

Because of the double root at $$\ \lambda=-2$$, the homogeneous solution will take the form:

$$\ y_{h}(x)=c_{1}e^{-2x}+c_{2}xe^{-2x}$$

To find the particular solution, we must find the form $$\ y_{p}(x)$$ will take based on r(x):

$$\ r(x)=e^{-2x}sin2x$$

From table 2.1 p. 82, the form of $$\ y_{p}(x)$$ will be:

$$\ y_{p}(x)=e^{-2x}(Ksin2x+Mcos2x)$$

Differentiating $$\ y_{p}(x)$$ gives:

$$\ y'_{p}(x)=-2e^{-2x}(Ksin2x+Mcos2x)+e^{-2x}(-2Msin2x+2Kcos2x)$$

Differentiating $$\ y'_{p}(x)$$ gives:

$$\ y''_{p}(x)=4e^{-2x}(Ksin2x+Mcos2x)-2e^{-2x}(-2Msin2x+2Kcos2x)-2e^{-2x}(-2Msin2x+2Kcos2x)+e^{-2x}(-4Ksin2x-4Mcos2x)$$

$$\ y''_{p}(x)=4e^{-2x}(Ksin2x+Mcos2x)-4e^{-2x}(-2Msin2x+2Kcos2x)+e^{-2x}(-4Ksin2x-4Mcos2x)$$

Then, we substitute $$\ y_{p}(x)$$, $$\ y'_{p}(x)$$, $$\ y''_{p}(x)$$ into the original ODE:

$$\ [4e^{-2x}(Ksin2x+Mcos2x)-4e^{-2x}(-2Msin2x+2Kcos2x)+e^{-2x}(-4Ksin2x-4Mcos2x)]+4[-2e^{-2x}(Ksin2x+Mcos2x)+e^{-2x}(-2Msin2x+2Kcos2x)]+4[e^{-2x}(Ksin2x+Mcos2x)]=e^{-2x}sin2x$$

By collecting like terms, we get:

$$\ e^{-2x}sin2x(4M-4K)+e^{-2x}cos2x(-4M)=e^{-2x}sin2x$$

By equating like terms, we get:

$$\ e^{-2x}cos2x(-4M)=0  =>  M=0$$

$$\ e^{-2x}sin2x(4M-4K)=e^{-2x}sin2x  => K=-\frac{1}{4}$$

By substituting K and M into the general form for the particular solution we get:

$$\ y_{p}(x)=e^{-2}sin2x$$

To find the final solution to the ODE, we add the homogeneous and particular solutions:

$$\ y(x)=y_{h}(x)+y_{p}(x)$$

$$\ y(x)=c_{1}e^{-2x}+c_{2}xe^{-2x}-\frac{1}{4}e^{-2x}sin2x$$

To find the unknown coefficients, we apply the initial conditions:

$$\ y(0)=1, y'(0)=-1.5$$

$$\ y(0)=1=c_{1}e^{0}+c_{2}(0)e^{0}+\frac{1}{4}e^{0}(sin(0))=c_{1} => c_{1}=1$$

Then we find the derivative of the general solution:

$$\ y'(x)=-2c_{1}e^{-2x}+c_{2}e^{-2x}-2c_{2}xe^{-2x}+\frac{1}{2}e^{-2x}sin2x-\frac{1}{2}e^{-2x}cos2x$$

Then we apply initial conditions:

$$\ y'(0)=-1.5=-2c_{1}e^{0}+c_{2}e^{0}-2c_{2}(0)e^{0}+\frac{1}{2}e^{0}sin(0)-\frac{1}{2}e^{0}cos(0)=-2c_{1}+c_{2}-0.5=-1.5$$

$$\ -2c_{1}+c_{2}=-1$$

$$\ -2(1)+c_{2}=-1 => c_{2}=1$$

By substituting the known coefficients into the general solution, we get the final solution:

$$\ y(x)=e^{-2x}+xe^{-2x}-\frac{1}{4}e^{-2x}sin2x$$

=Team Contributions=