University of Florida/Egm4313/IEA-f13-team10/R4

Problem Statement
Solve the ODE: $$ y'' + 6y' + 9y = 8x -2x^7 $$

With the initial conditions:

$$ y(0) = 1$$

$$ y'(0) = .5$$

Plot the homogeneous solution

Plot the particular solution

Plot the overall solution

Solution
Homogeneous solution: $$ y_h (x) = C_1 e^ {-3x} + C_2 x e^{-3x} $$

So that $$ y_h'(x) = -3C_1e^{-3x} + C_2 e^{-3x} - 3C_2 x e^{-3x} $$

Solving for the initial conditions:

$$ y_h(0) = 1 = C_1 + 0 $$

$$ y_h'(0) = .5 = -3C_1 + C_2 - 0 $$

$$ C_1 = 1 $$ $$ C_2 = 3.5 $$

So the homogeneous solution is:

$$ y_h (x) = e^ {-3x} + 3.5 x e^{-3x} $$

Choose the particular solution to be: $$ y_p (x) = Ax^7 + Bx^6 + Cx^5 + Dx^4 + Ex^3 + Fx^2 + Gx + H $$

So that:

$$ y_p '(x) = 7Ax^6 + 6Bx^5 + 5Cx^4 + 4Dx^3 + 3Ex^2 + 2Fx + G $$

$$ y_p ''(x) = 42Ax^5 + 30Bx^4 + 20Cx^3 + 12Dx^2 + 6Ex + 2F $$

Substitute in the original equation $$ y'' + 6y' + 9y = 8 x - 2 x^7 $$

$$ (42Ax^5 + 30Bx^4 + 20Cx^3 + 12Dx^2 + 6Ex + 2F) + 6(7Ax^6 + 6Bx^5 + 5Cx^4 + 4Dx^3 + 3Ex^2 + 2Fx + G) + ...$$ $$ ... 9(Ax^7 + Bx^6 + Cx^5 + Dx^4 + Ex^3 + Fx^2 + Gx + H) = 8 x - 2 x^7 $$

Sorting by the x term gives:

$$ x^7 (9A) + x^6 (42A + 9B) + x^5 (42A + 36B + 9C) + x^4 (30B + 30C + 9D) + ... $$ $$ ... x^3 (20C + 24D + 9E) + x^2 (12D + 18E + 9F) + x (6E + 12F + 9G) + (2F + 6G + 9H) = 8 x - 2 x^7 $$

Giving us the system of equations: $$9A = -2$$ $$42A + 9B = 0 $$ $$42A + 36B + 9C = 0 $$ $$30B + 30C + 9D = 0 $$ $$20C + 24D + 9E = 0 $$ $$12D + 18E + 9F = 0 $$ $$6E + 12F + 9G = 8 $$ $$2F + 6G + 9H = 0 $$

The Matlab code we made to solve this was: A = -2/9; B = -(42*A)/9; C = -(42*A + 36*B)/9; D = -(30*B + 30*C)/9; E = -(20*C + 24*D)/9; F= -(12*D + 18*E)/9; G = (8-(6*E + 12*F))/9; H = -(2*F + 6*G)/9;

To get (rounded to the nearest tenth):

A= -0.2 B= 1.0 C= -3.1 D= 6.9 E= -11.5 F= 13.8 G= -9.9 H= 3.5

So now the particular solution is:

$$ y_p (x) = -0.2x^7 + 1.0x^6 - 3.1x^5 + 6.9x^4 - 11.5x^3 + 13.8x^2 - 9.9x + 3.5 $$

The overall solution can be found by:

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

$$ y(x) = C_1 e^ {-3x} + C_2 x e^{-3x} - 0.2x^7 + 1.0x^6 - 3.1x^5 + 6.9x^4 - 11.5x^3 + 13.8x^2 - 9.9x + 3.5 $$

To solve for C_1 and C_2 (which are different from the homogeneous solution constants) we find:

$$ y'(x) = -3C_1e^{-3x} + C_2 e^{-3x} - 3C_2 x e^{-3x} -1.4x^6 + 6.0x^5 - 15.5x^4 + 27.6x^3 - 34.5x^2+ 27.6x - 9.9 $$

