# University of Florida/Egm4313/s12.team11.R3

Report 3

Intermediate Engineering Analysis
Section 7566
Team 11
Due date: February 22, 2012.

## Problem 3.1

Solved by Luca Imponenti

### Problem Statement

Find the solution to the following L2-ODE-CC: ${\displaystyle y''-10y'+25y=r(x)\!}$

With the following excitation: ${\displaystyle r(x)=7e^{5x}-2x^{2}\!}$

And the following initial conditions: ${\displaystyle y(0)=4,y'(0)=-5\!}$

Plot this solution and the solution in the example on p.7-3

### Homogeneous Solution

To find the homogeneous solution we need to find the roots of our equation

${\displaystyle \lambda ^{2}-10\lambda +25=0\!}$ ${\displaystyle (\lambda -5)(\lambda -5)=0\!}$ ${\displaystyle \lambda =5\!}$

We know the homogeneous solution for the case of a real double root with ${\displaystyle \lambda =5\!}$ to be

${\displaystyle y_{h}=c_{1}e^{5x}+c_{2}xe^{5x}\!}$

### Particular Solution

For the given excitation we must use the Sum Rule to the particular solution as follows

${\displaystyle y_{p}=y_{p1}+y_{p2}\!}$ where ${\displaystyle y_{p1}\!}$ and ${\displaystyle y_{p2}\!}$ are the solutions to ${\displaystyle r_{1}(x)=7e^{5x}\!}$ and ${\displaystyle r_{2}(x)=-2x^{2}\!}$, respectively

#### First Particular Solution

${\displaystyle r_{1}(x)=7e^{5x}\!}$,

from table 2.1, K 2011, pg. 82 we have

${\displaystyle y_{p1}=Ce^{5x}\!}$

but this corresponds to one of our homogeneous solutions so we must use the modification rule to get

${\displaystyle y_{p1}=Cx^{2}e^{5x}\!}$

Plugging this into the original L2-ODE-CC then substituting;

${\displaystyle y_{p1}''-10y_{p1}'+25y_{p1}=r_{1}(x)\!}$

${\displaystyle (Cx^{2}e^{5x})''-10(Cx^{2}e^{5x})'+25(Cx^{2}e^{5x})=r_{1}(x)\!}$

${\displaystyle 25Cx^{2}e^{5x}+10Cxe^{5x}+10Cxe^{5x}+2Ce^{5x}-10(5Cx^{2}e^{5x}+2Cxe^{5x})+25Cx^{2}e^{5x}=7e^{5x}\!}$

${\displaystyle e^{5x}[25Cx^{2}+10Cx+10Cx+2C-50Cx^{2}-20Cx+25Cx^{2}]=7e^{5x}\!}$

${\displaystyle e^{5x}2C=7e^{5x}\!}$

so ${\displaystyle C={\frac {7}{2}}\!}$ and the first particular solution is,

${\displaystyle y_{p1}={\frac {7}{2}}x^{2}e^{5x}\!}$

#### Second Particular Solution

${\displaystyle r_{2}(x)=-2x^{2}\!}$,

from table 2.1, K 2011, pg. 82 we have

${\displaystyle y_{p2}=a_{2}x^{2}+a_{1}x+a_{0}\!}$

Plugging this into the original L2-ODE-CC then substituting;

${\displaystyle y_{p2}''-10y_{p2}'+25y_{p2}=r_{2}(x)\!}$

${\displaystyle (a_{2}x^{2}+a_{1}x+a_{0})''-10(a_{2}x^{2}+a_{1}x+a_{0})'+25(a_{2}x^{2}+a_{1}x+a_{0})=-2x^{2}\!}$

${\displaystyle 2a_{2}-10(2a_{2}x+a_{1})+25(a_{2}x^{2}+a_{1}x+a_{0})=-2x^{2}\!}$

grouping like terms we get three equations to solve for the three unknowns, these are written in matrix form

${\displaystyle 25a_{2}x^{2}+(25a_{1}-20a_{2})x+(25a_{0}-10a_{1}+2a_{2})=-2x^{2}\!}$

${\displaystyle {\begin{bmatrix}2&-10&25\\-20&25&0\\25&0&0\end{bmatrix}}{\begin{bmatrix}a_{2}\\a_{1}\\a_{0}\end{bmatrix}}={\begin{bmatrix}0\\0\\-2\end{bmatrix}}\!}$

solving by back subsitution leads to ${\displaystyle a_{2}=-{\frac {2}{25}},a_{1}={\frac {8}{125}},a_{0}={\frac {4}{125}}\!}$

so the second particular solution is,

${\displaystyle y_{p2}=-{\frac {2}{25}}x^{2}+{\frac {8}{125}}x+{\frac {4}{125}}\!}$

### General Solution

The general solution is the summation of the homogeneous and particular solutions

${\displaystyle y=y_{h}+y_{p1}+y_{p2}\!}$

${\displaystyle y=c_{1}e^{5x}+c_{2}xe^{5x}+{\frac {7}{2}}x^{2}e^{5x}-{\frac {2}{25}}x^{2}+{\frac {8}{125}}x+{\frac {4}{125}}\!}$

${\displaystyle y=e^{5x}(c_{1}+c_{2}x+{\frac {7}{2}}x^{2})-{\frac {2}{25}}x^{2}+{\frac {8}{125}}x+{\frac {4}{125}}\!}$

Applying the first initial condition ${\displaystyle y(0)=4\!}$

${\displaystyle y(0)=c_{1}+{\frac {4}{125}}=4\!}$

${\displaystyle c_{1}={\frac {496}{125}}\!}$

Second initial condition ${\displaystyle y'(0)=-5\!}$

${\displaystyle y'={\frac {d}{dx}}y=e^{5x}[5(c_{1}+c_{2}x+{\frac {7}{2}}x^{2})+c_{2}+7x]-{\frac {4}{25}}x+{\frac {8}{125}}\!}$

${\displaystyle y'=e^{5x}[{\frac {35}{2}}x^{2}+(5c_{2}+7)x+5c_{1}+c_{2}]-{\frac {4}{25}}x+{\frac {8}{125}}\!}$

${\displaystyle y'(0)=5c_{1}+c_{2}+{\frac {8}{125}}=-5\!}$

${\displaystyle c_{2}=-{\frac {3113}{125}}\!}$

The general solution to the differential equation is therefore

                    ${\displaystyle y(x)=e^{5x}({\frac {496}{125}}-{\frac {3113}{125}}x+{\frac {7}{2}}x^{2})-{\frac {2}{25}}x^{2}+{\frac {8}{125}}x+{\frac {4}{125}}\!}$


### Plot

Below is a plot of this solution and the solution to in the example on p.7-3

our solution ${\displaystyle y(x)=e^{5x}({\frac {496}{125}}-{\frac {3113}{125}}x+{\frac {7}{2}}x^{2})-{\frac {2}{25}}x^{2}+{\frac {8}{125}}x+{\frac {4}{125}}\!}$ (shown in red)

example on p.7-3 ${\displaystyle y(x)=e^{5x}(4-25*x+*{\frac {7}{2}}x^{2})\!}$ (shown in blue)

Egm4313.s12.team11.imponenti 05:55, 20 February 2012 (UTC)

## Problem 3.2

Solved by Gonzalo Perez

#### Problem Statement

Developing the second homogeneous solution for the case of double real root as a limiting case of distinct roots.

#### Given

Consider two distinct roots of the form:

${\displaystyle \lambda _{1}=x\!}$ and ${\displaystyle \lambda _{2}=x+\epsilon \!}$

(where ${\displaystyle \epsilon \!}$ is perturbation).

#### Given

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

#### Solution

${\displaystyle (\lambda -\lambda _{1})(\lambda -(\lambda _{1}))=0\!}$

${\displaystyle (\lambda -x)(\lambda -(x+\epsilon ))=0\!}$

${\displaystyle \lambda ^{2}-\lambda x-\lambda \epsilon -\lambda x+x^{2}+x\epsilon =0\!}$

${\displaystyle \lambda ^{2}-\lambda (2x+\epsilon )+x(x+\epsilon )=0\!}$

                   ${\displaystyle \therefore y''-y'(2\lambda +\epsilon )+y\lambda (\lambda +\epsilon )=0\!}$ (1)


#### Given

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

#### Solution

Let's find the corresponding derivatives:

${\displaystyle y={\frac {e^{(\lambda +\epsilon )x}-e^{\lambda x}}{\epsilon }}\!}$

${\displaystyle y'={\frac {(\lambda +\epsilon )e^{\lambda +\epsilon x}-\lambda e^{\lambda x}}{\epsilon }}\!}$

${\displaystyle y''={\frac {(\lambda +\epsilon )^{2}e^{(\lambda +\epsilon )x}-\lambda ^{2}e^{\lambda x}}{\epsilon }}\!}$

If we now take these three equations and plug them into the homogeneous L2-ODE-CC (1), we get:

${\displaystyle e^{(\lambda +\epsilon )x}(\lambda ^{2}+2\lambda \epsilon +\epsilon ^{2}-2\lambda ^{2}-2\lambda \epsilon -\lambda \epsilon -\epsilon ^{2}+\lambda ^{2}+\epsilon \lambda )+e^{\lambda x}(-\lambda ^{2}+2\lambda ^{2}+\lambda \epsilon -\lambda ^{2}-\lambda \epsilon )=0\!}$

${\displaystyle \therefore 0\equiv 0.\!}$

      Since the left and right hand sides of the equation are zero, the solution is in fact a homogeneous equation.


#### Given

Find the limit of the homogeneous solution in (2) as epsilon approaches zero (think l'Hopital's Rule).

#### Solution

Using l'Hopital's Rule,

${\displaystyle \lim _{\epsilon \rightarrow 0}{\frac {e^{(\lambda +\epsilon )x}-e^{\lambda x}}{\epsilon }}={\frac {0}{0}}\!}$

(this is an indeterminate form).

L'Hopital's Rule states that we can divide this function into two functions, ${\displaystyle f(\epsilon )\!}$ and ${\displaystyle g(\epsilon )\!}$, and then find their derivatives and attempt to find the limit of ${\displaystyle {\frac {f'(\epsilon )}{g'(\epsilon )}}\!}$. If a limit exists for this, then a limit exists for our original function.

${\displaystyle \lim _{\epsilon \rightarrow 0}{\frac {f'(\epsilon )}{g'(\epsilon )}}=\lim _{\epsilon \rightarrow 0}{\frac {xe^{x(\lambda +\epsilon )}}{1}}\!}$

${\displaystyle ={\frac {xe^{(\lambda +0)x}}{1}}\!}$

                                            ${\displaystyle =xe^{x\lambda }\!}$


#### Given

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

#### Solution

Taking the derivative with respect to lambda, we find that:

                                     ${\displaystyle {\frac {d(e^{\lambda x})}{d\lambda }}=xe^{\lambda x}}$.


It is important to remember that we must hold ${\displaystyle x\!}$ as a constant when finding this derivative.

#### Given

Compare the results in parts (3) and (4), and relate to the result by using variation of parameters

#### Solution

Taking a closer look at Parts 3 and 4 of this problem, we discover that they're in fact equal:

                           ${\displaystyle {\frac {d(e^{\lambda x})}{d\lambda }}=\lim _{e\rightarrow 0}{\frac {e^{(\lambda +\epsilon )x}-e^{\lambda x}}{\epsilon }}=xe^{\lambda x}\!}$


#### Given

Numerical experiment: Compute (2) setting lambda equal to 5 and epsilon equal to 0.001, and compare to the value obtained from the exact second homogeneous solution.

#### Solution

             After performing these calculations, from (2) we get 148.478.

             And from the exact second homogeneous solution, we get 200.05.


Egm4313.s12.team11.perez.gp 20:32, 22 February 2012 (UTC)

## Problem 3.3

Solved by Jonathan Sheider

#### Problem Statement

Find the complete solution to the ODE with the given initial conditions. Plot the solution y(x).

#### Given

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

${\displaystyle y(0)=0,{y}'(0)=0\!}$

#### Solution

First let us analyze the homogenous solution to the given ODE:

${\displaystyle {y}''-3{y}'+2y=0\!}$

The characteristic equation for this ODE is therefore:

${\displaystyle \lambda ^{2}-3\lambda +2=0\!}$

Solving for ${\displaystyle \lambda \!}$:

${\displaystyle (\lambda -2)(\lambda -1)=0\!}$

${\displaystyle \lambda ={1,2}\!}$

${\displaystyle \lambda _{1}=1\!}$ and ${\displaystyle \lambda _{2}=2\!}$

Therefore the equation has two real roots and a homogenous solution of the following form (from Kreyszig 2011, p.54-57):

${\displaystyle y_{h}=c_{1}e^{\lambda _{1}x}+c_{2}e^{\lambda _{2}x}\!}$

And finally we find the general homogenous solution:

                                                       ${\displaystyle y_{h}=c_{1}e^{x}+c_{2}e^{2x}\!}$


Next let us evaluate the particular solution to the given ODE:

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

The function on the right hand side of this equation implies that the particular solution has the following form based on Table 2.1 (from Kreyszig 2011, p.82):

${\displaystyle y_{p}=K_{n}x^{n}+K_{n-1}x^{n-1}+...+K_{1}x+K_{0}\!}$

Therefore for this ODE we have:

${\displaystyle y_{p}=K_{2}x^{2}+K_{1}x+K_{0}\!}$

Differentiating ${\displaystyle y_{p}\!}$ to obtain ${\displaystyle {y_{p}}'\!}$ and ${\displaystyle {y_{p}}''\!}$ respectively:

${\displaystyle {y}'=2K_{2}x+K_{1}\!}$

${\displaystyle {y}''=2K_{2}\!}$

Substituting these equations into the original ODE yields:

${\displaystyle (2K_{2})-3(2K_{2}x+K_{1})+2(K_{2}x^{2}+K_{1}x+K_{0})=4x^{2}\!}$

${\displaystyle 2K_{2}-6K_{2}x-3K_{1}+2K_{2}x^{2}+2K_{1}x+2K_{0}=4x^{2}\!}$

And we know that the coefficients of the variables on each side of the equation must be equal:

${\displaystyle (2K_{2})x^{2}+(2K_{1}-6K_{2})x+(2K_{2}-3K_{1}+2K_{0})=4x^{2}\!}$

Therefore we find:

${\displaystyle 2K_{2}=4\!}$

${\displaystyle K_{2}=2\!}$

Now, solving for ${\displaystyle K_{1}\!}$ and ${\displaystyle K_{0}\!}$:

${\displaystyle 2K_{1}-6K_{2}=0\!}$

${\displaystyle 2K_{1}=6(2)\!}$

${\displaystyle K_{1}=6\!}$

And also: ${\displaystyle 2K_{2}-3K_{1}+2K_{0}=0\!}$

${\displaystyle 2K_{0}=3(6)-2(2)\!}$

${\displaystyle K_{0}=7\!}$

Finally we arrive at the particular solution:

                                                       ${\displaystyle y_{p}=2x^{2}+6x+7\!}$


By superposition, we can find the complete general solution:

${\displaystyle y=y_{h}+y_{p}\!}$

                                                  ${\displaystyle y=c_{1}e^{x}+c_{2}e^{2x}+2x^{2}+6x+7\!}$


Using the given initial conditions, we can solve for ${\displaystyle c_{1}\!}$ and ${\displaystyle c_{2}\!}$, first by using the initial conditions for ${\displaystyle y\!}$:

${\displaystyle y(0)=c_{1}+c_{2}+7=0\!}$

Differentiating the complete general solution and using the given initial condition for ${\displaystyle {y}'\!}$:

${\displaystyle {y}'=c_{1}e^{x}+2c_{2}e^{2x}+4x+6\!}$

${\displaystyle {y}'(0)=c_{1}+2c_{2}+6=0\!}$

Solving this system of equations, by solving the first equation for ${\displaystyle c_{1}\!}$:

${\displaystyle c_{1}=-7-c_{2}\!}$

Plugging this into the second equation yields:

${\displaystyle (-7-c_{2})+2c_{2}+6=-1+c_{2}=0\!}$

${\displaystyle c_{2}=1\!}$

And therefore:

${\displaystyle c_{1}=-7-(1)\!}$

${\displaystyle c_{1}=-8\!}$

Finally we have the complete general solution that evaluates the given initial conditions:

                                                  ${\displaystyle y(x)=-8e^{x}+e^{2x}+2x^{2}+6x+7\!}$


A plot of ${\displaystyle y(x)\!}$ from ${\displaystyle x=-3\!}$ to ${\displaystyle x=3\!}$ is shown using MatLAB:

#### Checking

Differentiating the solution to find ${\displaystyle {y}'\!}$ and ${\displaystyle {y}''\!}$ respectively:

${\displaystyle y=-8e^{x}+e^{2x}+2x^{2}+6x+7\!}$

${\displaystyle {y}'=-8e^{x}+2e^{2x}+4x+6\!}$

${\displaystyle {y}''=-8e^{x}+4e^{2x}+4\!}$

Substituting into the original ODE yields:

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

${\displaystyle (-8e^{x}+4e^{2x}+4)-3(-8e^{x}+2e^{2x}+4x+6)+2(-8e^{x}+e^{2x}+2x^{2}+6x+7)=4x^{2}\!}$

${\displaystyle -8e^{x}+4e^{2x}+4+24e^{x}-6e^{2x}-12x-18-16e^{x}+2e^{2x}+4x^{2}+12x+14=4x^{2}\!}$

${\displaystyle (-8+24-16)e^{x}+(4-6+2)e^{2x}+(-12+12)x+(-18+4+14)+4x^{2}=4x^{2}\!}$

${\displaystyle 4x^{2}=4x^{2}\!}$

Therefore this solution is correct.

--Egm4313.s12.team11.sheider 21:30, 21 February 2012 (UTC)

## Problem 3.4

Solved by Daniel Suh

### Problem Statement

Use Basic Rule (1) and Sum Rule (3) to show that the appropriate particular solution for
${\displaystyle y''-3y'+2y=4x^{2}-6x^{5}\!}$ is of the form ${\displaystyle \sum _{j=0}^{n}c_{j}x^{j}\!}$, with n = 5.

### Solution

#### Finding the Particular Solution with Basic Rule and Sum Rule

We know that in standard form, for a particular solution,
${\displaystyle y''_{p}+ay'_{p}+by_{p}=r(x)\!}$
${\displaystyle y_{p}=y_{p1}+y_{p2}\!}$

Using Basic Rule (1) and Sum Rule (3), we know that
${\displaystyle y''_{p}+ay'_{p}+by_{p}=\sum _{i}r_{i}(x)\!}$

${\displaystyle r_{1}(x)\rightarrow y_{p1}(x)\!}$
${\displaystyle r_{2}(x)\rightarrow y_{p2}(x)\!}$

##### Solving for Particular Solution 1

Using the Method of Undetermined Coefficients, we find that
${\displaystyle y_{p1}=C_{2}x^{2}+C_{1}x+C_{0}\!}$
${\displaystyle y'_{p1}=2C_{2}x+C_{1}\!}$
${\displaystyle y''_{p1}=2C_{2}\!}$

Plugging ${\displaystyle y_{p1}\!}$ into ${\displaystyle y''-3y'+2y=4x^{2}\!}$ gives
${\displaystyle (2C_{2})-3(2C_{2}x+C_{1})+2(C_{2}x^{2}+C_{1}x+C_{0})=4x^{2}\!}$

Solving for coefficients
${\displaystyle 2C_{2}=4\!}$
${\displaystyle -6C_{2}+2C_{1}=0\!}$
${\displaystyle -3C_{1}+2C_{0}+2C_{2}=0\!}$

Results in
${\displaystyle C_{2}=2\!}$
${\displaystyle C_{1}=6\!}$
${\displaystyle C_{0}=7\!}$

${\displaystyle y_{p1}=2x^{2}+6x+7\!}$

##### Solving for Particular Solution 2

Using the Method of Undetermined Coefficients, we find that
${\displaystyle y_{p2}=K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0}\!}$
${\displaystyle y'_{p2}=5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+K_{1}\!}$
${\displaystyle y''_{p2}=20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\!}$

Plugging ${\displaystyle y_{p2}\!}$ into ${\displaystyle y''-3y'+2y=-6x^{5}\!}$ gives
${\displaystyle (20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2})-3(5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+K_{1})+2(K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0})=-6x^{5}\!}$

Solving for coefficients results in
${\displaystyle K_{5}=-3\!}$
${\displaystyle K_{4}=-22.5\!}$
${\displaystyle K_{3}=-105\!}$
${\displaystyle K_{2}=-337.5\!}$
${\displaystyle K_{1}=-697.5\!}$
${\displaystyle K_{0}=-708.75\!}$

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

##### Combining Particular Solutions

Plugging ${\displaystyle y_{p1}\!}$ and ${\displaystyle y_{p2}\!}$ into
${\displaystyle y_{p}=y_{p1}+y_{p2}\!}$ gives

               ${\displaystyle y_{p}=-3x^{5}-22.5x^{4}-105x^{3}-335.5x^{2}-691.5x-701.75\!}$


#### Comparing to Summation Form

The particular solution in the summation form is
${\displaystyle y_{p}=\sum _{j=0}^{n}c_{j}x^{j}\!}$

if n=5, then
${\displaystyle y_{p}=\sum _{j=0}^{5}c_{j}x^{j}\!}$
${\displaystyle y'_{p}=\sum _{j=0}^{5}c_{j}*j*x^{(j-1)}\!}$
${\displaystyle y''_{p}=\sum _{j=0}^{5}c_{j}*j*(j-1)*x^{(j-2)}\!}$

Plugging the particular solution into ${\displaystyle y''-3y'+2y=-6x^{5}\!}$, the final solution gives

         ${\displaystyle y_{p}=-3x^{5}-22.5x^{4}-105x^{3}-335.5x^{2}-691.5x-701.75\!}$


(check Problem 3.5 for explanation on how to get this answer)

#### Result

As you can see, the two particular solutions of ${\displaystyle y_{p}\!}$ are equal. Thus, using the Basic Rule (1) and Sum rule (3) does give you the correct particular solution for
${\displaystyle y''-3y'+2y=4x^{2}-6x^{5}\!}$, in the form of ${\displaystyle y_{p}=\sum _{j=0}^{n}c_{j}x^{j}\!}$

Created by [Daniel Suh] 20:57, 21 February 2012 (UTC)

## Problem 3.5

Solved by: Andrea Vargas

### Problem Statement

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

1. Obtain the coefficients of ${\displaystyle x,x^{2},x^{3},x^{5}\!}$
2.Verify all equations by long-hand expansion. Use the series before adjusting the indexes.

3. Put the system of equations in an upper triangular matrix.

4. Solve for ${\displaystyle c_{0},c_{1},c_{2},c_{3},c_{4},c_{5}\!}$ by using back substitution.

5. Using the initial conditions ${\displaystyle y(0)=1,y'(0)=0\!}$ find ${\displaystyle y(x)\!}$ and plot it

### Solution

1. To obtain the equations for the coefficients we use the following equation from (1) p7-11:

${\displaystyle \sum _{j=0}^{3}[c_{j+2}(j+2)(j+1)-3c_{j+1}(j+1)+2c_{j}]x^{j}-3c_{5}(5)x^{4}+2[c_{4}x^{4}+c^{5}x^{5}]=4x^{2}-6x^{5}\!}$

Finding the coefficients of ${\displaystyle x\!}$ where ${\displaystyle j=1\!}$:

${\displaystyle [c_{3}(3)(2)-3(c_{2})(2)+2c_{1}]x^{1}=[6c_{3}-6c_{2}+2c_{1}]x\!}$

Finding the coefficients of ${\displaystyle x^{2}\!}$ where ${\displaystyle j=2\!}$:

${\displaystyle [c_{4}(4)(3)-3(c_{3})(3)+2c_{2}]x^{2}=[12c_{4}-9c_{3}+2c_{2}]x^{2}\!}$

Finding the coefficients of ${\displaystyle x^{3}\!}$ where ${\displaystyle j=3\!}$:

${\displaystyle [c_{5}(5)(4)-3(c_{4})(4)+2c_{3}]x^{3}=[20c_{4}-12c_{3}+2c_{2}]x^{3}\!}$

Finding the coefficients of ${\displaystyle x^{5}\!}$ where ${\displaystyle j=5\!}$:

${\displaystyle c_{5}x^{5}\!}$

2. To verify all the above equations by long hand expansion we use the following equation from (4) p7-12:
${\displaystyle \sum _{j=2}^{5}c_{j}\times j\times (j-1)\times x^{j-2}-3\sum _{j=1}^{5}c_{j}\times j\times x^{j-1}+2\sum _{j=0}^{5}c_{j}\times x^{j}=4x^{2}-6x^{5}\!}$

Finding the coefficients when ${\displaystyle j=0\!}$:

${\displaystyle 2c_{0}\!}$

Finding the coefficients when ${\displaystyle j=1\!}$:

${\displaystyle -3c_{1}+2c_{1}x_{1}\!}$

Finding the coefficients when ${\displaystyle j=2\!}$:

${\displaystyle 2c_{2}-6c_{2}x+2c_{2}x^{2}\!}$

Finding the coefficients when ${\displaystyle j=3\!}$:

${\displaystyle 6c_{3}x-9c_{3}x^{2}+2c_{3}x^{3}\!}$

Finding the coefficients when ${\displaystyle j=5\!}$:

${\displaystyle 20c_{5}x^{3}-15c_{5}x^{4}+2c_{5}x^{5}\!}$

By collecting these terms we can compare them to the equations of part 1.

Coefficients of ${\displaystyle x\!}$:

${\displaystyle [c_{3}(3)(2)-3(c_{2})(2)+2c_{1}]x^{1}=[6c_{3}-6c_{2}+2c_{1}]x\!}$

Coefficients of ${\displaystyle x^{2}\!}$:

${\displaystyle [c_{4}(4)(3)-3(c_{3})(3)+2c_{2}]x^{2}=[12c_{4}-9c_{3}+2c_{2}]x^{2}\!}$

Coefficients of ${\displaystyle x^{3}\!}$:

${\displaystyle [c_{5}(5)(4)-3(c_{4})(4)+2c_{3}]x^{3}=[20c_{4}-12c_{3}+2c_{2}]x^{3}\!}$

Coefficients of ${\displaystyle x^{5}\!}$:

${\displaystyle c_{5}x^{5}\!}$

We can see that we obtain the same system of equations to solve for the coefficients with both methods.

3.Constructing the coefficients matrix:
${\displaystyle {\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}}\!}$

Then, the system becomes:

${\displaystyle {\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}}\!}$

4. Solving for the coefficients:
${\displaystyle 2c_{5}=-6\rightarrow c_{5}=-3\!}$
${\displaystyle 2c_{4}-(15)(-3)=0\rightarrow c_{4}={\frac {-45}{2}}\!}$
${\displaystyle 2c_{3}-12(-{\frac {45}{2}})+20(-3)=0\rightarrow c_{3}=-105\!}$
${\displaystyle 2c_{2}-9(-105)+12(-{\frac {45}{2}})=4\rightarrow c_{2}=-{\frac {671}{2}}\!}$
${\displaystyle 2c_{1}-6(-{\frac {671}{2}})+6(-105)=0\rightarrow c_{1}=-{\frac {1383}{2}}\!}$
${\displaystyle 2c_{0}-3(-{\frac {1383}{2}})+2(-{\frac {671}{2}})=0\rightarrow c_{0}=-{\frac {2807}{4}}\!}$

#### Particular solution

This yields the particular solution:

                                                            ${\displaystyle y_{p}(x)=-3x^{5}-{\frac {45}{2}}x^{4}-105x^{3}-{\frac {671}{2}}x^{2}-{\frac {1383}{2}}x-{\frac {2807}{4}}\!}$


#### Homogeneous Solution

${\displaystyle y{}''_{h}-y{}'_{h}+2y_{h}=0\!}$
${\displaystyle \lambda ^{2}-3\lambda +2=0\!}$
Then, we can find the characteristic equation:
${\displaystyle (\lambda -2)(\lambda -1)\!}$
${\displaystyle \lambda =2,1\!}$
Then the solution for the homogeneous equation becomes:

                                                                                      ${\displaystyle y_{h}(x)=C_{1}e^{2x}+C_{2}e^{x}\!}$


#### General Solution

Using the given initial conditions ${\displaystyle y(0)=1,y'(0)=0\!}$ we find the overall solution:

${\displaystyle y(x)=y_{h}+y_{p}\!}$
${\displaystyle y(x)=C_{1}e^{2x}+C_{2}e^{x}-3x^{5}-{\frac {45}{2}}x^{4}-105x^{3}-{\frac {671}{2}}x^{2}-{\frac {1383}{2}}x-{\frac {2807}{4}}\!}$
${\displaystyle y'(x)=2C_{1}e^{2x}+C_{2}e^{x}-15x^{4}-90x^{3}-315x^{2}-671x-{\frac {1383}{2}}\!}$
Using the initial conditions to solve for ${\displaystyle C_{1}\!}$ and ${\displaystyle C_{2}\!}$

${\displaystyle 1=C_{1}+C_{2}-{\frac {2807}{4}}\!}$
${\displaystyle 0=C_{1}+C_{2}-{\frac {1383}{2}}\!}$
${\displaystyle C_{1}=-{\frac {45}{4}}\;\;\;C_{2}=714\!}$

The general solution becomes

                                                     ${\displaystyle y(x)=-{\frac {45}{4}}e^{2x}+714e^{x}-3x^{5}-{\frac {45}{2}}x^{4}-105x^{3}-{\frac {671}{2}}x^{2}-{\frac {1383}{2}}x-{\frac {2807}{4}}\!}$


### Plot

Below is a plot of the solution:

--Egm4313.s12.team11.vargas.aa 05:56, 21 February 2012 (UTC)

## Problem 3.6

Solved by Francisco Arrieta

### Problem Statement

Solve the L2-ODE-CC (2) p.7-11 with initial conditions (2b) p.3-6 differently as follows. Consider the following two L2-ODE-CC (see p. 7-2b)
${\displaystyle y_{p,1}''-3y_{p,1}'+2y_{p,1}=r_{1}(x)=4x^{2}\!}$
${\displaystyle y_{p,2}''-3y_{p,2}'+2y_{p,2}=r_{2}(x)=-6x^{5}\!}$
The particular solution to ${\displaystyle y_{p,1}\!}$ had been found in R3.3 p.7-11.
Find the particular solution ${\displaystyle y_{p,2}\!}$ , and then obtain the solution ${\displaystyle y\!}$ for the L2-ODE-CC (2) p.7-11 with initial conditions (2b) p.3-6.

### Given

First particular solution
${\displaystyle y_{p,1}=2x^{2}+6x+7\!}$
Initial Conditions
${\displaystyle y(0)=1\!}$
${\displaystyle y'(0)=0\!}$

### Solution

#### Particular Solution

Since the specific excitation ${\displaystyle r_{2}(x)=-6x^{5}\!}$ , using table 2.1 from K 2011 p.82, the choice for the particular solution is ${\displaystyle y_{p}(x)=\sum _{j=0}^{n}K_{j}x^{j}\!}$
Then
${\displaystyle y_{p,2}=c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+c_{4}x^{4}+c_{5}x^{5}\!}$
${\displaystyle y_{p,2}'=c_{1}+2c_{2}x+3c_{3}x^{2}+4c_{4}x^{3}+5c_{5}x^{4}\!}$
${\displaystyle y_{p,2}''=2c_{2}+6c_{3}x+12c_{4}x^{2}+20c_{5}x^{3}\!}$

Plugging these equations back in the original ${\displaystyle y_{p,2}''-3y_{p,2}'+2y_{p,2}=-6x^{5}\!}$

${\displaystyle (2c_{2}+6c_{3}x+12c_{4}x^{2}+20c_{5}x^{3})-3(c_{1}+2c_{2}x+3c_{3}x^{2}+4c_{4}x^{3}+5c_{5}x^{4})+2(c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+c_{4}x^{4}+c_{5}x^{5})=-6x^{5}\!}$

Using coefficient matching of left hand side to the right hand side of the equation, the following equations are obtained
${\displaystyle c:2c_{2}-3c_{1}+2c_{0}=0\!}$
${\displaystyle x:6c_{3}-6c_{2}+2c_{1}=0\!}$
${\displaystyle x^{2}:12c_{4}-9c_{3}+2c_{2}=0\!}$
${\displaystyle x^{3}:20c_{5}-12c_{4}+2c_{3}=0\!}$
${\displaystyle x^{4}:-15c_{5}+2c_{4}=0\!}$
${\displaystyle x^{5}:2c_{5}=-6\!}$

Which is equivalent to the following matrix
${\displaystyle {\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\\0\\0\\0\\-6\end{bmatrix}}\!}$

Using back substitution method to solve for every coefficient, starting with ${\displaystyle c_{5}\!}$
${\displaystyle 2c_{5}=-6\rightarrow c_{5}=-3\!}$
${\displaystyle 2c_{4}-15(-3)=0\rightarrow c_{4}=-{\frac {45}{2}}\!}$
${\displaystyle 2c_{3}-12(-{\frac {45}{2}})+20(-3)=0\rightarrow c_{3}=-105\!}$
${\displaystyle 2c_{2}-9(-105)+12(-{\frac {45}{2}})=0\rightarrow c_{2}=-{\frac {675}{2}}\!}$
${\displaystyle 2c_{1}-6(-{\frac {675}{2}})+6(-105)=0\rightarrow c_{1}=-{\frac {1395}{2}}\!}$
${\displaystyle 2c_{0}-3(-{\frac {1395}{2}})+2(-{\frac {675}{2}})=0\rightarrow c_{0}=-{\frac {2835}{4}}\!}$

Plugging these values back into ${\displaystyle y_{p,2}=c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+c_{4}x^{4}+c_{5}x^{5}\!}$ gives

                                        ${\displaystyle y_{p,2}=-{\frac {2835}{4}}-{\frac {1395}{2}}x-{\frac {675}{2}}x^{2}-105x^{3}-{\frac {45}{2}}x^{4}-3x^{5}\!}$


Since these equations are L2-ODE-CC, the superposition principle applies and ${\displaystyle y_{p}=y_{p,1}+y_{p,2}\!}$ and the general particular solution becomes

                                         ${\displaystyle y_{p}(x)=-{\frac {2807}{4}}-{\frac {1383}{2}}x-{\frac {671}{2}}x^{2}-105x^{3}-{\frac {45}{2}}x^{4}-3x^{5}\!}$


#### Homogeneous Solution

${\displaystyle y_{h}''-3y_{h}'+2y_{h}=0\!}$
Due to the linearity of this homogeneous equation, a linear combination of two linear independent solutions is also a solution
${\displaystyle y_{h,1}''-3y_{h,1}'+2y_{h,1}=0\!}$
${\displaystyle y_{h,2}''-3y_{h,2}'+2y_{h,2}=0\!}$

With solutions
${\displaystyle y_{h,1}=e^{\lambda _{1}x}\!}$
${\displaystyle y_{h,2}=e^{\lambda _{2}x}\!}$

In order to determine the value of ${\displaystyle \lambda _{1,2}\!}$, the characteristic equation must be determine from the homogeneous equation
${\displaystyle \lambda ^{2}-3\lambda +2=0\!}$
${\displaystyle \lambda _{1,2}={\frac {-a\pm {\sqrt {a^{2}-4b}}}{2}}\!}$
${\displaystyle \lambda _{1,2}={\frac {-(-3)\pm {\sqrt {(-3)^{2}-4(2)}}}{2}}\!}$
${\displaystyle \lambda _{1}=2\;\;\;\;\;\;\;\lambda _{2}=1\!}$

Then the solutions for each distinct linearly independent homogeneous equation becomes
${\displaystyle y_{h,1}=e^{2x}\!}$
${\displaystyle y_{h,2}=e^{x}\!}$

Because of linearity, the linear combination of the previous two equations times two constants that satisfy 2 initial conditions, is also a solution
                                                    ${\displaystyle y_{h}(x)=C_{1}e^{2x}+C_{2}e^{x}\!}$


#### General Solution

The overall solution for the L2-ODE-CC
${\displaystyle y(x)=y_{h}+y_{p}\!}$
${\displaystyle y(x)=C_{1}e^{2x}+C_{2}e^{x}-{\frac {2807}{4}}-{\frac {1383}{2}}x-{\frac {671}{2}}x^{2}-105x^{3}-{\frac {45}{2}}x^{4}-3x^{5}\!}$
${\displaystyle y'(x)=2C_{1}e^{2x}+C_{2}e^{x}-{\frac {1383}{2}}-671x-315x^{2}-90x^{3}-15x^{4}\!}$

Using the initial conditions to solve for ${\displaystyle C_{1}\!}$ and ${\displaystyle C_{2}\!}$
${\displaystyle 1=C_{1}+C_{2}-{\frac {2807}{4}}\!}$
${\displaystyle 0=C_{1}+C_{2}-{\frac {1383}{2}}\!}$
${\displaystyle C_{1}=-{\frac {45}{4}}\;\;\;C_{2}=714\!}$

The general solution becomes
                 ${\displaystyle y(x)=-{\frac {45}{4}}e^{2x}+714e^{x}-{\frac {2807}{4}}-{\frac {1383}{2}}x-{\frac {671}{2}}x^{2}-105x^{3}-{\frac {45}{2}}x^{4}-3x^{5}\!}$


--Egm4313.s12.team11.arrieta 20:26, 19 February 2012 (UTC)

## Problem 3.7

Solved By Kyle Gooding

### Problem Statement

Expand the series on both sides of (1),(2) pg. 7-12b to verify these equalities.
(1)

### Given

${\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}}$

(2)
${\displaystyle \sum _{j=1}^{5}C_{j}*jx^{j-1}=\sum _{j=0}^{4}C_{j+1}*(j+1)x^{j}}$

### Solutions

Expanding both sides of (1) results in:
${\displaystyle \sum _{j=2}^{5}C_{j}*j(j-1)x^{j-2}=C_{2}(2)(2-1)x^{0}+C_{3}(3)(3-1)x^{1}+C_{4}(4)(4-1)x^{2}+C_{5}(5)(5-1)x^{3}}$
${\displaystyle \sum _{j=0}^{3}C_{j}(j+2)(j+1)x^{j}=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}}$

Simplifying:
${\displaystyle \sum _{j=2}^{5}C_{j}*j(j-1)x^{j-2}=C_{2}(2)+C_{3}6x+C_{4}12x^{2}+C_{5}20x^{3}}$
${\displaystyle \sum _{j=0}^{3}C_{j}(j+2)(j+1)x^{j}=C_{2}(2)+C_{3}6x+C_{4}12x^{2}+C_{5}20x^{3}}$

 The two sums are equal.


Expanding both sides of (2) results in:
${\displaystyle \sum _{j=1}^{5}C_{j}*jx^{j-1}=C_{1}(1)x^{0}+C_{2}(2)x^{1}+C_{3}(3)x^{2}+C_{4}(4)x^{3}+C_{5}(5)x^{4}}$
${\displaystyle \sum _{j=0}^{4}C_{j+1}*(j+1)x^{j}=C_{0+1}(0+1)x^{0}+C_{1+1}(1+1)x^{1}+C_{1+2}(2+1)x^{2}+C_{2+2}(3+1)x^{3}+C_{3+2}(4+1)x^{4}}$

Simplifying:
${\displaystyle \sum _{j=1}^{5}C_{j}*jx^{j-1}=C_{1}(1)+C_{2}(2)x^{1}+C_{3}(3)x^{2}+C_{4}(4)x^{3}+C_{5}(5)x^{4}}$
${\displaystyle \sum _{j=1}^{5}C_{j}*jx^{j-1}=C_{1}(1)+C_{2}(2)x^{1}+C_{3}(3)x^{2}+C_{4}(4)x^{3}+C_{5}(5)x^{4}}$

 The two sums are equal.


Egm4313.s12.team11.gooding 23:49, 19 February 2012 (UTC)

## Problem 3.8

solved by Luca Imponenti

### Kreyszig 2011 pg.84 problem 5

#### Problem Statement

Find a (real) general solution. State which rule you are using. Show each step of your work.

${\displaystyle y''+4y'+4y=e^{-x}cos(x)\!}$

#### Homogeneous Solution

To find the homogeneous solution, ${\displaystyle y_{h}\!}$, we must find the roots of the equation

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

${\displaystyle (\lambda +2)(\lambda +2)=0\!}$

${\displaystyle \lambda =-2\!}$

We know the homogeneous solution for the case of a double root to be

${\displaystyle y_{h}=c_{1}e^{\lambda x}+c_{2}xe^{\lambda x}\!}$

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

#### Particular Solution

We have the following excitation

${\displaystyle r(x)=e^{-x}cos(x)\!}$

From table 2.1, K 2011, pg. 82, we have

${\displaystyle y_{p}(x)=e^{-x}[Kcos(x)+Msin(x)]\!}$

Since this does not correspond to our homogeneous solution we can use the Basic Rule (a), K 2011, pg. 81 to solve for the particular solution

${\displaystyle y_{p}''+4y_{p}'+4y_{p}=r(x)\!}$

where

${\displaystyle y_{p}'=e^{-x}[-Ksin(x)+Mcos(x)]-e^{-x}[Kcos(x)+Msin(x)]\!}$

${\displaystyle y_{p}'=e^{-x}[-Ksin(x)+Mcos(x)-Kcos(x)-Msin(x)]\!}$

and

${\displaystyle y_{p}''=e^{-x}[-Kcos(x)-Msin(x)+Ksin(x)-Mcos(x)]-e^{-x}[Ksin(x)+Mcos(x)-Kcos(x)-Msin(x)]\!}$

${\displaystyle y_{p}''=e^{-x}[-Kcos(x)-Msin(x)+Ksin(x)-Mcos(x)+Ksin(x)-Mcos(x)+Kcos(x)+Msin(x)]\!}$

${\displaystyle y_{p}''=e^{-x}[2Ksin(x)-2Mcos(x)]\!}$

Plugging these equations back into the differential equation

${\displaystyle y_{p}''+4y_{p}'+4y_{p}=r(x)\!}$

${\displaystyle e^{-x}[2Ksin(x)-2Mcos(x)]+4e^{-x}[-Ksin(x)+Mcos(x)-Kcos(x)-Msin(x)]+4e^{-x}[Kcos(x)+Msin(x)]=e^{-x}cos(x)\!}$

${\displaystyle e^{-x}[2Ksin(x)-2Mcos(x)-4Ksin(x)+4Mcos(x)-4Kcos(x)-4Msin(x)+4Kcos(x)+4Msin(x)]=e^{-x}cos(x)\!}$

${\displaystyle 2Mcos(x)-2Ksin(x)=cos(x)\!}$

from the above equation it is obvious that ${\displaystyle K=0\!}$ and ${\displaystyle M={\frac {1}{2}}\!}$

therefore the particular solution to the differential equation is

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

#### General Solution

The general solution will be the summation of the homogeneous and particular solutions

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

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

   ${\displaystyle y(x)=e^{-2x}(c_{1}+c_{2}x)+{\frac {1}{2}}e^{-x}sin(x)\!}$


The coefficients ${\displaystyle c_{1}\!}$ and ${\displaystyle c_{2}\!}$ can be readily solved for given either initial conditions or boundary value conditions.

### Kreyszig 2011 pg.84 problem 6

#### Problem Statement

Find a (real) general solution. State which rule you are using. Show each step of your work.

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

#### Homogeneous Solution

To find the homogeneous solution, ${\displaystyle y_{h}\!}$, we must find the roots of the equation

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

${\displaystyle \lambda ={\frac {-b\pm {\sqrt {b^{2}-4ac}}}{2a}}\!}$ with ${\displaystyle a=1,b=1,c=(\pi ^{2}+{\frac {1}{4}})\!}$

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

${\displaystyle \lambda =-\alpha \pm i\omega =-{\frac {1}{2}}\pm \pi i\!}$

We know the homogeneous solution for the case of a double root to be

${\displaystyle y_{h}=e^{-\alpha x}[Acos(\omega x)+Bsin(\omega x)]\!}$

${\displaystyle y_{h}=e^{-{\frac {x}{2}}}[Acos(\pi x)+Bsin(\pi x)]\!}$

#### Particular Solution

We have the following excitation

${\displaystyle r(x)=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

From table 2.1, K 2011, pg. 82, we have

${\displaystyle y_{p}(x)=e^{-{\frac {x}{2}}}[Kcos(\pi x)+Msin(\pi x)]\!}$

Since this corresponds to our homogeneous solution we must use the Modification Rule (b), K 2011, pg. 81 to solve for the particular solution

so ${\displaystyle y_{p}(x)=xe^{-{\frac {x}{2}}}[Kcos(\pi x)+Msin(\pi x)]\!}$

differentiating

${\displaystyle y_{p}'=\pi xe^{-{\frac {x}{2}}}[-Ksin(\pi x)+Mcos(\pi x)]+(e^{\frac {x}{2}}-{\frac {1}{2}}xe^{-{\frac {x}{2}}})[Kcos(\pi x)+Msin(\pi x)]\!}$

${\displaystyle y_{p}'=e^{-{\frac {x}{2}}}(\pi x[-Ksin(\pi x)+Mcos(\pi x)]+(1-{\frac {1}{2}}x)[Kcos(\pi x)+Msin(\pi x)])\!}$

${\displaystyle y_{p}'=e^{-{\frac {x}{2}}}[-\pi xKsin(\pi x)+\pi xMcos(\pi x)+Kcos(\pi x)+Msin(\pi x)-{\frac {1}{2}}xKcos(\pi x)-{\frac {1}{2}}xMsin(\pi x)]\!}$

and

${\displaystyle y_{p}''=e^{-{\frac {x}{2}}}[-\pi ^{2}xKcos(\pi x)-\pi Ksin(\pi x)-\pi ^{2}xMsin(\pi x)+\pi Mcos(\pi x)-\pi Ksin(\pi x)+\pi Mcos(\pi x)+{\frac {1}{2}}\pi xKsin(\pi x)-{\frac {1}{2}}Kcos(\pi x)-{\frac {1}{2}}\pi xMcos(\pi x)-{\frac {1}{2}}Msin(\pi x)]-{\frac {1}{2}}e^{-{\frac {x}{2}}}[-\pi xKsin(\pi x)+\pi xMcos(\pi x)+Kcos(\pi x)+Msin(\pi x)-{\frac {1}{2}}xKcos(\pi x)-{\frac {1}{2}}xMsin(\pi x)]\!}$

${\displaystyle y_{p}''=e^{-{\frac {x}{2}}}[-\pi ^{2}xKcos(\pi x)-\pi Ksin(\pi x)-\pi ^{2}xMsin(\pi x)+\pi Mcos(\pi x)-\pi Ksin(\pi x)+\pi Mcos(\pi x)+{\frac {1}{2}}\pi xKsin(\pi x)-{\frac {1}{2}}Kcos(\pi x)-{\frac {1}{2}}\pi xMcos(\pi x)-{\frac {1}{2}}Msin(\pi x)+{\frac {1}{2}}\pi xKsin(\pi x)-{\frac {1}{2}}\pi xMcos(\pi x)-{\frac {1}{2}}Kcos(\pi x)-{\frac {1}{2}}Msin(\pi x)+{\frac {1}{4}}xKcos(\pi x)+{\frac {1}{4}}xMsin(\pi x)]\!}$

grouping cosine and sine terms we get

${\displaystyle y_{p}''=e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K)sin(\pi x)]\!}$

and

${\displaystyle y_{p}'=e^{-{\frac {x}{2}}}[(\pi xM+K-{\frac {1}{2}}xK)cos(\pi x)+(-\pi xK+M-{\frac {1}{2}}xM)sin(\pi x)]\!}$

next we substitute the above equations into the ODE

${\displaystyle y_{p}''+y_{p}'+(\pi ^{2}+{\frac {1}{4}})y_{p}=r(x)\!}$

${\displaystyle e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K)sin(\pi x)]+e^{-{\frac {x}{2}}}[(\pi xM+K-{\frac {1}{2}}xK)cos(\pi x)+(-\pi xK+M-{\frac {1}{2}}xM)sin(\pi x)]+(\pi ^{2}+{\frac {1}{4}})xe^{-{\frac {x}{2}}}[Kcos(\pi x)+Msin(\pi x)]=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

${\displaystyle e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K)sin(\pi x)+(\pi xM+K-{\frac {1}{2}}xK)cos(\pi x)+(-\pi xK+M-{\frac {1}{2}}xM)sin(\pi x)+(\pi ^{2}+{\frac {1}{4}})x(Kcos(\pi x)+Msin(\pi x))]=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

${\displaystyle e^{-{\frac {x}{2}}}[(2\pi M-\pi xM+({\frac {1}{4}}-\pi ^{2})xK-K+\pi xM+K-{\frac {1}{2}}xK+(\pi ^{2}+{\frac {1}{4}})xK)cos(\pi x)+(({\frac {1}{4}}-\pi ^{2})xM-M+\pi xK-2\pi K-\pi xK+M-{\frac {1}{2}}xM+(\pi ^{2}+{\frac {1}{4}})xM)sin(\pi x)]=e^{-{\frac {x}{2}}}sin(\pi x)\!}$

${\displaystyle 2\pi Mcos(\pi x)-2\pi Ksin(\pi x)=sin(\pi x)\!}$

after cancelling terms; we can equate cosine and sine coefficients to get two equations

${\displaystyle 2\pi M=0\!}$

${\displaystyle -2\pi K=1\!}$

so ${\displaystyle M=0\!}$ and ${\displaystyle K=-{\frac {1}{2\pi }}\!}$

and the particular solution to the ODE is

${\displaystyle y_{p}(x)=-{\frac {1}{2\pi }}xe^{-{\frac {x}{2}}}cos(\pi x)\!}$

#### General Solution

The general solution will be the summation of the homogeneous and particular solutions

${\displaystyle y=y_{h}+y_{p}\!}$

${\displaystyle y=e^{-{\frac {x}{2}}}[Acos(\pi x)+Bsin(\pi x)]-{\frac {1}{2\pi }}xe^{-{\frac {x}{2}}}cos(\pi x)\!}$

   ${\displaystyle y=e^{-{\frac {x}{2}}}[Acos(\pi x)+Bsin(\pi x)-{\frac {1}{2\pi }}xcos(\pi x)]\!}$


Egm4313.s12.team11.imponenti 04:28, 21 February 2012 (UTC)

## Problem 3.9

Solved by Gonzalo Perez

#### Problem Statement

Solve the initial value problem. State which rule you are using. Show each step of your calculation in detail.

#### (K 2011 pg.85 #13)

${\displaystyle 8y''-6y'+y=6\cosh x\!}$ (1)

Initial conditions are:

${\displaystyle y(0)=0.2,y'(0)=0.05\!}$

#### Solution

The general solution of the homogeneous ordinary differential equation is

${\displaystyle 8y''-6y'+y=0\!}$

We can use this information to determine the characteristic equation:

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

And proceeding to find the roots,

${\displaystyle 4\lambda (2\lambda -1)-1(2\lambda -1)=0\!}$

Thus, ${\displaystyle (4\lambda -1)(2\lambda -1)=0\!}$.

Solving for the roots, we find that ${\displaystyle \lambda ={\frac {1}{4}},{\frac {1}{2}},\!}$

where the general solution is

${\displaystyle y_{k}=c_{1}e^{{\frac {1}{4}}x}+c_{2}e^{{\frac {1}{2}}x}\!}$.

The solution of ${\displaystyle y_{p}\!}$ of the non-homogeneous ordinary differential equation is

${\displaystyle x={\frac {e^{x}+e^{-x}}{2}}\!}$.

Using the Sum rule as described in Section 2.7, the above function translates into the following:

${\displaystyle y_{p}=y_{p1}+y_{p2}\!}$, where Table 2.1 tells us that:

${\displaystyle y_{p1}=Ae^{x}\!}$ and ${\displaystyle y_{p2}=Be^{x}\!}$.

Therefore, ${\displaystyle y_{p}=Ae^{x}+Be^{-x}\!}$.

Now, we can substitute the values (${\displaystyle y_{p},y_{p}',y_{p}''\!}$) into (1) to get:

${\displaystyle 8(Ae^{x}+Be^{-x})-6(Ae^{x}-Be^{-x})+Ae^{x}+Be^{-x}=6({\frac {e^{x}+e^{-x}}{2}})\!}$

${\displaystyle =3Ae^{x}+15Be^{-x}\!}$

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

Now that we have this equation, we can equate coefficients to find that:

${\displaystyle 3A=3\!}$

${\displaystyle \therefore A=1\!}$

${\displaystyle B={\frac {3}{15}}={\frac {1}{5}}\ }$

and thus, ${\displaystyle y_{p}=e^{x}+{\frac {1}{5}}e^{-x}\!}$

We find that the general solution is in fact:

${\displaystyle y=y_{k}+y_{p}\!}$

${\displaystyle y=c_{1}e^{\frac {1}{4}}x+c_{2}e^{\frac {1}{2}}x+e^{x}+3e^{-x}\!}$

whereas the general solution of the given ordinary differential equation is actually:

${\displaystyle y=c_{1}e^{\frac {1}{4}}x+c_{2}e^{\frac {1}{2}}x+e^{x}+{\frac {1}{5}}e^{-x}\!}$

Solving for the initial conditions given and first plugging in ${\displaystyle y(0)=0.2\!}$, we get that:

${\displaystyle 0.2=c_{1}e^{{\frac {1}{4}}(0)}+c_{2}e^{{\frac {1}{2}}(0)}+e^{0}+3e^{(0)}\!}$

${\displaystyle 0.2=c_{1}e^{(0)}+c_{2}e^{(0)}+e^{(0)}+3e^{(0)}\!}$

${\displaystyle 0.2=c_{1}+c_{2}+1+{\frac {1}{5}}\!}$

${\displaystyle \therefore c_{1}+c_{2}=-1\!}$. (2)

And now we can determine the first order ODE :

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

The second initial condition that was given to us, ${\displaystyle y'(0)=0.05\!}$ can now be plugged in:

${\displaystyle 0.05={\frac {1}{4}}c_{1}e^{{\frac {1}{4}}(0)}+{\frac {1}{2}}c_{2}e^{{\frac {1}{2}}(0)}+e^{(0)}-{\frac {1}{5}}e^{(0)}\!}$

${\displaystyle 0.05={\frac {1}{4}}c_{1}e^{(0)}+{\frac {1}{2}}c_{2}e^{(0)}+e^{(0)}-{\frac {1}{5}}e^{(0)}\!}$

${\displaystyle 0.05={\frac {1}{4}}c_{1}+{\frac {1}{2}}c_{2}+1-{\frac {1}{5}}\!}$

${\displaystyle {\frac {1}{4}}c_{1}+{\frac {1}{2}}c_{2}=-0.75\!}$

${\displaystyle \therefore c_{1}+2c_{2}=-3\!}$ (3)

Once we solve (2) and (3), we can get the values:

${\displaystyle c_{1}=1,c_{2}=-2\!}$.

And once we substitute these values, we get the following solution for this IVP:

             ${\displaystyle y=e^{{\frac {1}{4}}x}-2e^{{\frac {1}{2}}x}+e^{x}+{\frac {1}{5}}e^{-x}\!}$


#### (K 2011 pg.85 #14)

${\displaystyle y''+4y'+4y=e^{-2x}sin2x\!}$ (1)

Initial conditions are:

${\displaystyle y(0)=1,y'(0)=-1.5\!}$

#### Solution

The general solution of the homogeneous ordinary differential equation is

${\displaystyle y''+4y'+4y=0\!}$

We can use this information to determine the characteristic equation:

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

And proceeding to find the roots,

${\displaystyle (\lambda +2)(\lambda +2)=0\!}$

Solving for the roots, we find that ${\displaystyle \lambda =-2,-2\!}$

where the general solution is:

${\displaystyle y_{k}=c_{1}e^{-2x}+c_{2}e^{-2x}x\!}$, or:

${\displaystyle y_{k}=(c_{1}+c_{2}x)e^{-2x}\!}$

Now, according to the Modification Rule and Table 2.1 in Section 2.7, we know that we have to multiply by x to get:

${\displaystyle y_{p}=e^{-2x}(Kxcos2x+Mxsin2x)\!}$, since the solution of ${\displaystyle y_{k}\!}$ is a double root of the characteristic equation.

We can then derive to get ${\displaystyle y_{p}'\!}$:

${\displaystyle y_{p}'=-2e^{-2x}(Kxcos2x+Mxsin2x)+e^{-2x}(Kcos2x-2Kxsin2x+Msin2x+2Mxcos2x)\!}$

${\displaystyle y_{p}'=(-2K+2M)e^{-2x}xcos2x+(-2M-2K)e^{-}2xxsin2x+Ke^{-2x}cos2x+Me^{-2x}sinx\!}$

Deriving once again to solve for ${\displaystyle y_{p}''\!}$, we get the following:

${\displaystyle y_{p}''=4e^{-2x}(Kxcos2x+Mxsin2x)-2e^{-2x}(Kcos2x-2Kxsin2x+Msin2x+2Mxcos2x)-2e^{-2x}(Kcos2x-2Kxsin2x+Msin2x+2Mxcos2x)\!}$

${\displaystyle y_{p}''=4e^{-2x}(Kxcos2x+Mxsin2x)-4e^{-2x}(Kcos2x-2Kxsin2x+Msin2x+2Mxcos2x)+e^{-2x}(-4Ksin2x-4Kxcos2x+4Mcos2x-4Mxsin2x)\!}$

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

Now, we can substitute the values (${\displaystyle y_{p},y_{p}',y_{p}''\!}$) into (1) to get:

${\displaystyle (-4K+4M)e^{-2x}cos2x+(-4M-4K)e^{-2x}sin2x+4((-2K+2M)e^{-2x}xcos2x+(-2M-2K)e^{-2x}xsin2x+Ke^{-2x}cos2x+Me^{-2x}sinx)+4(e^{-2x}(Kxcos2x+Mxsin2x))=e^{2x}sin2x\!}$

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

Now that we have this equation, we can equate coefficients to find that:

${\displaystyle -3K+4M=0\!}$ and ${\displaystyle -4K-3M=1\!}$

and finally discover that:

${\displaystyle M=-{\frac {3}{25}}\!}$ and ${\displaystyle K=-{\frac {4}{25}}\!}$.

Plugging in these values in ${\displaystyle y_{p}\!}$, we find that:

${\displaystyle y_{p}=e^{-2x}(-{\frac {4}{25}}xcos2x-{\frac {3}{25}}xsin2x)\!}$

And finally, we arrive at the general solution of the given ordinary differential equation:

${\displaystyle y=y_{k}+y_{p}\!}$

${\displaystyle y=(c_{1}+c_{2}x)e^{-2x}+e^{-2x}(-{\frac {4}{25}}xcos2x-{\frac {3}{25}}xsin2x)\!}$

Solving for the initial conditions given and first plugging in ${\displaystyle y(0)=1\!}$, we get that:

${\displaystyle 1=(c_{1}+c_{2}(0))e^{-2(0)}+e^{-2(0)}(-{\frac {4}{25}}(0)cos2(0)-{\frac {3}{25}}(0)sin2(0))\!}$

${\displaystyle 1=(c_{1}+c_{2}(0))e^{0}\!}$

${\displaystyle \therefore c_{1}=1\!}$

The second initial condition that was given to us, ${\displaystyle y'(0)=-1.5\!}$ can now be plugged in:

${\displaystyle y'=-{\frac {1}{5}}e^{-}2x(10c_{1}+10c_{2}x-5c_{2}+(3-14x)sin2x+(4-2x)cos(2x))\!}$

${\displaystyle -1.5=-{\frac {1}{5}}(10c_{1}-5c_{2}+4)\!}$

${\displaystyle \therefore c_{2}=-3.5\!}$

And once we substitute these values, we get the following solution for this IVP:

                ${\displaystyle y=(1-3.5x)e^{-2x}+e^{-2x}(-{\frac {4}{25}}xcos2x-{\frac {3}{25}}xsin2x)\!}$


Egm4313.s12.team11.perez.gp 20:34, 22 February 2012 (UTC)