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

Report 3

## R 3.1

### Question

Consider the following L2-ODE-CC:

${\displaystyle \displaystyle y^{''}-10y^{'}+25y=7e^{5x}-2x^{2}}$

With initial conditions y(0)=4 , y'(0)=-5

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

### Solution

General solution of our ODE:

${\displaystyle \displaystyle y^{''}-10y^{'}+25y=0}$

${\displaystyle \displaystyle a^{2}-4b=10^{2}-4(25)=0\Rightarrow }$ double real roots

${\displaystyle \displaystyle \lambda =\lambda _{1}=\lambda _{2}=-{\frac {a}{2}}=-{\frac {-10}{2}}=5}$

Giving us a general solution of:

${\displaystyle \displaystyle y_{g}=(c_{1}+c_{2}x)e^{5x}}$

Particular solution of our ODE by method of undetermined coefficients:

Since our excitation r(x) is of the form ${\displaystyle \displaystyle r(x)=ke^{\gamma x}-kx^{n}}$

Our two particular solutions will be of the form:

${\displaystyle \displaystyle y_{p1}=Cx^{2}e^{\gamma x},y_{p2}=K_{2}x^{2}+K_{1}x+K_{0}}$

• Have to multiply ${\displaystyle \displaystyle y_{p1}}$ by ${\displaystyle \displaystyle x^{2}}$ because the ${\displaystyle \displaystyle e^{5x}}$ term already appears in the general solution.

Taking derivatives of ${\displaystyle \displaystyle y_{p1}}$:

${\displaystyle \displaystyle y_{p1}=Cx^{2}e^{5x}}$
${\displaystyle \displaystyle y_{p1}^{'}=2Cxe^{5x}+5Cx^{2}e^{5x}}$
${\displaystyle \displaystyle y_{p1}^{''}=2Ce^{5x}+10Cxe^{5x}+10Cxe^{5x}+25Cx^{2}e^{5x}}$

Substituting derivatives into the original ODE and collecting like terms:

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

${\displaystyle \displaystyle 2C=7\Rightarrow C={\frac {7}{2}}}$

Giving us our first particular solution:

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

Taking derivatives of ${\displaystyle \displaystyle y_{p2}}$:

${\displaystyle \displaystyle y_{p2}=K_{2}x^{2}+K_{1}x+K_{0}}$
${\displaystyle \displaystyle y_{p2}^{'}=2K_{2}x+K_{1}}$
${\displaystyle \displaystyle y_{p2}^{''}=2K_{2}}$

Substituting derivatives into original ODE and collecting like terms:

${\displaystyle \displaystyle 25K_{2}=-2\Rightarrow K_{2}=-{\frac {2}{25}}}$
${\displaystyle \displaystyle -20K_{2}+25K_{1}=0\Rightarrow K_{1}=-{\frac {8}{125}}}$
${\displaystyle \displaystyle 2K_{2}-10K_{1}+25K_{0}=0\Rightarrow K_{0}=-{\frac {12}{625}}}$

Giving us our second particular solution:

${\displaystyle \displaystyle y_{p2}=-{\frac {2}{25}}x^{2}-{\frac {8}{125}}x-{\frac {12}{625}}}$

With a final solution being the sum of the general and particular solutions:

${\displaystyle \displaystyle y=y_{g}+y_{p1}+y_{p2}}$
${\displaystyle \displaystyle y=(c1+c2x)e^{5x}+{\frac {7}{2}}x^{2}e^{5x}-{\frac {2}{25}}x^{2}-{\frac {8}{125}}x-{\frac {12}{625}}}$

Using initial conditions to solve for c1 and c2:

${\displaystyle \displaystyle y(0)=4\Rightarrow 4=c_{1}-{\frac {12}{625}}\Rightarrow c_{1}={\frac {2512}{625}}}$

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

${\displaystyle \displaystyle -5=5c_{1}+c_{2}-{\frac {8}{125}}\Rightarrow c_{2}=-{\frac {3129}{125}}}$

Final solution:

${\displaystyle \displaystyle y=({\frac {2512}{625}}-{\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}}}$

Matlab Code:

x=0:0.001:10;
y=((2512/625)-(3129/125).*x).*exp(5*x)+(7/2).*x.^2.*exp(5*x)-(2/25).*x.^2-(8/125).*x-(12/625);
plot(x,y),xlabel('x'),ylabel('y(x)')

Solution in example on P.7-3

${\displaystyle \displaystyle y=4e^{5x}-25xe^{5x}+{\frac {7}{2}}x^{2}e^{5x}}$

Matlab code:

x=0:0.001:10;
y=4.*exp(5*x)-25.*x.*exp(5*x)+(7/2).*x.^2.*exp(5*x);
plot(x,y),xlabel('x'),ylabel('y(x)')

### Author

This problem was solved and uploaded by: Joshua House

This problem was proofread by: David Herrick

## R 3.2

### Question

#### Part 1

Find the homogeneous L2-ODE-CC having the following roots: ${\displaystyle \displaystyle \lambda _{1}=\lambda ,\lambda _{2}=\lambda +\varepsilon }$

#### Part 2

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

#### Part 3

Find the limit of the homogeneous solution as ${\displaystyle \displaystyle \varepsilon \to 0}$

#### Part 4

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

#### Part 5

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

#### Part 6

Compute (2) using ${\displaystyle \displaystyle \lambda =5}$ and ${\displaystyle \displaystyle \varepsilon =0.001}$ and compare to the value obtained from the exact 2nd homogeneous solution

### Solution

#### Part 1

Letting ${\displaystyle \displaystyle \lambda _{1}=x,\lambda _{2}=x+\epsilon }$
${\displaystyle \displaystyle (\lambda -x)(\lambda -[x+\varepsilon ])=0}$
${\displaystyle \displaystyle \lambda ^{2}-\lambda x-\lambda \varepsilon -\lambda x+x^{2}+x\varepsilon =0}$
${\displaystyle \displaystyle \lambda ^{2}-\lambda [2x+\varepsilon ]+x[x+\varepsilon ]=0}$
Replacing the x's with lambda's:
${\displaystyle \displaystyle y^{''}-y^{'}[2\lambda +\varepsilon ]+y\lambda [\lambda +\varepsilon ]=0}$

#### Part 2

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

Plugging this into the original ODE ${\displaystyle \displaystyle y^{''}-y^{'}[2\lambda +\varepsilon ]+y\lambda [\lambda +\varepsilon ]=0}$ and collecting like terms:

${\displaystyle \displaystyle e^{(\lambda +\varepsilon )x}[\lambda ^{2}+2\lambda \varepsilon +\varepsilon ^{2}-2\lambda ^{2}-2\lambda \varepsilon -\lambda \varepsilon -\varepsilon ^{2}+\lambda ^{2}+\varepsilon \lambda ]+e^{\lambda x}[-\lambda ^{2}+2\lambda ^{2}+\lambda \varepsilon -\lambda ^{2}-\lambda \varepsilon ]=0}$

• Much of the trivial algebra was left out in order to greatly reduce coding time. These intermediate steps, which were done on paper, can be presented if necessary.

From inspection, all of the bracketed terms add up to zero, thus verifying we were given a correct homogeneous solution.

#### Part 3

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

Since the limit of the numerator and the limit of the denominator are both 0 as epsilon approaches 0, we can use L'Hopitals rule to find the limit of the entire function

L'Hopital's Rule:

If: ${\displaystyle \displaystyle \lim _{\varepsilon \rightarrow 0}{\frac {f'(\varepsilon )}{g'(\varepsilon )}}}$ exists

And: ${\displaystyle \displaystyle \lim _{\varepsilon \rightarrow 0}f(\varepsilon )=\lim _{\varepsilon \rightarrow 0}g(\varepsilon )=0}$

Then: ${\displaystyle \displaystyle \lim _{\varepsilon \rightarrow 0}{\frac {f(\varepsilon )}{g(\varepsilon )}}=\lim _{\varepsilon \rightarrow 0}{\frac {f'(\varepsilon )}{g'(\varepsilon )}}}$

Taking derivatives of the numerator and denominating with respect to epsilon, and finding the limit as epsilon approaches 0:

${\displaystyle \displaystyle \lim _{\varepsilon \rightarrow 0}{\frac {xe^{(\lambda +\varepsilon )x}}{1}}=xe^{\lambda x}}$

#### Part 4

${\displaystyle \displaystyle {\frac {d[e^{\lambda x}]}{d\lambda }}=xe^{\lambda x}}$

#### Part 5

The results from (3) and (4) show that ${\displaystyle \displaystyle {\frac {d[e^{\lambda x}]}{d\lambda }}=\lim _{e\rightarrow 0}{\frac {e^{(\lambda +\varepsilon )x}-e^{\lambda x}}{\varepsilon }}=xe^{\lambda x}}$

#### Part 6

From ${\displaystyle \displaystyle {\frac {e^{(\lambda +\varepsilon )x}-e^{\lambda x}}{\varepsilon }}}$ and letting ${\displaystyle \displaystyle \lambda =5,\varepsilon =0.001}$

${\displaystyle \displaystyle {\frac {e^{5.001x}-e^{5x}}{0.001}}}$

Comparing this to the value of the exact 2nd homogeneous solution (values were plugged into the expression in part 2)

${\displaystyle \displaystyle e^{5.001x}[5^{2}+2(5)(0.001)+0.001^{2}-2(5^{2})-2(5)(0.001)-5(0.001)-(0.001^{2})+5^{2}+0.001(5)]+e^{5x}[-5^{2}+2(5^{2})+5(0.001)-5^{2}-5(0.001)]=0}$

### Author

This problem was solved and uploaded by: Joshua House

This problem was proofread by: Michael Wallace

## R 3.3

### Question

Find the complete solution for equation 5 from pg. 7.7 in the notes:

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

with initial conditions given as:

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

Plot the solution.

### Solution

First, find the homogenous solution to this differential equation, i.e. where r(x) = 0.

${\displaystyle \displaystyle \ y''_{h}-3y'_{h}+2y_{h}=0\ }$

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

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

Thus, the homogenous solution is of the form ${\displaystyle \displaystyle \ y_{h}=C_{1}e^{\lambda _{1}x}+C_{2}e^{\lambda _{2}x}\ }$

Plugging in the answers for lambda yields:

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

Now to solve for the particular solution, we must look at the excitation: ${\displaystyle \displaystyle \ r(x)=4x^{2}\ }$

A particular solution to an excitation of the form ${\displaystyle \displaystyle \ Cx^{n}\ }$ is defined as ${\displaystyle \displaystyle \ \sum _{j=0}^{n}c_{j}x^{j}\ }$

Thus, ${\displaystyle \displaystyle \ y_{p}=c_{0}+c_{1}x+c_{2}x^{2}\ }$

To solve for the 3 unknown constants, plug the particular solution into the differential equation:

${\displaystyle \displaystyle \ y_{p}''-3y_{p}'+2y_{p}=4x^{2}\ }$

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

${\displaystyle \displaystyle \ y_{p}'=2c_{2}x+c_{1}\ }$

${\displaystyle \displaystyle \ y_{p}''=2c_{2}\ }$

Substituting these relations into the equation we get:

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

Grouping like terms we get:

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

Matching up the coefficients for the ${\displaystyle \displaystyle \ x^{2}\ }$ term on the left and right sides we get:

${\displaystyle \displaystyle \ 2c_{2}=4\ }$

Therefore ${\displaystyle \displaystyle \ c_{2}=2\ }$

Matching up the coefficients for the ${\displaystyle \displaystyle \ x\ }$ term on the left and right sides we get:

${\displaystyle \displaystyle \ 2c_{1}-6c_{2}=0\ }$

Therefore ${\displaystyle \displaystyle \ c_{1}=6c_{2}/2=6(2)/2=6\ }$

Finally, matching up the coefficients for the constant terms on the left and right sides we get:

${\displaystyle \displaystyle \ 2c_{2}-3c_{1}+2c_{0}=0\ }$

Therefore ${\displaystyle \displaystyle \ c_{0}=(3c_{1}-2c_{2})/2=(3(6)-2(2))/2=(18-4)/2=7\ }$

The particular solution is then: ${\displaystyle \displaystyle \ y_{p}=2x^{2}+6x+7\ }$

The general solution is the sum of the homogenous solution and the particular solution, therefore:

${\displaystyle \displaystyle \ y(x)=y_{h}+y_{p}=C_{1}e^{x}+C_{2}e^{2x}+2x^{2}+6x+7\ }$

To solve for the 2 remaining unknown constants, we use our initial conditions from the problem statement.

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

To use the second initial condition, we must take a derivative of our general solution.

${\displaystyle \displaystyle \ y'(x)=C_{1}e^{x}+2C_{2}e^{2x}+4x+6\ }$

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

Rewriting the equations we get:

${\displaystyle \displaystyle \ C_{1}+2C_{2}+6=0\ }$

${\displaystyle \displaystyle \ C_{1}+C_{2}+6=0\ }$

Subtracting these equations we get:

${\displaystyle \displaystyle \ C_{2}=0\ }$

Therefore: ${\displaystyle \displaystyle \ C_{1}=-6-C_{2}=-6\ }$

Thus the complete solution is:

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

MATLAB code;

x = 0:0.001:10;

y = 2*x.^2 + 6*x + 7 - 6*exp(x);

plot(x,y)

xlabel( 'x')

ylabel( 'y(x)')

### Author

This problem was solved and uploaded by: David Herrick

This problem was proofread by: Michael Wallace

## R 3.4

### Question

Use the Basic Rule (1) and the Sum Rule (3) on p.7-2 of the notes to show that the appropriate particular solution for:

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

is of the form:

${\displaystyle \ y_{p}(x)=\sum _{j=0}^{5}c_{j}x^{j}\ }$

with n = 5, i.e. (1) on p.7-12.

### Solution

From the Basic Rule:

${\displaystyle \ r_{1}(x)=4x^{2}\ }$
${\displaystyle \ r_{2}(x)=6x^{5}\ }$

Therefore, from Table 2.1:

${\displaystyle y_{p_{1}}(x)=K_{2}x^{2}+K_{1}x+K_{0}}$ since k = 4, x = x, and n = 2.
${\displaystyle y_{p_{2}}(x)=K_{5}x^{5}+K_{4}x^{4}+K_{3}x^{3}+K_{2}x^{2}+K_{1}x+K_{0}}$ since k = 6, x = x, and n = 5.

For ${\displaystyle y_{p_{1}}(x)}$:

${\displaystyle \ y_{p_{1}}'(x)=2K_{2}x+K_{1}\ }$
${\displaystyle \ y_{p_{1}}''(x)=2K_{2}\ }$

Substituting ${\displaystyle y_{p_{1}}(x)}$ into the original equation gives:

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

Comparing the ${\displaystyle x^{2}}$, ${\displaystyle x}$, and ${\displaystyle x^{0}}$ coefficients gives:
For ${\displaystyle x^{2}}$: ${\displaystyle \ 2K_{2}=4\ }$ Therefore ${\displaystyle K_{2}=2}$.
For ${\displaystyle x}$: ${\displaystyle \ 2K_{1}+3K_{2}=0\ }$ Therefore ${\displaystyle K_{1}=-3}$.
For ${\displaystyle x^{0}}$: ${\displaystyle \ 2K_{2}+3K_{1}+2K_{0}=0\ }$ Therefore ${\displaystyle K_{0}=2.5}$.
Therefore, ${\displaystyle y_{p_{1}}(x)=2x^{2}-3x+2.5}$.
For ${\displaystyle y_{p_{2}}(x)}$:

${\displaystyle \ y_{p_{2}}'(x)=5K_{5}x^{4}+4K_{4}x^{3}+3K_{3}x^{2}+2K_{2}x+K_{1}\ }$
${\displaystyle \ y_{p_{2}}''(x)=20K_{5}x^{3}+12K_{4}x^{2}+6K_{3}x+2K_{2}\ }$

Substituting ${\displaystyle y_{p_{1}}(x)}$ into the original equation 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})=4x^{2}-6x^{5}\ }$

Simplifying yields:

${\displaystyle \ x^{5}(K_{5})+x^{4}(K_{4}-15K_{5})+x^{3}(K_{3}-12K_{4}+40K_{5})+x^{2}(K_{2}-9K_{3}+24K_{4})+x(K_{1}-6K_{2}+12K_{3})+(K_{0}-3K_{1}+4K_{2})=4x^{2}-6x^{5}\ }$

Comparing the ${\displaystyle x^{5}}$, ${\displaystyle x^{4}}$, ${\displaystyle x^{3}}$, ${\displaystyle x^{2}}$, ${\displaystyle x}$, and ${\displaystyle x^{0}}$ coefficients gives:
For ${\displaystyle x^{5}}$: ${\displaystyle \ K_{5}=-6\ }$ Therefore ${\displaystyle K_{5}=-6}$.
For ${\displaystyle x^{4}}$: ${\displaystyle \ K_{4}-15K_{5}=0\ }$ Therefore ${\displaystyle K_{4}=-90}$.
For ${\displaystyle x^{3}}$: ${\displaystyle \ K_{3}-12K_{4}+40K_{5}=0\ }$ Therefore ${\displaystyle K_{3}=840}$.
For ${\displaystyle x^{2}}$: ${\displaystyle \ K_{2}-9K_{3}+24K_{4}=0\ }$ Therefore ${\displaystyle K_{2}=-9724}$.
For ${\displaystyle x}$: ${\displaystyle \ K_{1}-6K_{2}+12K_{3}=0\ }$ Therefore ${\displaystyle K_{1}=59425}$.
For ${\displaystyle x^{0}}$: ${\displaystyle \ K_{0}-3K_{1}+4K_{2}=0\ }$ Therefore ${\displaystyle K_{0}=-217171}$.
Therefore, ${\displaystyle y_{p_{2}}(x)=-6x^{5}-90x^{4}+840x^{3}-9724x^{2}+59425x-217171}$
By the Sum Rule:

${\displaystyle \ y_{p}(x)=y_{p_{1}}(x)+y_{p_{2}}(x)\ }$
${\displaystyle \ y_{p}(x)=(2x^{2}-3x+2.5)+(-6x^{5}-90x^{4}+840x^{3}-9724x^{2}+59425x-217171)\ }$

Simplifying gives:

${\displaystyle \ y_{p}(x)=-6x^{5}-90x^{4}+840x^{3}-9722x^{2}+59422x-217168.5\ }$

Choose:

${\displaystyle \ K_{5}=-6\ }$
${\displaystyle \ K_{4}=-90\ }$
${\displaystyle \ K_{3}=840\ }$
${\displaystyle \ K_{2}=-9722\ }$
${\displaystyle \ K_{1}=59422\ }$
${\displaystyle \ K_{0}=-217168.5\ }$

Then the equation becomes of the form:

${\displaystyle \ y_{p}(x)=\sum _{j=0}^{n}(c_{j}x^{j})\ }$ where n = 5.

### Author

This problem was solved and uploaded by John North.

This problem was proofread by Michael Wallace

## R 3.5

### Question

Complete the solution for ${\displaystyle \ y''-3y'+2y=4x^{2}-6x^{5}\ }$ ( (2) p. 7-11) ) as follows:

#### Part 1

1) Obtain equations (2) - (4) and (6) p. 7-14

(2) Coefficients of ${\displaystyle \ x\ }$:

(3) Coefficients of ${\displaystyle \ x^{2}\ }$:

(4) Coefficients of ${\displaystyle \ x^{3}\ }$:

(6) Coefficients of ${\displaystyle \ x^{5}\ }$:

#### Part 2

Verify all equations by long hand expansion of the series in (4) p. 7-12, instead of using the series in (2) p. 7-13.

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

#### Part 3

Put the system of equations for ${\displaystyle \ \left\{c_{0},...,c_{5}\right\}\ }$ in matrix form.

#### Part 4

Solve for the coefficients ${\displaystyle \ \left\{c_{0},...,c_{5}\right\}\ }$ by back substitution.

#### Part 5

Consider the initial conditions:

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

Find the solution y(x) and plot it.

### Solution

#### Part 1

For all the coefficient equations, we will use the series from (2) p. 7-13

${\displaystyle \ \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_{4}x^{4}+c_{5}x^{5}\right]=4x^{2}-6x^{5}\ }$

Solving for the coefficients of x, we use j = 1.

${\displaystyle \ (c_{3}(3)(2)-3c_{2}(2)+2c_{1})x\ }$.

These are the coefficients for x on the left hand side of the equation, and the coefficients for x on the right hand side = 0.

Coefficients of x: ${\displaystyle \ 6c_{3}-6c_{2}+2c_{1}=0\ }$

Solving for the coefficients of ${\displaystyle \ x^{2}\ }$ we use j = 2.

${\displaystyle \ (c_{4}(4)(3)-3c_{3}(3)+2c_{2})x^{2}\ }$

These are the coefficients for ${\displaystyle \ x^{2}\ }$ on the left hand side of the equation, and the coefficients for ${\displaystyle \ x^{2}\ }$ on the right hand side = 4

Coefficients of ${\displaystyle \ x^{2}\ }$: ${\displaystyle \ 12c_{4}-9c_{3}+2c_{2}=4\ }$

Solving for the coefficients of ${\displaystyle \ x^{3}\ }$ we use j = 3.

${\displaystyle \ (c_{5}(5)(4)-3c_{4}(4)+2c_{3})x^{3}\ }$

These are the coefficients for ${\displaystyle \ x^{3}\ }$ on the left hand side of the equation, and the coefficients for ${\displaystyle \ x^{3}\ }$ on the right hand side = 0

Coefficients of ${\displaystyle \ x^{3}\ }$: ${\displaystyle \ 20c_{5}-12c_{4}+2c_{3}=0\ }$

Solving for the coefficients of ${\displaystyle \ x^{5}\ }$, all we have is ${\displaystyle \ 2c_{5}x^{5}\ }$

This is the only coefficient of ${\displaystyle \ x^{5}\ }$ on the left hand side of the equation, and the coefficients for ${\displaystyle \ x^{5}\ }$ on the right hand side = -6

Coefficients of ${\displaystyle \ x^{5}\ }$: ${\displaystyle \ 2c_{5}=-6\ }$

#### Part 2

Expanding the 3 series using j = 0 to 5, we get:

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

Simplifying and grouping like terms we get:

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

Compared to the answers of part 1, it can be seen that all the coefficients are equivalent, verifying that the two series are equivalent.

#### Part 3

Matrix form of the solution:

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

#### Part 4

Solving by back substitution, the first constant we solve for is c5

${\displaystyle \ 2c_{5}=-6\ }$

${\displaystyle \ c_{5}=-3\ }$

${\displaystyle \ -15c_{5}+2c_{4}=0\ }$

${\displaystyle \ -15(-3)+2c_{4}=0\ }$

${\displaystyle \ c_{4}=-22.5\ }$

${\displaystyle \ 20c_{5}-12c_{4}+2c_{3}=0\ }$

${\displaystyle \ 20(-3)-12(-22.5)+2c_{3}=0\ }$

${\displaystyle \ c_{3}=-105\ }$

${\displaystyle \ 12c_{4}-9c_{3}+2c_{2}=4\ }$

${\displaystyle \ 12(-22.5)-9(-105)+2c_{2}=4\ }$

${\displaystyle \ c_{2}=-335.5\ }$

${\displaystyle \ 6c_{3}-6c_{2}+2c_{1}=0\ }$

${\displaystyle \ 6(-105)-6(-335.5)+2c_{1}=0\ }$

${\displaystyle \ c_{1}=-691.5\ }$

${\displaystyle \ 2c_{2}-3c_{1}+2c_{0}=0\ }$

${\displaystyle \ 2(-335.5)-3(-691.5)+2c_{0}=0\ }$

${\displaystyle c_{0}=-701.75\ }$

#### Part 5

The particular solution is of the form ${\displaystyle \ y_{p}=c_{0}+c_{1}x+c_{2}x^{2}+c_{3}x^{3}+c_{4}x^{4}+c_{5}x^{5}\ }$

Therefore, the particular solution to the differential equation = ${\displaystyle \ y_{p}=-701.75-691.5x-335.5x^{2}-105x^{3}-22.5x^{4}-3x^{5}\ }$

To find the general solution, we need to add the particular solution to the homogenous solution.

The homogenous solution is given by:

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

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

Therefore the general solution is:

${\displaystyle \ y_{h}+y_{p}=C_{1}e^{x}+C_{2}e^{2x}-701.75-691.5x-335.5x^{2}-105x^{3}-22.5x^{4}-3x^{5}\ }$

Now using the initial conditions to solve for the remaining constants we need the general solution and the derivative of the general solution.

${\displaystyle \ y'(x)=C_{1}e^{x}+2C_{2}e^{2x}-691.5-671x-315x^{2}-90x^{3}-15x^{4}\ }$

${\displaystyle \ y(0)=1=C_{1}+C_{2}-701.75\ }$

${\displaystyle \ y'(0)=0=C_{1}+2C_{2}-691.5\ }$

We can move the 1 over, and then subtract the equations to solve for ${\displaystyle \ C_{2}\ }$

${\displaystyle \ -C_{2}-11.25=0\Rightarrow C_{2}=-11.25\ }$

${\displaystyle \ C_{1}+C_{2}-701.75=1\ }$

${\displaystyle \ C_{1}=1+701.75--11.25=714\ }$

Therefore the final general solution y(x) is:

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

Matlab code: x = 0:0.001:100;

y = 714*exp(x) - 11.25*exp(2*x) - 701.75 - 691.5*x - 335.5*x.^2 - 105*x.^3 - 22.5*x.^4 - 3*x.^5;

plot(x,y)

xlabel('x')

ylabel('y(x)')

### Author

This problem was solved and uploaded by: David Herrick

This problem was proofread by Michael Wallace

## R 3.6

### Question

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
Because of the specific excitation ${\displaystyle r_{2}(x)=-6x^{5}\!}$ , using table 2.1 from K 2011 p.82, the correct form for the particular solution is ${\displaystyle y_{p}(x)=\sum _{j=0}^{n}K_{j}x^{j}\!}$
Then the following is presented:
${\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}\!}$

Plug these equations back into 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}\!}$

Use coefficient matching, the following equations are a result:
${\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\!}$
Use 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}}\!}$

Plug 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}\!}$ :

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

Superposition principle applies ( L2-ODE-CC ), ${\displaystyle y_{p}=y_{p,1}+y_{p,2}\!}$ gives the general particular solution:

${\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\!}$
Because of the linearity, a combination of two linear independent solutions is also a solution to this homogeneous equation:
${\displaystyle y_{h,1}''-3y_{h,1}'+2y_{h,1}=0\!}$
${\displaystyle y_{h,2}''-3y_{h,2}'+2y_{h,2}=0\!}$

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

To determine the value of ${\displaystyle \lambda _{1,2}\!}$, the characteristic equation must be determined 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\!}$

The solutions for each distinct linearly independent homogeneous equation become:
${\displaystyle y_{h,1}=e^{2x}\!}$
${\displaystyle y_{h,2}=e^{x}\!}$

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

#### General Solution

The general or 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}\!}$

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

### Author

This problem was solved and uploaded by Derik Bell

This problem was proofread by Michael Wallace

## R 3.7

### Question

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

Equation (1)

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

Equation (2)

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

### Solution

Expanding both sides of Equation (1) yields the following expression:

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

Therefore, they are equivalent.

Expanding both sides of Equation (2) yields the following expression:
${\displaystyle \displaystyle 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}=c_{1}+2c_{2}x+3c_{3}x^{2}+4c_{4}x^{3}+5c_{5}x^{4}}$

Therefore, they are equivalent.

### Author

This problem was solved and uploaded by: William Knapper

This problem was proofread by: Joshua House

## R 3.8

### Question

K 2011 p84 pbs. 5,6
Find a (real) general solution. State which rule you are using. Show each step of your work.

### Problem 5 Solution

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

Step 1: General Solution of the Homogeneous ODE
Characteristic Equation:

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

Solve for the determinate:

${\displaystyle \ a^{2}-4b=16-16=0\ }$

Indicates a double real root, therefore:

${\displaystyle \ y_{h}=e^{{\frac {-a}{2}}x}(C_{1}+C_{2}x)\ }$
${\displaystyle =e^{{\frac {-4}{2}}x}(C_{1}+C_{2}x)=e^{2x}(C_{1}+C_{2}x)\ }$

Step 2: Particular solution ${\displaystyle \ y_{p}\ }$ of the non-homogeneous ODE.
Using the Basic Rule and Table 2.1:

${\displaystyle \ r(x)=e^{-x}cos(x)\ }$
${\displaystyle \ y_{p}(x)=e^{-x}(K\cos(x)+M\sin(x))\ }$ since k = 1, alpha = -1, and omega = 1.

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

Plugging particular solution to original equation:

${\displaystyle \ e^{-x}(\sin(x)(2K)+\cos(x)(2M))+4(e^{-x}(\cos(x)(M-K)-\sin(x)(K+M)))+4(e^{-x}(K\cos(x)+M\sin(x)))=e^{-x}\cos(x)\ }$

Simplifying and canceling gives:

${\displaystyle \ \sin(x)(2K)+\cos(x)(2M)+\cos(x)(4M-4K)-\sin(x)(4K+4M)+\cos(x)(4K)+\sin(x)(4M)=\cos(x)\ }$

Further simplification gives:

${\displaystyle \ \sin(x)(-2K)+\cos(x)(6M)=\cos(x)\ }$

Comparing sin(x) and cos(x) terms gives:

${\displaystyle \ -2K=0\ }$

Therefore K = 0.

${\displaystyle \ 6M=1\ }$

Therefore M = ${\displaystyle \ {\frac {1}{6}}\ }$.
Therefore the General Solution is:

${\displaystyle \ y_{g}(x)=y_{h}(x)+y_{p}(x)\ }$
${\displaystyle \ y_{g}(x)=e^{-2x}(C_{1}+C_{2}x)+e^{-x}({\frac {1}{6}}\sin(x))\ }$

### Problem 6 Solution

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

Step 1: Find the homogeneous solution to the ODE.
Characteristic Equation:

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

Find the Determinate:

${\displaystyle a^{2}-4b=1-4({\frac {1}{4}}+\pi ^{2})=-4\pi }$

Indicates unreal solutions. Therefore, real homogeneous solution is:

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

where:

${\displaystyle \ w=(b-{\frac {1}{4}}a^{2})^{\frac {1}{2}}\ =\pi \ }$

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

Step 2: Solution ${\displaystyle \ y_{p}\ }$ of the non-homogeneous ODE.
Using the Basic Rule and Table 2.1:

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

since alpha = ${\displaystyle \ {\frac {-1}{2}}\ }$, w = ${\displaystyle \ \pi \ }$, and k = 1.
Therefore:

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

Substituting in to the original equation:

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

Simplifying and Canceling gives:

${\displaystyle \ \cos(\pi x)(K\pi ^{2}-{\frac {1}{4}}K+M\pi ^{2}+{\frac {1}{4}}M)+\sin(\pi x)(-{\frac {1}{4}}M-M\pi ^{2}+K\pi ^{2}+{\frac {1}{2}}K)=\sin(\pi x)\ }$

Comparing ${\displaystyle \ \sin(\pi x)\ }$ and ${\displaystyle \ \cos(\pi x)\ }$ terms gives:

${\displaystyle \ K\pi ^{2}+-{\frac {1}{4}}K+M\pi ^{2}+{\frac {1}{4}}M=0\ }$
${\displaystyle \ -{\frac {1}{4}}M-M\pi ^{2}+K\pi ^{2}+{\frac {1}{2}}K=1\ }$

Solve for K and M:

${\displaystyle \ M\pi ^{2}={\frac {1}{4}}K-{\frac {1}{4}}M-K\pi ^{2}\ }$

Therefore:

${\displaystyle \ {\frac {1}{4}}M+K\pi ^{2}+{\frac {1}{2}}K-{\frac {1}{4}}K+{\frac {1}{4}}M+K\pi ^{2}-{\frac {1}{2}}M=1\ }$

Reducing gives:

${\displaystyle \ 2K\pi ^{2}+{\frac {1}{4}}K=1\ }$

Solving for K gives K = 0.05.
Therefore:

${\displaystyle \ 0.05\pi ^{2}-{\frac {1}{2}}(0.05)+M\pi ^{2}+{\frac {1}{4}}M=0\ }$

Solving for M gives M = -0.046.
Therefore:

${\displaystyle \ y_{g}(x)=y_{h}(x)+y_{p}(x)\ }$
${\displaystyle \ y_{g}(x)=e^{-2x}(A\cos(\pi x)+B\sin(\pi x))+e^{-{\frac {x}{2}}}(0.05\cos(\pi x)-0.046\sin(\pi x))\ }$

### Author

This problem was solved and uploaded by: John North

This problem was proofread by: Michael Wallace

## R 3.9

### Question

Solve the initial value problem. State which rule you are using. Show each step of your calculation in detail.
13. ${\displaystyle \displaystyle 8y''-6y'+y=6coshx,y(0)=0.2,y'(0)=0.05}$
14. ${\displaystyle \displaystyle y''+4y'+4y=e^{-2x}sin2x,y(0)=1,y'(0)=-1.5}$

### Solution

##### Problem 13

First, we find the homogeneous ODE solution

${\displaystyle \displaystyle 8\lambda ^{2}-6\lambda +1=0}$
${\displaystyle \displaystyle (4\lambda -1)(2\lambda -1)=0}$
${\displaystyle \displaystyle \lambda ={\frac {1}{4}},\lambda ={\frac {1}{2}}}$

which gives the general solution:

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

Second, we get the particular solution of the non homogeneous ODE.
We can substitute ${\displaystyle coshx={\frac {e^{x}+e^{-x}}{2}}}$
Using the sum rule we know that ${\displaystyle y_{p}=y_{p1}+y_{p2}}$.
Then using Table 2.1 we can solve:

${\displaystyle \displaystyle y_{p1}=c_{3}e^{x},y_{p2}=c_{4}e^{-x}}$

Then we get

${\displaystyle \displaystyle y_{p}=c_{3}e^{x}+c_{4}e^{-x}}$
${\displaystyle \displaystyle y_{p}'=c_{3}e^{x}-c_{4}e^{-x}}$
${\displaystyle \displaystyle y_{p}''=c_{3}e^{x}+c_{4}e^{-x}}$

The original ODE becomes:

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

Substituting ${\displaystyle y_{p}}$ into the original ODE and separating into the two components we get:

${\displaystyle \displaystyle 8c_{3}-6c_{3}+c_{3}=3}$

and

${\displaystyle \displaystyle 8c_{4}+6c_{4}+c_{4}=3}$

Solving these two equations we get:

${\displaystyle \displaystyle c_{3}=1}$
${\displaystyle \displaystyle c_{4}={\frac {1}{5}}}$

Thus,

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

We know that ${\displaystyle y=y_{h}+y_{p}}$.
so,

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

Finding the solution to the initial value problem:

${\displaystyle \displaystyle y(0)=0.2=c_{1}(1)+c_{2}(1)+1+{\frac {1}{5}}}$
${\displaystyle \displaystyle -1=c_{1}+c_{2}}$
${\displaystyle \displaystyle c_{2}=-c_{1}-1}$

${\displaystyle \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}}$
${\displaystyle \displaystyle y'(0)=0.05={\frac {1}{4}}c_{1}(1)+{\frac {1}{2}}c_{2}(1)+1-{\frac {1}{5}}}$
${\displaystyle \displaystyle -0.75={\frac {1}{4}}c_{1}+{\frac {1}{2}}c_{2}}$

Substituting the known value for ${\displaystyle c_{2}}$

${\displaystyle \displaystyle -0.75={\frac {1}{4}}c_{1}+{\frac {1}{2}}(-c_{1}-1)}$
${\displaystyle \displaystyle -0.75={\frac {1}{4}}c_{1}-{\frac {1}{2}}c_{1}-{\frac {1}{2}}}$
${\displaystyle \displaystyle -0.25=-{\frac {1}{4}}c_{1}}$

Solving this we find that:

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

The final solution is:

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

First, we find the homogeneous ODE solution

${\displaystyle \displaystyle \lambda ^{2}+4\lambda +4=0}$
${\displaystyle \displaystyle (\lambda +2)(\lambda +2)=0}$
${\displaystyle \displaystyle \lambda =-2,\lambda =-2}$

which gives the general solution:

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

Second, we get the particular solution of the non homogeneous ODE.
Using the sum rule and using Table 2.1 we can solve:

${\displaystyle \displaystyle y_{p}=e^{-2x}(Kcos2x+Msin2x)}$

${\displaystyle e^{-2x}}$ is a homogeneous solution so ${\displaystyle y_{p}}$ becomes:

${\displaystyle \displaystyle y_{p}=xe^{-2x}(Kcos2x+Msin2x)}$

Then we find:

${\displaystyle \displaystyle y_{p}'=(e^{-2x}-2xe^{-2x})(Kcos2x+Msin2x)+xe^{-2x}(-2Ksin2x+2Mcos2x)}$
${\displaystyle \displaystyle y_{p}'=Ke^{-2x}cos2x-2Kxe^{-2x}cos2x+Me^{-2x}sin2x-2Mxe^{-2x}sin2x-2Kxe^{-2x}sin2x+2Mxe^{-2x}cox2x}$
${\displaystyle \displaystyle y_{p}'=Ke^{-2x}cos2x+Me^{-2x}sin2x+(-2K-2M)xe^{-2x}sin2x+(-2K+2M)xe^{-2x}cos2x}$

And,

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

${\displaystyle \displaystyle y_{p}''=-2Ke^{-2x}cos2x-2Ke^{-2x}sin2x-M2e^{-2x}sin2x+2Me^{-2x}cos2x-2Ke^{-2x}cos2x+4Kxe^{-2x}sin2x+4Kxe^{-2x}cos2x}$
${\displaystyle \displaystyle +2Me^{-2x}cos2x-4Mxe{^{-}2x}cos2x-4Mxe^{-2x}sin2x-2Ke^{-2x}sin2x+4Kxe^{-2x}sin2x-4Kxe^{-2x}cos2x}$
${\displaystyle \displaystyle -2Me^{-2x}sin2x+4Mxe^{-2x}sin2x-4Mxe^{-2x}cos2x}$

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

Substituting ${\displaystyle y_{p}}$ into the original ODE:

${\displaystyle \displaystyle (-4K+4M)e^{-2x}cos2x+(-4K-4M)e^{-2x}sin2x+8Kxe^{-2x}sin2x-8Mxe^{-2x}cos2x-4Ke^{-2x}cos2x+4Me^{-2x}sin2x}$
${\displaystyle \displaystyle +(-8K-8M)xe^{-2x}sin2x+(-8K+8M)xe^{-2x}cos2x+4Kxe^{-2x}cos2x+4Mxe^{-2x}sin2x=e^{-2x}sin2x}$

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

Separating into components we get:

${\displaystyle \displaystyle -4K=1}$
${\displaystyle \displaystyle -8K+4M=0}$

Solving the two equations we get:

${\displaystyle \displaystyle K=-{\frac {1}{4}}}$
${\displaystyle \displaystyle M=-{\frac {1}{2}}}$

Thus,

${\displaystyle \displaystyle y_{p}=e^{-2x}(-{\frac {1}{4}}cos2x-{\frac {1}{2}}sin2x)}$

We know that ${\displaystyle y=y_{h}+y_{p}}$.
so,

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

Finding the solution to the initial value problem:

${\displaystyle \displaystyle y(0)=1=c_{1}(1)+(1)[-{\frac {1}{4}}(1)]}$

We solve,

${\displaystyle \displaystyle c_{1}=-{\frac {5}{4}}}$

Also,

${\displaystyle \displaystyle y'=-2c_{1}e^{-2x}-2c_{2}xe^{-2x}+c_{2}e^{-2x}-2e^{-2x}(-{\frac {1}{4}}cos2x-{\frac {1}{2}}sin2x)+e^{-2x}({\frac {1}{2}}sin2x-cos2x)}$
${\displaystyle \displaystyle y'(0)=-1.5=-2(-{\frac {5}{4}})(1)+c_{2}(1)-2(1)[-{\frac {1}{4}}(1)]+(1)(-1)}$

We solve,

${\displaystyle \displaystyle c_{2}=-3.5=-{\frac {7}{2}}}$

The final solution is:

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

### Author

This problem was proofread by: David Herrick

## Contribution Summary

Problems 3 and 5 were solved and Problems 1 and 9 were proofread by David Herrick

Problems 1 and 2 were solved and Problem 7 was proofread by Joshua House

Problem 9 was solved by Radina Dikova

Problems 4 and 8 were solved by John North

Problem 7 was solved by William Knapper

Problem 6 was solved by Derik Bell

Problems 2, 3, 4, 5, 6, and 8 were proofread by Michael Wallace