$$ y(0) = 1 = C_1 + 3.5 $$ $$ y'(0) = .5 = -3C_1 + C_2 - 9.9 $$

$$C_1 = -2.5 $$ $$ C_2 = 2.8$$

The overall solution is:

$$ y(x) = -2.5 e^ {-3x} + 2.8 x e^{-3x} - 0.2x^7 + 1.0x^6 - 3.1x^5 + 6.9x^4 - 11.5x^3 + 13.8x^2 - 9.9x + 3.5 $$

Plot the homogeneous solution:

Plot the particular solution:

Plot the overall solution:

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Part 1
Use the Basic Rule 1 and the Sum Rule 3 to show that the appropriate particular solution for: $$ y'' + 6 y' + 9 y = 8 x - 2 x^7 $$ $$ y(0) = 1, \ y'(0) = 1/2 $$

Part 2
Derive the Basic rule and the Sum rule, instead of just using them, based on the linearity of the differential operator to obtain the expression (trial solution) for the particular solution $$ y_{p} (x) $$

Solution
$$ y_p(x) = \sum_{j=0}^n c_j x^j $$

$$y_p'(x) = \sum_{j=1}^n c_j j x^{j-1} = \sum_{j=0}^{n-1} c_{j+1} (j+1) x^{j} $$

$$y_p''(x) = \sum_{j= 2}^n c_j j (j-1) x^{j-2} = \sum_{ j=0}^{ n-2} c_{j+2} (j+2) (j+1) x^{j} $$

With n =7 we get

$$ y_p(x) = c_0 + c_1x + c_2x^2 + c_3x^3 + c_4x^4 + c_5x^5 + c_6x^6 + c_7x^7 $$

$$ y_p'(x) = c_1 + 2c_2x + 3c_3x^2 + 4c_4x^3 + 5c_5x^4 + 6c_6x^5 + 7c_7x^6 $$

$$ y_p''(x) = 2c_2 + 6c_3x + 12c_4x^2 + 20c_5x^3 + 30c_6x^4 + 42c_7x^5 $$

From report problem 1 it was already found that:

$$ c_0 = 3.5 $$ $$ c_1 = -9.9$$ $$ c_2 = 13.8$$ $$ c_3 = -11.5$$ $$ c_4 = 6.9$$ $$ c_5 = -3.1$$ $$ c_6 = 1.0$$ $$ c_7 = -0.2$$

$$ y_p (x) = -0.2x^7 + 1.0x^6 - 3.1x^5 + 6.9x^4 - 11.5x^3 + 13.8x^2 - 9.9x + 3.5 $$

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem Set 2.7, problem 5
Find a real, general solution. State which rule you are using. Show each step of your work.

$$ y'' + 6 y' + 9 y = e^{x} sin {x} $$ $$ y(0) = 1, \ y'(0) = 1/2 $$

plot on separate graphs:

(1) the homogeneous solution $$ y_{h} (x) $$,

(2) the particular solution $$ y_{p} (x) $$,

and (3) the overall solution $$ y (x) $$.

Solution
We start by finding the general solution of the homogeneous ODE

$$ y'' + 6 y' + 9 y = 0 $$

The characteristic equation of the homogeneous ODE is

$$ \lambda^2 + 6 \lambda + 9 = 0 $$ $$ ( \lambda + 3 )^2 = 0 $$ $$ \lambda = -3, -3 $$

The roots are double real roots. The general solution of the homogeneous ODE is $$ y_{h} = (c_{1} + xc_{2})e^{-2x} $$

Now we solve for the particular solution of the nonhomogeneous ODE

$$ y'' + 6 y' + 9 y = e^{x} sin {x} $$

We use the method of Undetermined Coefficients

$$ y_{p} = e^{x} (K cos {x} + M sin {x}) $$

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

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

We now substitute the values of $$ y_{p}, y_{p}', y_{p} $$ into $$ y + 6 y' + 9 y = e^{x} sin {x} $$

$$ e^{x} (K cos {x} + M sin {x}) + 2e^{x} (-K sin {x} + M cos {x}) + e^{x}(-K cos {x} - M sin {x}) $$ $$ + 6 (e^{x} (K cos {x} + M sin {x}) + e^{x} (-K sin {x} + M cos {x})) $$ $$ + 9 (e^{x} (K cos {x} + M sin {x})) = e^{x} sin {x} $$

$$ 16 e^{x} (K cos {x} + M sin {x}) + 8 e^{x} (-K sin {x} + M cos {x}) + e^{x}(-K cos {x} - M sin {x}) = e^{x} sin {x} $$ $$ e^{x}( 15 (K cos{x} + M sin {x}) + 8 (-K sin {x} + M cos {x}) = e^{x} sin {x} $$ $$ e^{x}( (15 K cos{x} + 8 M cos {x}) + (15 M sin {x} - 8 K sin {x})) = e^{x} sin {x} $$

Now we equate the coefficients of like terms on both sides $$ 15 K + 8 M = 0 $$ $$ 15 M - 8 K = 1 $$

Now we solve these equations for the coefficients $$ K = - 8/15 M $$ $$ 15 M + 64/15 M = 1 $$ $$ M = 0.05190 $$

$$ 15 K + 8 (15/289) = 0 $$ $$ K = 0.02768 $$

These values are substituted into $$ y_{p} = e^{x} (K cos {x} + M sin {x}) $$ to get the particular solution of the ODE $$ y_{p} = e^{x} (0.02768 cos {x} + 0.05190 sin {x}) $$

The general solution of the ODE is $$ y = y_{h} + y_{p} $$ $$ y = (c_{1} + xc_{2})e^{-2x} + e^{x} (0.02768 cos {x} + 0.05190 sin {x}) $$

In order to determine the values of $$ c_{1}, c_{2} $$ we use the initial conditions $$ y(0) = 1, \ y'(0) = 1/2 $$ $$ y(0) = c_{1} + 0.02768 = 1 $$ $$ c_{1} = 0.97232 $$

$$ y' = -2e^{-2x}(c_{1} + xc_{2}) + e^{-2x}(c_{2})+ e^{x} (0.02768 cos {x} + 0.05190 sin {x}) + e^{x} (-0.02768 sin {x} + 0.05190 cos {x}) $$ $$ y' = -2e^{-2x}(c_{1} + xc_{2}) + e^{-2x}(c_{2})+ e^{x} (0.07958 cos {x} + 0.02422 sin {x}) $$ $$ y(0)' = -2(c_{1}) + c_{2} + 0.07958 = 1/2 $$ $$ y(0)' = -1.94464 + c_{2} + 0.07958 = 1/2 $$ $$ c_{2} = 2.36506 $$

The general solution of the ODE is $$ y = e^{-2x}(0.97232 + 2.36506x) + e^{x} (0.02768 cos {x} + 0.05190 sin {x}) $$

Plot the homogeneous solution: Plot the particular solution: Plot the overall solution:

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem Set 2.7, problem 5
Find a real, general solution. State which rule you are using. Show each step of your work.

$$ y'' + 6 y' + 9 y = e^{-2x} \sinh x $$ $$ y(0) = 1, \ y'(0) = 1/2 $$

plot on separate graphs:

(1) the homogeneous solution $$ y_{h} (x) $$,

(2) the particular solution $$ y_{p} (x) $$,

and (3) the overall solution $$ y (x) $$.

Solution
We start by finding the general solution of the homogeneous ODE

$$ y'' + 6 y' + 9 y = 0 $$

The characteristic equation of the homogeneous ODE is

$$ \lambda^2 + 6 \lambda + 9 = 0 $$ $$ ( \lambda + 3 )^2 = 0 $$ $$ \lambda = -3, -3 $$

The roots are double real roots. The general solution of the homogeneous ODE is $$ y_{h} = e^{-2x}(c_{1} + xc_{2}) $$

Now we solve for the particular solution of the non-homogeneous ODE

$$ y'' + 6 y' + 9 y = e^{-2x} \sinh x $$

By using the definition of hyperbolic trigonometric functions we can convert $$ \sinh x = 1/2(e^{x}-e^{-x}) $$. Our non-homogeneous ODE can now be written as:

$$ y'' + 6 y' + 9 y = e^{-2x}(1/2(e^{x}-e^{-x}) $$

$$ y'' + 6 y' + 9 y = 1/2(e^{-x}-e^{-3x}) $$

Since the replacement of $$ \sinh x $$ is the sum of two functions we can use the sum rule for the method of undetermined coefficients.

$$ y_{p} = y_{p1} + y_{p2} = J e^{-x} - K e^{-3x} $$

$$ y_{p} = J e^{-x} - K e^{-3x} $$

$$ y'_{p} = -J e^{-x} + 3 K e^{-3x} $$

$$ y''_{p} = J e^{-x} - 9 K e^{-3x} $$

We now substitute the values of $$ y_{p}, y_{p}', y_{p} $$ into $$ y + 6 y' + 9 y = 1/2(e^{-x}-e^{-3x}) $$

$$ J e^{-x} - 9 K e^{-3x} $$ $$ + 6 (-J e^{-x} + 3 K e^{-3x}) $$ $$ + 9 (J e^{-x} - K e^{-3x}) = 1/2(e^{-x}-e^{-3x}) $$

$$ J e^{-x} - 9 K e^{-3x} - 6 J e^{-x} + 18 K e^{-3x} + 9 J e^{-x} - 9 K e^{-3x} = 1/2(e^{-x}-e^{-3x}) $$

$$ 4 J e^{-x} = 1/2(e^{-x}-e^{-3x}) $$

Now we equate the coefficients of like terms on both sides and solve for the coefficients $$ 4 J = 1/2 $$ $$ J = 1/8 $$ $$ K = 0 $$

These values are substituted into $$ y_{p} = J e^{-x} - K e^{-3x} $$ to get the particular solution of the ODE

$$ y_{p} = 1/8 e^{-x} $$

The general solution of the ODE is:

$$ y = y_{h} + y_{p} $$ $$ y = e^{-2x}(c_{1} + xc_{2}) + 1/8 e^{-x} $$

In order to determine the values of $$ c_{1}, c_{2} $$ we use the initial conditions $$ y(0) = 1, \ y'(0) = 1/2 $$ $$ y(0) = c_{1} + 1/8 = 1 $$ $$ c_{1} = 7/8 $$

$$ y' = -2e^{-2x}(c_{1} + xc_{2}) + e^{-2x}c_{2} $$ $$ y' = -2e^{-2x}(7/8 + xc_{2}) + e^{-2x}c_{2} $$ $$ y(0)' = -14/8 + c_{2} = 1/2 $$ $$ c_{2} = 9/4 $$

The general solution of the ODE is $$ y = e^{-2x}(7/8 + 9/4x) + 1/8 e^{-x} $$

Plot the homogeneous solution: Plot the particular solution: Plot the general solution:

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem Statement
Expand the series on both sides of (1)-(2) p.7-12b to verify these equalities $$(1)$$ $$ \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)$$ $$ \sum_{j=1}^5 c_j*j*x^{j-1} = \sum_{j=0}^4 c_{j+1}*(j+1)*x^j$$

Solution
Evaluating the right-hand side of (1): $$ 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} $$ $$ = 2c_2 + 6c_3 x + 12c_4 x^2 + 20c_5 x^3 $$ Now evaluating the left-hand side of (1): $$ 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 $$ $$ = 2c_2 + 6c_3 x + 12c_4 x^2 + 20c_5 x^3 $$ So both sides are equal. Now evaluating the right-hand side of (2): $$ 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_1 + 2c_2 x + 3c_3 x^2 + 4c_4 x^3 + 5c_5 x^4 $$ The left-hand side of (2) expands into the following: $$ c_{0+1}(0+1)x^0 + c_{1+1}(1+1)x^1 + 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 $$ $$ = c_1 + 2c_2 x + 3c_3 x^2 + 4c_4 x^3 + 5c_5 x^4 $$ So both sides are equal.

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem Statement
$$ y''+6y'+9y=cos(2x)$$ $$ y(0)=1 $$ and $$y'(0)=1/2$$

Solution
The taylor series for the excitation is $$\sum\frac{(-4)^n*x^{2n}}{(2n)!}$$ from n=0 to infinity For n=3, this equals $$ 1-2x^2+2x^4/3-4x^6/45$$ For n=5, this equals $$ 1-2x^2+2x^4/3-4x^6/45+2x^8/315-4x^{10}/14175$$ For n=9, this equals $$ 1-2x^2+2x^4/3-4x^6/45+2x^8/315-4x^{10}/14175+4x^{12}/467775-8x^{14}/42567525+2x^{16}/638512875-4x^{18}/97692469875$$

For n=3, $$y_p=Ax^6+Bx^5+Cx^4+Dx^3+Ex^2+Fx+G$$ $$y'_p = 6Ax^5+5Bx^4+4Cx^3+3Dx^2+2Ex+F$$ $$y''_p = 30Ax^4+20Bx^3+12Cx^2+6Dx+2E$$

Plugging these into the original equation using the taylor series approximation as the excitation, $$(Ax^6+Bx^5+Cx^4+Dx^3+Ex^2+Fx+G)+6(6Ax^5+5Bx^4+4Cx^3+3Dx^2+2Ex+F)+9(30Ax^4+20Bx^3+12Cx^2+6Dx+2E)$$ $$=1 - 2x^2 + 2x^4/3 - 4x^6/45$$ Rearranging the coefficients, $$Ax^6+(B+36A)x^5+(C+30B+270A)x^4+(D+24C+180B)x^3+(E+18D+108C)x^2+(F+12E+54D)x+(G+6F+18E)$$ $$=1+0x-2x^2+0x^3+2x^4/3+0x^5-4x^6/45$$ Equating x^6 coefficients, A=-45/4 Equating x^5 coefficients, B=405 Equating x^4 coefficients, C=-118461.833 Equating x^3 coefficients, D=2770183.992 Equating x^2 coefficients, E=-37069430.492 Equating x^1 coefficients, F=-594423101.472 Equating x^0 coefficients, G=4233788358.69 $$y_p=-45/4x^6+405x^5+-118461.833x^4+2770183.992x^3-37069430.492x^2-594423101x+4233788358.69$$ The graph shown is the taylor series for cos(2x) for the 0th through 3rd order.

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.

Problem Statement
$$ y'' + 6y' + 9y = log(3+4x) $$ $$y(0) = 1, y'(0) = .5$$ Use the point $$\widehat x = - 1 / 2$$ $$\log x = \log_{e} x = \ln x$$

Solution
The taylor series expansion for $$ log(3+4x) $$ around $$\widehat x = - 1 / 2$$ up to 16 terms is $$ 4(x+.5)-8(x+.5)^{2}+\frac{64}{3}(x+.5)^{3}-{64}(x+.5)^{4}+\frac{1024}{5}(x+.5)^{5}-\frac{2048}{3}(x+.5)^{6}+\frac{16384}{7}(x+.5)^{7}-8192(x+.5)^{8}$$ $$+\frac{262144}{9}(x+.5)^{9}-\frac{524288}{5}(x+.5)^{10}+\frac{4194304}{11}(x+.5)^{11}-\frac{4194304}{3}(x+.5)^{12}+\frac{67108864}{13}(x+.5)^{13}$$ $$-\frac{134217728}{7}(x+.5)^{14}+\frac{1073741824}{15}(x+.5)^{15}-\frac{268435456}{3}(x+.5)^{16}$$ Plots of taylor series expansion: Up to order 4 Up to order 7 Up to order 11 Up to order 16 The visually estimated domain of convergence is from .8 to .2. Now use the transformation of variable $$x \longrightarrow t \ \text{ such that } \ 3 + 4x = 1 + t$$ $$ x=\frac{t-2}{4} $$

If $$ log (1+t) $$ has a domain of convergence from $$ [-1,+1] $$ then $$ log (3+4x) $$ converges from $$ [\frac{-3}{4}, \frac{-1}{4}]$$

Honor Pledge
On our honor, we solved this problem on our own, without aid from online solutions or solutions from previous semesters.