text:
User:Egm4313.s12.team1.armanious/team1/R3

=Report 3=

Statement
Given the double root $$ \lambda = 5\!$$ and the excitation $$ r(x)=7e^{5x}-2 x^2 \!$$, with the initial conditions $$ y(0) = 4, y'(0) = 5 \!$$ find the solution $$ y(x)\!$$. Plot this solution and the solution to the same problem except with the excitation $$ r(x) = 7e^{5x} \!$$.

Solution
The solution $$ y(x)\! $$ is composed of a general solution and a particular solution so that $$ y(x) = y_g(x) + y_p(x)\!$$. Using the given double root, we can find the equation for the characteristic equation which leads to the homogeneous solution:

 * {| style="width:100%" border="0"

$$\displaystyle{(\lambda - 5)^2 = \lambda^2 - 10\lambda + 25 = 0}$$ (1.0)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Homogeneous solution:
 * {| style="width:100%" border="0"

$$\displaystyle{y'' - 10y' + 25y = r(x)}$$ (1.1)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y'' - 10y' + 25y = 7e^{5x} - 2x^2}$$ (1.2)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

First, by using the Modification Rule, we find that the general equation associated with the given double root is:

 * {| style="width:100%" border="0"

$$\displaystyle{y_g(x) = C_1e^{5x} + C_2xe^{5x}}$$ (1.3)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

We need to find the particular solution to the excitation $$ r(x) = 7e^{5x} - 2x^2\!$$. In analyzing the excitation, it is found that the particular solution looks like this:

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = Cx^2e^{5x} - [K_2x^2 + K_1x + K_0]}$$ (1.4)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Now, we need to find the values for the constants $$ C, K_2, K_1, K_0\!$$, by taking the first and second derivatives of the particular solution:

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = Cx^2e^{5x} - [K_2x^2 + K_1x + K_0]}$$ (1.4)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x)' = 2Cxe^{5x} + 5Cx^2e^{5x} - [2K_2x + K_1]}$$ (1.5)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x)'' = 2Ce^{5x} + 20Cxe^{5x} + 25Cx^2e^{5x} - [2K_2]}$$ (1.6)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Now, plug these into the homogeneous solution (1.2) and simplify:

 * {| style="width:100%" border="0"

$$\displaystyle{2Ce^{5x} - 2K_2 + 20K_2x + 10K_1 - 25K_2x^2 - 25K_1x - 25K_0 = 7e^{5x} - 2x^2}$$ (1.7)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Comparing the coefficients for $$ e^{5x}, x^2 \!$$ and $$ x \!$$ allows us to solve for the unknown coefficients:

 * {| style="width:100%" border="0"

$$\displaystyle{e^{5x}: 2C = 7 \rightarrow C = 7/2}$$ (1.8)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$\displaystyle{x^2: -25K_2 = -2 \rightarrow K_2 = 0.08}$$ (1.9)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$\displaystyle{x: 20K_2 - 25K_1 = 0 \rightarrow K_1 = 0.064}$$ (1.10)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$\displaystyle{-2K_2 + 10K_1 - 25K_0 = 0 \rightarrow K_0 = 0.0192}$$ (1.11)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Plug into $$ y_p(x)\!$$ (1.4):

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = \frac{7}{2}x^2e^{5x} - [0.08x^2 + 0.064x + 0.0192]}$$ (1.12)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Now that we have the particular solution, we can use the initial conditions to solve for the unknown constants in the general solution, $$ y_g(x)\!$$, and then we will be able to solve for the final solution $$ y(x)\!$$:

 * {| style="width:100%" border="0"

$$\displaystyle{y(x) = C_1e^{5x} + C_2xe^{5x} + \frac{7}{2}x^2e^{5x} - [0.08x^2 + 0.064x + 0.0192]}$$ (1.13)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Take derivative of (1.13):

 * {| style="width:100%" border="0"

$$\displaystyle {y(x)' = 5C_1e^{5x} + C_2e^{5x} +5C_2xe^{5x} + 7xe^{5x} + \frac{35}{2}x^2e^{5x} - [0.16x + 0.064]}$$ (1.14)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Using the given initial conditions and equations (1.13) and (1.14):

 * {| style="width:100%" border="0"

$$\displaystyle{y(0) = 4 \rightarrow 4 = C_1 - 0.0192 \rightarrow C_1 = 4.0192}$$ (1.15)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y'(0) = 5 \rightarrow 5 = 5C_1 + C_2 - 0.064 \rightarrow C_2 = -15.032}$$ (1.16)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Plug these constants back into the solution (1.13) to obtain the final solution:

$$  \displaystyle y(x) = 4.0192e^{5x} - 15.032xe^{5x} + \frac{7}{2}x^2e^{5x} - [0.08x^2 + 0.064x + 0.0192] $$     (1.17)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The solution to the same problem but with excitation $$ r(x) = 7e^{5x} \! $$ is:

 * {| style="width:100%" border="0"

$$\displaystyle{y(x) = 4e^{5x}-25xe^{5x}+\frac{7}{2}x^{2}e^{5x}}$$ (1.18)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

This is the plot for (1.17) and (1.18):

Author
Solved and Typed By - --Egm4313.s12.team1.wyattling 22:00, 20 February 2012 (UTC)

Reviewed By - Egm4313.s12.team1.armanious 22:39, 21 February 2012 (UTC)

Statement
Perturbation method for double real root: Developing the 2nd homogeneous solution for the case of double real root as a limiting case of distinct roots (see [[media:iea.s12.sec7.djvu| Sec7 p. 7-5 ]]). Consider two distinct real roots of the form: $$\lambda_1= \lambda, \lambda_2= \lambda + \epsilon \!$$

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

2) Show that the following is a homogeneous solution:

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

The fraction in (3) p.7-5, for small $$\epsilon\!$$, is a finite difference formula that approximates the derivative

$$\frac{e^{(\lambda + \epsilon)x} - e^{\lambda x}}{\epsilon}\approx \frac{d}{d \lambda} e^{\lambda x} \!$$

In fact, $$ \frac{d}{d \lambda} e^{\lambda x} = \lim_{\epsilon \to 0}\frac{e^{(\lambda + \epsilon)x} - e^{\lambda x}}{\epsilon} \!$$

3)Find the limit of the homogeneous solution in (3) p.7-5 as [epsilon goes to 0] (think l'Hopital's rule)

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

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

6)Numerical experiment: Compute (3) p.7-5 using at $$\lambda=5\!$$ and with $$\epsilon = 0.001\!$$, and compare to get the value obtained from the exact 2nd homogeneous solution.

Solution
In order to find the corresponding L2-ODE-CC, the characteristic equation corresponding to the given solution must be found:
 * {| style="width:100%" border="0"

$$  \displaystyle (\lambda'-\lambda)(\lambda'-\lambda-\epsilon)=0 $$     (2.0)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle (\lambda')^2-2\lambda' \lambda + \lambda^2 - \lambda' \epsilon + \lambda \epsilon=(\lambda')^2-(2\lambda+\epsilon)\lambda'+(\lambda^2+\lambda\epsilon)=0 $$     (2.1)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Therefore the corresponding L2-ODE-CC is:
 * {| style="width:100%" border="1"

$$  \displaystyle y''-(2\lambda+\epsilon)y'+(\lambda^2+\lambda\epsilon)y=0 $$     (2.2) Note: if ε is equal to zero, the characteristic equation of 2.2 has a double real root at λ.
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

To show that the following is a homogeneous solution, the first and second derivatives must be taken:
 * {| style="width:100%" border="0"

$$  \displaystyle y(x)=\frac{e^{(\lambda + \epsilon)x}-e^{\lambda x}}{\epsilon} $$     (2.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y'(x)=\frac{(\lambda+\epsilon)e^{(\lambda + \epsilon)x}-\lambda e^{\lambda x}}{\epsilon} $$     (2.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y''(x)=\frac{(\lambda+\epsilon)^2e^{(\lambda + \epsilon)x}-\lambda^2 e^{\lambda x}}{\epsilon} $$     (2.5) Using these values in 2.2 yields:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{(\lambda+\epsilon)^2e^{(\lambda + \epsilon)x}-\lambda^2 e^{\lambda x}}{\epsilon}-\frac{(2\lambda+\epsilon)[(\lambda+\epsilon)e^{(\lambda + \epsilon)x}-\lambda e^{\lambda x}]}{\epsilon}+\frac{(\lambda^2+\lambda\epsilon)[e^{(\lambda + \epsilon)x}-e^{\lambda x}]}{\epsilon}=0 $$     (2.6) Rearranging and simplifying yields:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{[\lambda^2 +2\lambda\epsilon+\epsilon^2-2\lambda^2-3\lambda\epsilon-\epsilon^2+\lambda^2+\lambda\epsilon]e^{(\lambda + \epsilon)x}+[-\lambda^2+2\lambda^2+\lambda\epsilon-\lambda^2-\lambda\epsilon]e^{\lambda x}}{\epsilon}=0 $$     (2.7) All of the terms in the above equation cancel to yield:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle \frac{0e^{(\lambda + \epsilon)x}+0e^{\lambda x}}{\epsilon}=0 $$     (2.8) Using l'Hopital's rule:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \lim_{\epsilon \to 0}\frac{e^{(\lambda+\epsilon)x}-e^{\lambda x}}{\epsilon}=\lim_{\epsilon \to 0}\frac{\frac{d}{d\epsilon}(e^{(\lambda+\epsilon)x}-e^{\lambda x})}{\frac{d}{d\epsilon} (\epsilon)}=\lim_{\epsilon \to 0}\frac{\frac{d}{d\epsilon}(e^{(\lambda+\epsilon)x})-0}{1} $$     (2.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Simplifying further:
 * {| style="width:100%" border="0"

$$  \displaystyle \lim_{\epsilon \to 0}\frac{d}{d\epsilon}(e^{(\lambda+\epsilon)x})=\lim_{\epsilon \to 0}xe^{(\lambda+\epsilon)x}=x\lim_{\epsilon \to 0}e^{(\lambda+\epsilon)x} $$     (2.10) This ultimately yields:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle \lim_{\epsilon \to 0}\frac{e^{(\lambda+\epsilon)x}-e^{\lambda x}}{\epsilon}=xe^{\lambda x} $$ (2.11) The following should also be taken into consideration:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle \frac{d}{d\lambda}(e^{\lambda x})=xe^{\lambda x} $$ (2.12) Clearly, the results of 2.11 and 2.12 are equivalent. This shows that $$y(x)=xe^{\lambda x} \!$$ is an appropriate solution to a homogeneous L2-ODE-CC having one double root.
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

To test this, test values will be used to solve for the approximate (2.12) and exact (2.13) solutions of the ODE. For this test, $$\lambda=5\!$$ and $$\epsilon = 0.001\!$$
 * {| style="width:100%" border="0"

$$  \displaystyle y_{approx}(x)=\frac{e^{(5 + 0.001)x}-e^{5 x}}{0.001}=1000(e^{0.001x}-1)e^{5x} $$     (2.13)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{exact}(x)=xe^{5x} $$     (2.14) If the above derivations are true, then the following approximation must also be true:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle 1000(e^{0.001x}-1)\approx x $$ (2.15) Plotting both sides of 2.15 as a function of x shows that this is a valid approximation for most values of x. Figure 3.2-1
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Author
Solved and Typed By - Egm4313.s12.team1.armanious 05:51, 21 February 2012 (UTC)

Reviewed By - --Egm4313.s12.team1.durrance 02:53, 22 February 2012 (UTC)

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

Solution
First we create the characteristic equation in standard form:
 * {| style="width:100%" border="0"

$$\displaystyle{\lambda^2-3 \lambda +2=0}$$ (3.0) Then, by setting it equal to zero, we can find what $$ \lambda \!$$ equals:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{(\lambda - 2)(\lambda -1) = 0}$$ (3.1)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{\lambda = 2,\lambda =1}$$ (3.2)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Given two, distinct, real roots, the general solution looks like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_g(x)=C_1e^{2x} + C_2e^{x} $$     (3.3) By using the method of undetermined coefficients, the excitation $$ 4x^2\!$$ is analyzed to yield a particular solution: In assessing a polynomial with a second power, the form of the particular solution will look like this:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= A_2 x^2 + A_1 x + A_0 $$     (3.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

It's derivative would look like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p '(x)= 2 A_2 x + A_1 $$     (3.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

And the second derivative to follow would then become:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p ''(x)= 2 A_2 $$     (3.7)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Based on the coefficients, the following system of equations exists:
 * {| style="width:100%" border="0"

$$  \displaystyle 2A_2 =4 $$     (3.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -6A_2 + A_1=0 $$     (3.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 2A_2 -3 A_1 + A_0 =0 $$     (3.10)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The results of this set of equations make the coefficients of A's:
 * {| style="width:100%" border="0"

$$  \displaystyle A_2 =2 $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_1 =12 $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_0 =32 $$ The resulting particular equation looks like this:
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= 2 x^2 + 12 x + 32 $$     (3.11) By adding the particular and general solutions, we get the complete solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 2 x^2 + 12 x + 32 + C_1e^{2x} + C_2e^{x} = y $$ (3.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

We consider the initial conditions by taking the first derivative of the complete solution:

 * {| style="width:100%" border="0"

$$  \displaystyle 4 x + 12 + 2 C_1e^{2x} + C_2e^{x} = y' $$ (3.13)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

By plugging in 0 for x, 1 for y, and 0 for y', we can solve for the constants $$C_1, C_2 \!$$:
 * {| style="width:100%" border="0"

$$  \displaystyle y(0)=1 =2 * 0^2 + 12 *0 + 32 + C_1e^{2*0} + C_2e^{0}=32 +C_1 +C_2=1 $$     (3.14)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle y'(0)=0=4 *0 + 12 + 2 C_1e^{2*0} + C_2e^{0} = 12+ 2 C_1 + C_2=0 $$     (3.15)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solving the equations proves that $$C_1 = 19, C_2 = -50 \!$$: The resulting complete solution with consideration for initial conditions then becomes:
 * {| style="width:100%" border="0"

$$  \displaystyle 2 x^2 + 12 x + 32 + 19 e^{2x} - 50e^{x} = y $$ (3.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

y plotted looks like this:

Author
Solved and Typed By -Egm4313.s12.team1.silvestri 15:56, 19 February 2012 (UTC)

Reviewed By -Egm4313.s12.team1.armanious 03:02, 22 February 2012 (UTC)

Statement
From [[media:iea.s12.sec7b.djvu|R3.4 in Sec 3 p. 7-11]]; Use the Basic Rule 1 and the Sum Rule to show that the appropriate particular solution for
 * {| style="width:100%" border="0"

$$  \displaystyle y''-3y'+2y=4x^{2}-6x^{5} $$     (4.1) is of the form
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}(x)=\sum_{j=0}^{n}c_{j}x_{j} $$     (4.2) i.e.,
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}(x)=\sum_{j=0}^{5}c_{j}x_{j} $$     (4.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Basic Rule: Select $$y_{p}(x)\!$$ from the table and determine the coefficients by substituting $$y_{p}(x)\!$$ in

 * {| style="width:100%" border="0"

$$  \displaystyle y''+ay'+by=r(x) $$     (4.4) Sum Rule: If $$r(x)\!$$ is the sum of the terms in the 1st column of table 2.1 then $$y_{p}(x)\!$$ is the sum of the corresponding terms in the 2nd column of this table. Table 2.1
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solution
According to the table the Homogeneous equation has two $$r(x)\!$$ values of the form $$kx^{n}(n=0,1,2...)$$. Using the Basic Rule this means that there is a particular solution of the form $$K_{n}x^{n}+K_{n-1}x^{n-1}+...+K_{1}x+K_{0}\!$$ for each $$r(x)\!$$.

 * {| style="width:100%" border="0"

$$  \displaystyle r_{1}(x)=4x^{2}\rightarrow r_{1}(x)=Kx^{n}(n=2) $$     (4.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

So the particular solution for this $$r_{1}(x)\!$$ should be:

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p1}= K_{2}x^{2}+K_{1}x^{1}+K_{0} $$     (4.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Where $$K=4\!$$. Which simplifies to:

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p1}= \sum_{j=0}^{2}K_{j}x^{j} $$     (4.7)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

For the second $$r_{2}(x)\!$$:

 * {| style="width:100%" border="0"

$$  \displaystyle r_{2}(x)=-6x^{5}\rightarrow r_{2}(x)=Cx^{n}(n=5) $$     (4.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

So the particular solution for this $$r_{2}(x)\!$$ should be:

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p2}= C_{5}x^{5}+C_{4}x^{4}+C_{3}x^{3}+C_{2}x^{2}+C_{1}x+C_{0} $$     (4.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Where $$C=4\!$$. Which simplifies to:

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p1}= \sum_{j=0}^{5}C_{j}x^{j} $$     (4.10)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Using the sum rule:

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}=\sum_{j=0}^{2}K_{j}x^{j}+ \sum_{j=0}^{5}Cx^{j} $$     (4.11) Now using the Sum Rule which just states if there are two $$r(x)\!$$ values in any form on the left side of the table, then the particular solution is the sum of the solutions for $$r(x)\!$$ on the right side of the table.
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

So the particular solution for $$y''-3y'+2y=4x^{2}-6x^{5}\!$$ where $$c=K+C$$

 * {| style="width:100%" border="1"

$$  \displaystyle y_{p}=\sum_{j=0}^{5}c_{j}x^{j} $$     (4.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Author
Solved and Typed By - User:Egm4313.s12.team1.stewart 22:47, 21 February 2012 (UTC) Reviewed By - Egm4313.s12.team1.silvestri 04:57, 22 February 2012 (UTC)

Statement
Given:
 * {| style="width:100%" border="0"

y''-3y'+2y=4x^2-6x^5 $$     (5.0)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }
 * {| style="width:100%" border="0"

y_p(x)=\sum_{j=0}^5c_jx^j=4x^2-6x^5 $$     (5.1)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

Find: -Coefficients of particular solution using series expansion and matrix back-substitution -Solution $$\displaystyle y(x)$$ using initial conditions $$\displaystyle y(0)=1, y'(0)=0$$ Plot solution.

Solution
Using [http://upload.wikimedia.org/wikiversity/en/a/a6/Iea.s12.sec7b.djvu Sec7b-1 p.7-13 Eq. (1)]:

 * {| style="width:100%" border="0"

\sum_{j=0}^3c_{j+2}(j+2)(j+1)x^j-3\sum_{j=0}^4c_{j+1}(j+1)x^j+2\sum_{j=0}^5c_jx^j=4x^2-6x^5 $$     (5.2) Which is a combined series expansion for the general coefficient series expansion of [http://upload.wikimedia.org/wikiversity/en/a/a6/Iea.s12.sec7b.djvu Sec7b-1 p.7-12 Eq. (4)]:
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle \sum_{j=2}^5c_jj(j-1)x^{j-2}-3\sum_{j=1}^5c_jjx^{j-1}+2\sum_{j=0}^5c_jx^j=4x^2-6x^5 $$     (5.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

We can find a simultaneous linear system of equations to solve for the coefficients of $$\displaystyle y_p(x)$$.

Note: by combining the summations in Eq. (5.2) by setting the upper bounds of the summations to a common value 3, the equation can be simplified to:
 * {| style="width:100%" border="0"

$$\displaystyle \sum_{j=0}^3[c_{j+2}(j+2)(j+1)-3c_{j+1}(j+1)+2c_j]x^j+(2c_4-15c_5)x^4+2c_5x^5=4x^2-6x^5 $$     (5.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Therefore providing a system of equations by equating coefficients from the summations to the $$\displaystyle y_p(x)$$:
 * {| style="width:100%" border="0"

j=0: [c_2(2)(1)-3c_1(1)+2c_0]x^0=0x^0=[2c_0-3c_1+2c_2]x^0 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=1: [c_3(3)(2)-3c_2(2)+2c_1]x^1=0x^1=[2c_1-6c_2+6c_3]x^1 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=2: [c_4(4)(3)-3c_3(3)+2c_2]x^2=4x^2=[2c_2-9c_3+12c_4]x^2 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=3: [c_5(5)(4)-3c_4(4)+2c_3]x^3=0x^3=[2c_3-12c_4+20c_5]x^3 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

[2c_4-15c_5]x^4=0x^4 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

2c_5x^5=-6x^5 $$     (5.5) Eqs. (5.5) can be verified by solving for the coefficients by Eq. (5.2) to prove that the summations were combined correctly:
 * $$\displaystyle
 * $$\displaystyle
 *

 * }
 * {| style="width:100%" border="0"

j=0: 2c_0x^0=2c_0 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=1: 2c_1x^1-3c_1(1)x^0=2c_1x-3c_1 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=2: 2c_2x^2-3c_2(2)x^1+c_2(2)(1)x^0=2c_2x^2-6c_2x+3c_2 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=3: 2c_3x^3-3c_3(3)x^2+c_3(3)(2)x^1=2c_3x^3-9c_3x^2+6c_3x $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=4: 2c_4x^4-3c_4(4)x^3+c_4(4)(3)x^2=2c_4x^4-12c_4x^3+12c_4x^2 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

j=5: 2c_5x^5-3c_5(5)x^4+c_5(5)(4)x^3=2c_5x^5-15c_5x^4+20c_5x^3 $$     (5.6) By summing the terms in (5.6) and grouping like terms, then equating it to the $$\displaystyle y_p(x)$$, we find the coefficient equations are the same as Eqs. (5.5):
 * $$\displaystyle
 * $$\displaystyle
 *

 * }
 * {| style="width:100%" border="0"

[2c_0-3c_1+2c_2]x^0+[2c_1-6c_2+6c_3]x^1+[2c_2-9c_3+12c_4]x^2+[2c_3-12c_4+20c_5]x^3+[2c_4-15c_5]x^4+2c_5x^5=0x^0+0x^1+4x^2+0x^3+0x^4-6x^5 $$     (5.7)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

The linear system of equations in Eqs. (5.5) can be placed in matrix form:
 * {| style="width:100%" border="0"

$$ \left[ \begin{array}{cccccc} 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{array} \right]\ \left( \begin{array}{cccccc} {c}_{0}\\ {c}_{1}\\ {c}_{2}\\ {c}_{3}\\ {c}_{4}\\ {c}_{5}\end{array} \right)\ = \left[ \begin{array}{cccccc} 0\\ 0\\ 4\\ 0\\ 0\\ -6\end{array} \right]\ $$ (5.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solving this system of equations by back-substitution yields the values of the coefficients for the $$\displaystyle y_p(x)$$:
 * {| style="width:100%" border="0"

c=\{-701.75, -691.5, -335.5, -105, -22.5, -3\} $$     (5.9)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

Substituting these coefficients into Eq. (5.1):
 * {| style="width:100%" border="0"

y_p(x)=-701.75x^0-691.5x^1-335.5x^2-105x^3-22.5x^4-3x^5 $$     (5.10)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

The general solution is the sum of the homogeneous (found in R3.3) and particular solutions:
 * {| style="width:100%" border="0"

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

 * }

Considering the initial value condition $$\displaystyle y(0)=1$$ in the general solution:
 * {| style="width:100%" border="0"

y(0)=1=-701.75+C_1e^0+C_2e^0=-701.75+C_1+C_2 $$     (5.12) Taking the first derivative of Eq. (5.11) to consider the initial value condition $$\displaystyle y'(0)=0$$:
 * $$\displaystyle
 * $$\displaystyle
 *

 * }
 * {| style="width:100%" border="0"

y'(x)=-691.5-671x-315x^2-90x^3-15x^4+2C_1e^{2x}+C_2e^x $$     (5.13)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

 * {| style="width:100%" border="0"

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

 * }

Solving Eq. (5.12) and Eq. (5.13) yield the coefficients:
 * {| style="width:100%" border="0"

C_1=-11.25, C_2=714 $$     (5.15)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

This yields our final solution by substituting the coefficients into Eq. (5.11): Solving Eq. (5.12) and Eq. (5.13) yield the coefficients:
 * {| style="width:100%" border="1"

$$\displaystyle y(x)=-701.75-691.5x^1-335.5x^2-105x^3-22.5x^4-3x^5-11.25e^{2x}+714e^x $$     (5.16)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

A plot of the solution: Figure 3.5-1

Author
Solved and Typed By - --Egm4313.s12.team1.durrance 22:56, 21 February 2012 (UTC)--

Reviewed By - Egm4313.s12.team1.silvestri 03:28, 22 February 2012 (UTC)

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-ODEs-CC (see p.7-2b):
 * {| style="width:100%" border="0"

$$\displaystyle{y}_{p,1}''-3{y}_{p,1}'+2{{y}_{p,1}}={{r}_{1}}(x):=4{{x}^{2}}$$ (6.0)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y}_{p,2}''-3{y}_{p,2}'+2{{y}_{p,2}}={{r}_{2}}(x):=-6{{x}^{5}}$$ (6.1) The particular solution $$\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.
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Compare the result with that obtained in R3.5.

Solution
Beginning with equation (6.1), we find that a particular solution has the form
 * {| style="width:100%" border="0"

$$\displaystyle{{y}_{p,2}}(x)=\sum\limits_{j=0}^{n}$$ (6.2) where $$\displaystyle{n=5}$$. That is,
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle {{y}_{p,2}}(x)={{K}_{0}}+{{K}_{1}}x+{{K}_{2}}{{x}^{2}}+{{K}_{3}}{{x}^{3}}+{{K}_{4}}{{x}^{4}}+{{K}_{5}}{{x}^{5}}$$
 * style="width:95%" |
 * style="width:95%" |

(6.3) Differentiating twice:
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y}_{p,2}'(x)={{K}_{1}}+2{{K}_{2}}x+3{{K}_{3}}{{x}^{2}}+4{{K}_{4}}{{x}^{3}}+5{{K}_{5}}{{x}^{4}}$$ (6.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y}_{p,2}''(x)=2{{K}_{2}}+6{{K}_{3}}x+12{{K}_{4}}{{x}^{2}}+20{{K}_{5}}{{x}^{3}}$$ (6.5) Substitute (6.3-5) into (6.1) to obtain
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle (2{{K}_{2}}+6{{K}_{3}}x+12{{K}_{4}}{{x}^{2}}+20{{K}_{5}}{{x}^{3}})-3({{K}_{1}}+2{{K}_{2}}x+3{{K}_{3}}{{x}^{2}}+4{{K}_{4}}{{x}^{3}}+5{{K}_{5}}{{x}^{4}})$$ $$\displaystyle+2({{K}_{0}}+{{K}_{1}}x+{{K}_{2}}{{x}^{2}}+{{K}_{3}}{{x}^{3}}+{{K}_{4}}{{x}^{4}}+{{K}_{5}}{{x}^{5}})=-6{{x}^{5}}$$
 * style="width:95%" |
 * style="width:95%" |

(6.6) Rearranging terms with respect to $$\displaystyle{x}$$ power:
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle (2{{K}_{2}}-3{{K}_{1}}+2{{K}_{0}})+x(6{{K}_{3}}-6{{K}_{2}}+2{{K}_{1}})+{{x}^{2}}(12{{K}_{4}}-9{{K}_{3}}+2{{K}_{2}})$$ $$\displaystyle+{{x}^{3}}(20{{K}_{5}}-12{{K}_{4}}+2{{K}_{3}})+{{x}^{4}}(-15{{K}_{5}}+2{{K}_{4}})+{{x}^{5}}(2{{K}_{5}})=-6{{x}^{5}}$$ (6.7) In matrix form:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$ \left[ \begin{array}{cccccc} 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{array} \right]\ \left( \begin{array}{cccccc} {K}_{0}\\ {K}_{1}\\ {K}_{2}\\ {K}_{3}\\ {K}_{4}\\ {K}_{5}\end{array} \right)\ = \left[ \begin{array}{cccccc} 0\\ 0\\ 0\\ 0\\ 0\\ -6\end{array} \right]\ $$ (6.8) Solving for $$\displaystyle K$$, using MATLAB, yields
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle K=\{-708.75,-697.5,-337.5,-105,-22.5,-3\}$$ (6.9) which means that
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle {y}_{p,2}=-708.75-697.5x-337.5{{x}^{2}}-105{{x}^{3}}-22.5{{x}^{4}}-3{{x}^{5}}$$ (6.10) From R3.3:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle {{y}_{p,1}}=32+12x+2{{x}^{2}}$$ (6.11) Summing for the final solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle y={{C}_{1}}{{y}_{p,1}}+{{C}_{2}}{{y}_{p,2}}$$ (6.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle y={{C}_{1}}(32+12x+2{{x}^{2}})$$ $$\displaystyle +{{C}_{2}}(-708.75-697.5x-337.5{{x}^{2}}-105{{x}^{3}}-22.5{{x}^{4}}-3{{x}^{5}})$$ (6.13) For initial condition $$\displaystyle y(0)=-5$$
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle y(0)=-5={{C}_{1}}(32)+{{C}_{2}}(-708.75)$$ (6.14) Similarly, for initial condition $$\displaystyle y'(0)=2$$
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle y'(0)=2={{C}_{1}}(12)+{{C}_{2}}(-697.5)$$ (6.15) Equations (6.14) and (6.15) yield the following matrix equation:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$ \left[ \begin{array}{cc} 32 & -708.75\\ 12 & -697.5\end{array} \right]\ \left( \begin{array}{cc} {C}_{1}\\ {C}_{2}\end{array} \right)\ = \left[ \begin{array}{cc} -5\\ 2\end{array} \right]\ $$ (6.16) Solving (6.16) in MATLAB yields
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle C=\{-0.355,-0.009\}$$ (6.17) Therefore the combined solution of $$\displaystyle y$$ is
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle y(x)=-0.355(32+12x+2{{x}^{2}})$$ $$\displaystyle -0.009(-708.75-697.5x-337.5{{x}^{2}}-105{{x}^{3}}-22.5{{x}^{4}}-3{{x}^{5}})$$ (6.18) Which can be simplified to Final Equation
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle y(x)=-4.98125+2.0175x+2.3275{{x}^{2}}+0.945{{x}^{3}}+0.2025{{x}^{4}}+0.027{{x}^{5}}$$ (6.19)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Author
Solved and Typed By - Egm4313.s12.team1.essenwein 00:40, 18 February 2012 (UTC)

Reviewed By - Egm4313.s12.team1.silvestri 04:29, 22 February 2012 (UTC)

Statement
Expand the series on both sides of (1)-(2) p.7-12b to verify these equalities. These equalities are:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$ \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}} \!$$ (7.0)
 *

 * }

 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$ \sum_{j=1}^{5} C_{j} jx^{^{j-1}}=\sum_{j=0}^{4} C_{j+1} (j+1) x^{^{j}} \!$$ (7.1)
 *

 * }

Solution
This transition occurs through a mid-level variable change. In this particular case, for (7.0), j-2 is represented by k:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$ \sum_{k=0}^{3} C_{k+2} (k+2)(k+1) x^{^{k}} \!$$ (7.3)
 *

 * }

We can then represent the variable k with a j. This new summation looks like this:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$ \sum_{j=0}^{3} C_{j+2} (j+2)(j+1) x^{^{j}} \!$$ (7.4)
 *

 * }

Expanding both sides, (7.0 and 7.4) yields the same result:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$C_{5}(5)(4)x^{^{3}} + C_{4}(4)(3)x^{^{2}}+C_{3}(3)(2)x^{^{1}} +C_{2}(2)(1)x^{^{0}}\!$$ (7.5)
 *

 * }

We follow the same process for equality (7.1): This transition occurs through a mid-level variable change. In this particular case, for (7.1), j-1 is represented by k:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$ \sum_{k=0}^{4} C_{k+1} (k+1) x^{^{k}} \!$$ (7.6)
 *

 * }

We can then represent the variable k with a j. This new summation looks like this:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$ \sum_{j=0}^{4} C_{j+1} (j+1) x^{^{j}} \!$$ (7.7)
 *

 * }

Expanding both sides, (7.1 and 7.7)yields the same result:
 * {| style="width:100%" border="0"

 * style="width:95%" |
 * style="width:95%" |

$$C_{5}(5)x^{^{4}} + C_{4}(4)x^{^{3}}+C_{3}(3)x^{^{2}} +C_{2}(2)x^{^{1}}+C_{1}\!$$ (7.8)
 *

 * }

Author
Solved and Typed By - Egm4313.s12.team1.silvestri 17:20, 19 February 2012 (UTC)

Reviewed By - --128.227.113.77 17:05, 22 February 2012 (UTC)

Statement
Find a general solution for the following two problems:

Given
Homogeneous solution: $$ y'' + 4y' + 4y = e^{-x}cosx\!$$

Solution
The solution $$ y(x)\! $$ is composed of a general solution and a particular solution so that $$ y(x) = y_g(x) + y_p(x)\!$$. First, we will find the general solution, $$ y_g(x) \!$$, by finding the roots of the characteristic equation:

 * {| style="width:100%" border="0"

$$\displaystyle{\lambda^2 + 4\lambda + 4\lambda = 0 \rightarrow (\lambda + 2)^2}$$ (8.0)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Which means that the characteristic equation has a double root of $$ \lambda = -2 \!$$. Based on the double root, then, the general solution is:

 * {| style="width:100%" border="0"

$$\displaystyle{y_g(x) = (C_1 + C_2x)e^{-\frac{ax}{2}} \rightarrow y_g(x) = (C_1 + C_2x)e^{-2x}}$$ (8.1)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Next, we need to find the particular solution, and based on analysis of the excitation, $$ r(x) = e^{-x}cosx \!$$, we find that the particular solution is the following:

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = e^{\alpha x}(Kcos\omega x + Msin\omega x) \rightarrow y_p(x) = e^{-x}Kcosx + e^{-x}Msinx}$$ (8.2)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now, we need to find the values for the constants $$ K, M\!$$, by taking the first and second derivatives of the particular solution (8.2):

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = e^{-x}Kcosx + e^{-x}Msinx}$$ (8.2)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x)' = -e^{-x}Ksinx - e^{-x}Kcosx + e^{-x}Mcosx - e^{-x}Msinx}$$ (8.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x)'' = -e^{-x}Kcosx + e^{-x}Ksinx + e^{-x}Ksinx + e^{-x}Kcosx - e^{-x}Msinx - e^{-x}Mcosx - e^{-x}Mcosx + e^{-x}Msinx}$$ (8.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now, plug these into the homogeneous solution and simplify:

 * {| style="width:100%" border="0"

$$\displaystyle{-e^{-x}(Kcosx - Ksinx - Ksinx - Kcosx + Msinx + Mcosx + Mcosx - Msinx) + 4[-e^{-x}(Ksinx + Kcosx - Mcosx + Msinx)] + 4[e^{-x}(Kcosx + Msinx)] = e^{-x}cosx}$$ (8.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{-e^{-x}[-2Ksinx + 2Mcosx] - e^{-x}[4Ksinx + 4Kcosx - 4Mcosx + 4Msinx] + e^{-x}[4Kcosx + 4Msinx] = e^{-x}cosx}$$ (8.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Pull $$ e^{-x} \! $$ out of equation (8.6) and simplify:

 * {| style="width:100%" border="0"

$$\displaystyle{e^{-x}[4Kcosx + 4Msinx - 4Ksinx - 4Kcosx + 4Mcosx - 4Msinx + 2Ksinx - 2Mcosx] = e^{-x}cosx}$$ (8.7)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{e^{-x}[-2Ksinx + 2Mcosx] = e^{-x}cosx}$$ (8.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now, solve for the unknown coefficients:

 * {| style="width:100%" border="0"

$$\displaystyle{2M = 1 \rightarrow M = \frac{1}{2}}$$ (8.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{-2K = 0 \rightarrow K = 0}$$ (8.10)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Plug into $$ y_p(x)\!$$ (8.2):

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = \frac{1}{2}e^{-x}sinx}$$ (8.11)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now, we have both the particular solution and the general solution, which allows for us to solve for the final solution, $$ y(x) \! $$

$$  \displaystyle y(x) = (C_1 + C_2x)e^{-2x} + \frac{1}{2}e^{-x}sinx $$     (8.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

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

Solution
The solution $$ y(x)\! $$ is composed of a general solution and a particular solution so that $$ y(x) = y_g(x) + y_p(x)\!$$. First, we will find the general solution, $$ y_g(x) \!$$, by finding the roots of the characteristic equation, using the quadratic equation:

 * {| style="width:100%" border="0"

$$\displaystyle{\lambda^2 + \lambda + (\pi^2 + \frac{1}{4}) = 0 \rightarrow \lambda = \frac{-1 \pm \sqrt{1-4(1)(\pi^2 + \frac{1}{4})}}{2}}$$ (8.13)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{\lambda = -\frac{1}{2} + i\pi}$$ (8.14)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The roots of the characteristic equation are complex conjugates, meaning that the general solution, $$ y_g(x) \!$$, is the following:

 * {| style="width:100%" border="0"

$$\displaystyle{y_g(x) = e^{-\frac{x}{2}}(Acos{\pi x} + Bsin{\pi x})}$$ (8.15)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Next, we need to find the particular solution, and based on analysis of the excitation, $$ r(x) = e^{-\frac{x}{2}}sin{\pi x} \!$$, we find that the particular solution is the following:

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = e^{\alpha x}(Kcos\omega x + Msin\omega x) \rightarrow y_p(x) = e^{-\frac{x}{2}}Kcos{\pi x} + e^{-\frac{x}{2}}Msin{\pi x}}$$ (8.16)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now, we need to find the values for the constants $$ K, M \!$$, by taking the first and second derivatives of the particular solution (8.16):

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x) = e^{\alpha x}(Kcos\omega x + Msin\omega x) \rightarrow y_p(x) = e^{-\frac{x}{2}}Kcos{\pi x} + e^{-\frac{x}{2}}Msin{\pi x}}$$ (8.16)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x)' = {-\pi e^{\frac{-x}{2}}Ksin{\pi x} - \frac{{}e^{\frac{-x}{2}}}{2}Kcos{\pi x}} + {\pi e^{\frac{-x}{2}}Mcos{\pi x} + \frac{{}e^{\frac{-x}{2}}}{2}Msin{\pi x}}}$$ (8.17)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{y_p(x)'' = {-\pi^2 e^{\frac{-x}{2}}Kcos{\pi x} +  \pi \frac{e^{\frac{-x}{2}}}{2}Ksin{\pi x}}  +  \pi \frac{e^{\frac{-x}{2}}}{2}Ksin{\pi x}  + \frac{e^{\frac{-x}{2}}}{4}Kcos{\pi x}  - \pi^2 {e^{\frac{-x}{2}}}Msin{\pi x} - \pi \frac{e^{\frac{-x}{2}}}{2}{}Mcos{\pi x} - \pi \frac{e^{\frac{-x}{2}}}{2}{}Mcos{\pi x} + \frac{e^{\frac{-x}{2}}}{4}{}Msin{\pi x}}$$ (8.18)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now, we plug these into the homogeneous solution and simplify but we find that everything cancels out, meaning the unknown constants, $$ M, K \!$$ are both equal to $$ 0 \! $$. This means that the final solution is equal to just the general solution:

$$  \displaystyle y(x) = e^{\frac{-x}{2}}(Acos{\pi x} + Bsin{\pi x}) $$     (8.19)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Author
Solved and Typed By ---Egm4313.s12.team1.wyattling 22:10, 20 February 2012 (UTC)

Reviewed By - Egm4313.s12.team1.rosenberg 03:07, 22 February 2012 (UTC)

Statement
K 2011 page 85 problems 13 and 14 Problem 13: Find the complete solution for $$ 8y'' - 6y' + y = 6\cosh x\!$$, with the initial conditions $$ y(0) = 0.2, y'(0) = 0.05\!$$ Problem 14: Find the complete solution for $$ y'' + 4y' + 4y = e^{-2x}\sin 2x\!$$, with the initial conditions $$ y(0) = 1, y'(0) = -1.5\!$$

Solution
Problem 13: In order to solve the equation we must use the definition $$ y=y_{h} + y_{p}\!$$. We start with the given equation:
 * {| style="width:100%" border="0"

$$\displaystyle{8y''-6y'+y=6\cosh x}$$ (9.1) From this we get the homogeneous characteristic equation:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{8 \lambda ^2-6 \lambda +1=0 x}$$ (9.2) Factoring the characteristic equation gives us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{(4 \lambda -1)(2 \lambda -1)=0}$$ (9.3) This give us the roots:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{\lambda = \frac {1}{4}, \frac {1}{2}}$$ (9.4) Plugging in the roots gives us the general homogeneous solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{h} = c_{1} e^{\frac {1}{4} x}+c_{2} e^{\frac {1}{2} x}}$$ (9.5) Now we must solve for the particular solution. So far we know:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{\cosh x = \frac {e^x +e^{-x}}{2}}$$ (9.6) Now using the sum rule, $$\displaystyle{y_{p} = y_{p1} + y_{p2}}$$, gives us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p} = Ce^x + Ke^{-x}}$$ (9.7) Now we must take the first and second derivatives of equation 9.7:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p}' = Ce^x - Ke^{-x}}$$ (9.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p}'' = Ce^x + Ke^{-x}}$$ (9.9) Substituting 9.8 and 9.9 back into our original equation gives us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{8(Ce^x+Ke^{-x})-6(Ce^x-Ke^{-x})+Ce^x+Ke^{-x}=6(\frac {e^x+e^{-x}}{2})}$$ (9.10) Simplifying equation 9.10 give us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{3Ce^x+15Ke^{-x}=3(e^x+e^{-x})}$$ (9.11) From this we can deduce that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{3C=3, 15K=3}$$ (9.12) Thus we get that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{C=1, K= \frac{1}{5}}$$ (9.13) We now have our particular equation:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p} = e^x + \frac{1}{5} e^{-x}}$$ (9.14) Thus:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y= c_{1} e^{\frac {1}{4} x}+c_{2} e^{\frac {1}{2} x}+e^x + \frac{1}{5} e^{-x}}$$ (9.15) Now we can solve for $$ c_{1}\!$$ and $$ c_{2}\!$$ using the given initial values. We are given that at $$ y(0)=0.2\!$$, we can now plug this into our equation to get:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{0.2= c_{1} e^{\frac {1}{4} (0)}+c_{2} e^{\frac {1}{2} (0)}+e^{(0)} + \frac{1}{5} e^{-(0)}}$$ (9.16) This simplifies to:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{0.2= c_{1}+c_{2}+1+ \frac{1}{5}}$$ (9.17) Giving us that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{c_{1}+c_{2} = -1}$$ (9.18) For our second condition, $$y'(0)=0.05\!$$, we must we must take the derivative of our general solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\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}}$$ (9.19) At our initial condition gives us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{0.05= \frac {1}{4} c_{1} + \frac {1}{2} c_{2} +1 - \frac{1}{5}}$$ (9.20) Thus:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{c_{1}+2c_{2}=-3}$$ (9.21) Combining 9.18 and 9.21 gives us that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{c_{1}=1, c_{2}=-2}$$ (9.22) Plugging these coefficients in gives us our final solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$\displaystyle{y= e^{\frac {1}{4} x}-2e^{\frac {1}{2} x}+e^x + \frac{1}{5} e^{-x}}$$ (9.23)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Problem 14: In order to solve the equation we must use the definition $$ y=y_{h} + y_{p}\!$$. We start with the given equation:
 * {| style="width:100%" border="0"

$$\displaystyle{y''+4y'+4y=e^{-2x} \sin 2x}$$ (9.24) From this we get the homogeneous characteristic equation:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{\lambda ^2 +4 \lambda +4 = 0}$$ (9.25) Factoring the characteristic equation gives us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{(\lambda +2)(\lambda +2)=0}$$ (9.26) This give us the double root:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{\lambda = -2}$$ (9.27) Plugging in the roots gives us the general homogeneous solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{h} = c_{1} e^{-2x}+c_{2} xe^{-2x}}$$ (9.28) Now we must solve for the particular solution. So far we know:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{e^{-2x}\sin 2x = Cxe^{-2x}\cos 2x+Kxe^{-2x}\sin 2x}$$ (9.29) Now we must take the first and second derivatives of equation 9.29:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p}' = -2e^{-2x}(Cx\cos 2x+Kx\sin 2x)+e^{-2x}(C\cos 2x-2Cx\sin 2x+K\sin 2x+2Kx\cos 2x)}$$ (9.30)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p}'' = (-4C+4K)e^{-2x}\cos 2x+(-4k-4C)e^{-2x}\sin 2x}$$ (9.31) Substituting 9.30 and 9.31 back into our original equation gives us:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{(-3C+4K)e^{-2x}\cos 2x+(-3k-4C)e^{-2x}\sin 2x=e^{-2x}\sin 2x}$$ (9.32) From this we can deduce that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{-3C+4K=0,-3K-4C=1}$$ (9.33) Thus we get that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{C=\frac{-4}{25}, K= \frac{-3}{25}}$$ (9.34) We now have our particular equation:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y_{p} = e^{-2x}(\frac {-4}{25}x\cos 2x-\frac {3}{25}x\sin 2x)}$$ (9.35) Thus:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y=c_{1} e^{-2x}+c_{2} xe^{-2x}+e^{-2x}(\frac {-4}{25}x\cos 2x-\frac {3}{25}x\sin 2x)}$$ (9.36) Now we can solve for $$ c_{1}\!$$ and $$ c_{2}\!$$ using the given initial values. We are given that at $$ y(0)=1\!$$, we can now plug this into our equation to get:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y(0)=(c_{1} +c_{2} x)e^{-2(0)}+0=1}$$ (9.37) Giving us that:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{c_{1} = 1}$$ (9.38) For our second condition, $$y'(0)=-1.5\!$$, we must we must take the derivative of our general solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y'= -2c_{1}e^{-2x}+c_{2} (-2xe^{-2x}+e^{-2x})+\frac {-4}{25} e^{-2x}\cos 2x - \frac {3}{25} e^{-2x}\sin 2x+\frac {2}{25}e^{-2x}x\cos 2x + \frac {14}{25}e^{-2x}x\sin 2x}$$ (9.39) At our initial condition we have:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{y'(0)=-2+c_{2} -\frac{4}{25} -0 +0 +0 =0}$$ (9.40) Thus:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{c_{2}=\frac {54}{25} }$$ (9.41) Plugging these coefficients in gives us our final solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$\displaystyle{y=1 e^{-2x}+\frac {54}{25} xe^{-2x}+e^{-2x}(\frac {-4}{25}x\cos 2x-\frac {3}{25}x\sin 2x)}$$ (9.42)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Author
Solved and Typed By - Egm4313.s12.team1.rosenberg 03:04, 22 February 2012 (UTC)

Reviewed By - Egm4313.s12.team1.essenwein 02:39, 22 February 2012 (UTC)


text:
User:Egm4313.s12.team1.armanious/team1/R4

=Report 4=

Statement
4.1 from lecture notes [https://elearning2.courses.ufl.edu/access/content/group/UFL-EGM4313-5641-12012/Lecture%20Notes/iea.s12.sec7c-1.djvu R4.1 Lect. 7c pgs. 19-22]

Given the general form of polynomial excitation.

 * {| style="width:100%" border="0"

$$  \displaystyle y''+ay'+by=\sum_{j=0}^{n}d_{j}x^{j} $$     (1.1)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

The particular solution that satisfies:

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}(x)=\sum_{j=0}^{n}c_{j}x^{j} $$     (1.2)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

The first and second derivative of the particular solution that solves the original polynomial excitation equation.

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}'(x)=\sum_{j=0}^{n-1}c_{j+1}(j+1) x^{j} $$     (1.3)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle y_{p}''(x)=\sum_{j=0}^{n-2}c_{j+2}(j+2)(j+1) x^{j} $$     (1.4)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

The particular solutions are put into the polynomial excitation equation to give the general summation form:

 * {| style="width:100%" border="0"

$$  \displaystyle \sum_{j=0}^{n-2}[c_{j+2}(j+2)(j+1)+ac_{j+1}(j+1)+bc_{j}]x^{j}+ac_{n}nx^{n-1}+b[c_{n-1}x^{n-1}+c_{n}x^{n}]=\sum_{j=0}^{n}d_{j}x^{j} $$     (1.5)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Obtain the equations associated with $$d_{1}\!$$, coefficients of $$x\!$$; $$d_{2}\!$$, coefficients of $$x^{2}\!$$; $$d_{n-2}\!$$, coefficients of $$x^{n-2}\!$$; $$d_{n-1}\!$$, coefficients of $$x^{n-1}\!$$; $$d_{n}\!$$, coefficients of $$x^{n}\!$$. Five total equations for coefficients.

Also set up the matrix $$\mathbf{A}\!$$ that satisfies $$\mathbf{A}\mathbf{c}=\mathbf{d}\!$$.

Solution
The given equation associated with $$d_{0}\!$$ taking $$j=0\!$$

 * {| style="width:100%" border="1"

$$  \displaystyle 2c_{2}+ac_{1}+bc_{0}=d_{0} $$     (1.6)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Taking $$j=1\!$$
 * {| style="width:100%" border="0"

$$  \displaystyle [c_{1+2}(1+2)(1+1)+ac_{1+1}(1+1)+bc_{1}]x^{1}=d_{1}x^{^{1}} $$     (1.7)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle [6c_{3}+2ac_{2}+bc_{1}]x=d_{1}x $$     (1.8)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

The equation associated with $$d_{1}\!$$, coefficients of $$x\!$$
 * {| style="width:100%" border="1"

$$  \displaystyle 6c_{3}+2ac_{2}+bc_{1}=d_{1} $$     (1.9)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Taking $$j=2\!$$
 * {| style="width:100%" border="0"

$$  \displaystyle [c_{2+2}(2+2)(2+1)+ac_{2+1}(2+1)+bc_{2}]x^{2}=d_{2}x^{^{2}} $$     (1.10)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle [12c_{4}+3ac_{3}+bc_{2}]x^{2}=d_{2}x^{2} $$     (1.11)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

The equation associated with $$d_{2}\!$$, coefficients of $$x^{2}\!$$
 * {| style="width:100%" border="1"

$$  \displaystyle 12c_{4}+3ac_{3}+bc_{2}=d_{2} $$     (1.12)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

Taking $$j=n-2\!$$
 * {| style="width:100%" border="0"

$$  \displaystyle [c_{(n-2)+2}(n-2+2)(n-2+1)+ac_{(n-2+1)}(n-2+1)+bc_{n-2}]x^{n-2}=d_{n-2}x^{n-2} $$     (1.13)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle [c_{n}n(n-1)+ac_{(n-1)}(n-1)+bc_{n-2}]x^{n-2}=d_{n-2}x^{n-2} $$     (1.14)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

The equation associated with $$d_{n-2}\!$$, coefficients of $$x^{n-2}\!$$
 * {| style="width:100%" border="1"

$$  \displaystyle c_{n}n(n-1)+ac_{(n-1)}(n-1)+bc_{n-2}=d_{n-2} $$     (1.15)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

For $$n-1\!$$ (the summation term only goes to $$j=n-2\!$$)
 * {| style="width:100%" border="0"

$$  \displaystyle ac_{n}nx^{n-1}+bc_{n-1}x^{n-1}=d_{n-1}x^{n-1} $$     (1.16)
 * style="width:95%" |
 * style="width:95%" |
 *
 * }

 * {| style="width:100%" border="0"

$$  \displaystyle ac_{n}n+bc_{(n-1)}]x^{n-1}=d_{n-1}x^{n-1} $$     (1.17)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The equation associated with $$d_{n-1}\!$$, coefficients of $$x^{n-1}\!$$
 * {| style="width:100%" border="1"

$$  \displaystyle ac_{n}n+bc_{(n-1)}=d_{n-1} $$     (1.18)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

For $$n\!$$.
 * {| style="width:100%" border="0"

$$  \displaystyle bc_{n}x^{n}=d_{n}x^{^{n}} $$     (1.19)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The equation associated with $$d_{n}\!$$, coefficients of $$x^{n}\!$$
 * {| style="width:100%" border="1"

$$  \displaystyle bc_{n}=d_{n} $$     (1.20)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Now set up the equation:
 * {| style="width:100%" border="0"

$$  \displaystyle \mathbf{A}\mathbf{c}=\mathbf{d} $$     (1.21)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} Equation for d_{0}\\ Equation for d_{1}\\ Equation for d_{2}\\ ...\\ Equation for d_{n-2}\\ Equation for d_{n-1}\\ Equation for d_{n} \end{bmatrix}\begin{bmatrix} c_{0}\\ c_{1}\\ c_{2}\\ ...\\ c_{n-2}\\ c_{n-1}\\ c_{n} \end{bmatrix}=\begin{bmatrix} d_{0}\\ d_{1}\\ d_{2}\\ ...\\ d_{n-2}\\ d_{n-1}\\ d_{n} \end{bmatrix} $$     (1.22)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Therefore the matrix $$\mathbf{A}\!$$ that satisfies the matrix equation is:
 * {| style="width:100%" border="1"

$$  \displaystyle \mathbf{A}=\begin{bmatrix} b& a& 2&  &  &  & \\ & b&  2a&  6&  &  & \\ & &  b&  3a&  12&  & \\ ...& ...&  ...&  ...&  ...&  ...& ...\\  &  &  &  &  b&  a(n-1)& n(n-1)\\ & &  &  &  &  b& an\\ & &  &  &  &  & b \end{bmatrix} $$     (1.23)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Author
Solved and Typed By - Chris Stewart Egm4313.s12.team1.stewart (talk) -- 21:12, 11 March 2012 (UTC)

Reviewed By - --Egm4313.s12.team1.durrance (talk) 23:14, 11 March 2012 (UTC)

Statement
Consider the L2-ODE-CC with $$ \sin x \!$$ as excitation (see R4.2 Lect. 7c pgs. 26-27):

$$y''-3y'+2y = r(x) \!$$ $$r(x) = \sin x \!$$

and the initial conditions

$$y(0) = 1, y'(0) = 0 \!$$

1) Use the Taylor series for $$ \sin x \!$$ to reproduce the figure on p.7-24.

2) Let $$ y_{p,n}(x) \!$$ be the particular soln corresponding to the excitation $$ r_n(x) \!$$:

$$y''_{p,n}+ay_{p,n}'+by_{p,n}=r_n(x) \!$$

Let $$ r_n(x) \!$$be the truncated Taylor series of $$ \sin x \!$$:

$$ r_n(x):= \sum_{k=0}^{n}\frac{(-1)^kt^{2k+1}}{(2k+1)!}=t-\frac{t^3}{3!}+...+\frac{(-1)^nt^{2n+1}}{(2n+1)!} \!$$

Let $$ y_n(x)\!$$ be the overall soln for the L2-ODE-CC: $$ y''_n+ay'_n+by_n=r_n(x) \!$$ With the same initial conditions as stated above.

Find $$ y_n(x)\!$$ for n=3,5,9; plot these solns for x in the interval [0,4π].

3)Find the exact overall soln $$ y(x)\!$$, and plot it in the above figure to compare with $$ y_n(x)\!$$ for n=3,5,9.

Solution
To approximate the value of the excitation, the Taylor expansion must be found:
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=\sum_{n=0}^{\infty}\frac{f^{(n)}(\hat x)}{n!}(x-\hat x)^n $$     (2.0) For the sine function, the Taylor series approximated to 13 places is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \sin x=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!}-\frac{x^{11}}{11!}+\frac{x^{13}}{13!} $$     (2.1)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Any lower approximation would include all of the terms above without any terms with a higher order than the desired order:

Plotting every order approximation of the Taylor series up to n=13 with the actual sine function produces the following: Figure 4.2-1 In order to find the overall solution for the L2-ODE-CC corresponding to the Taylor series expansion of the sine function, both the homogenous and particular solutions must be found. The homogenous equation can be found through this method:
 * {| style="width:100%" border="0"

$$  \displaystyle y''-3y'+2y=0 $$     (2.2)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \lambda ^2-3\lambda+2=0 \rightarrow \lambda = 1,2 $$     (2.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{h,n}(x)=C_1e^x+C_2e^{2x} $$     (2.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Next, the excitation must be expanded to the desired n. The following shows the excitation expanded to n=3, 5, and 9:
 * {| style="width:100%" border="0"

$$  \displaystyle r_3(x)=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!} $$     (2.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle r_5(x)=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!}-\frac{x^{11}}{11!} $$     (2.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle r_9(x)=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\frac{x^9}{9!}-\frac{x^{11}}{11!}+\frac{x^{13}}{13!}-\frac{x^{15}}{15!}+\frac{x^{17}}{17!}-\frac{x^{19}}{19!} $$     (2.7)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Next, the particular solution must be found. The particular solution will be of the form:
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,n}=\sum_{i=0}^{n}k_ix^i $$     (2.8) Using the derivation discussed in R4.1, a matrix equation in the form Ak = d can be found, where k is the matrix containing the coefficients of the particular solution and d is the matrix containing the coefficients of each power of x in the expansion of the excitation. The general formula for A is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} b& a & 2 & &  & &\\ & b & 2a & 6 & & &\\ & & b & 3a & 12 & &\\ & &  & ... & ... & ... &\\  &  &  &  & b & a(n-1) & n(n-1)\\ & &  &  &  &b &an\\ & &  &  &  & &b \end{bmatrix} $$     (2.9) n=3 The matrix A is found as:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A = \begin{bmatrix} 2 & -3 & 2 & &  &  &  & \\  & 2 & -6 & 6 &  &  &  & \\  &  & 2 & -9 & 12 &  & &  \\  &  &  & 2 &  -12& 20 &  & \\  &  &  &  & 2 & -15 & 30 & \\  &  &  &  &  & 2 & -18 & 42\\  &  &  &  &  &  & 2 &-21 \\  &  &  &  &  &  &  & 2 \end{bmatrix} $$     (2.10) Therefore, the matrix equation is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} 2 & -3 & 2 & &  &  &  & \\  & 2 & -6 & 6 &  &  &  & \\  &  & 2 & -9 & 12 &  & &  \\  &  &  & 2 &  -12& 20 &  & \\  &  &  &  & 2 & -15 & 30 & \\  &  &  &  &  & 2 & -18 & 42\\  &  &  &  &  &  & 2 &-21 \\  &  &  &  &  &  &  & 2 \end{bmatrix} \begin{bmatrix} k_0\\ k_1\\ k_2\\ k_3\\ k_4\\ k_5\\ k_6\\ k_7 \end{bmatrix}= \begin{bmatrix} 0\\ 1\\ 0\\ -\frac{1}{6}\\ 0\\ \frac{1}{120}\\ 0\\ -\frac{1}{5040} \end{bmatrix} $$     (2.11)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} k_0\\ k_1\\ k_2\\ k_3\\ k_4\\ k_5\\ k_6\\ k_7 \end{bmatrix}= \begin{bmatrix} -0.1992\\ -0.3984\\ -0.3984\\ -0.0990\\ -0.0078\\ -0.0031\\ -0.0010\\ -9.9206\times 10^{-5} \end{bmatrix} $$     (2.12) Therefore the particular solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,3}(x)=-9.9206\times 10^{-5}x^7-0.0010x^6-0.0031x^5-0.0078x^4-0.0990x^3-0.3984x^2-0.3984x-0.1992 $$     (2.13) And the overall solution for n=3 is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{3}(x)=C_1e^x+C_2e^{2x}-9.9206\times 10^{-5}x^7-0.0010x^6-0.0031x^5-0.0078x^4-0.0990x^3-0.3984x^2-0.3984x-0.1992 $$     (2.14) Using the initial conditions:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 1=C_1+C_2-0.1992 \& 0=C_1+2C_2-0.3984 $$     (2.15) Solving yields $$C_1=2 \& C_2=-0.8008 \!$$. Therefore the overall solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle y_{3}(x)=2e^x-0.8008e^{2x}-9.9206\times 10^{-5}x^7-0.0010x^6-0.0031x^5-0.0078x^4-0.0990x^3-0.3984x^2-0.3984x-0.1992 $$     (2.16) n=5 The matrix equation is: Therefore the particular solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,5}(x)=-1.2526\times 10^{-8}x^{11}-2.0668\times 10^{-7}x^{10}-1.0334\times 10^{-6}x^9-4.6503\times 10^{-6}x^8-1.1781\times 10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.2000 $$     (2.18) And the overall solution for n=5 is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{5}(x)=C_1e^x+C_2e^{2x}-1.2526\times 10^{-8}x^{11}-2.0668\times 10^{-7}x^{10}-1.0334\times 10^{-6}x^9-4.6503\times 10^{-6}x^8-1.1781\times 10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.2000 $$     (2.19) Using the initial conditions:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 1=C_1+C_2-0.2 \& 0=C_1+2C_2-0.3999 $$     (2.20) Solving yields $$C_1=2.0001 \& C_2=-0.8001 \!$$. Therefore the overall solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle y_{5}(x)=2.0001e^x-0.8001e^{2x}-1.2526\times 10^{-8}x^{11}-2.0668\times 10^{-7}x^{10}-1.0334\times 10^{-6}x^9-4.6503\times 10^{-6}x^8-1.1781\times 10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.0999x^3-0.3999x^2-0.3999x-0.2 $$     (2.21) n=9 The matrix equation is: Therefore the particular solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{p,9}(x)=-4.1103\times 10^{-18}x^{19}-1.1714\times 10^{-16}x^{18}-1.0543\times 10^{-15}x^{17}-8.9615\times 10^{-15}x^{16}-4.5405\times 10^{-13}x^{15}-9.1408\times 10^{-12}x^{14}-6.3985\times 10^{-11}x^{13}-4.1590\times 10^{-10}x^{12}-1.5021\times 10^{-8}x^{11}-2.2040\times 10^{-7}x^{10}-1.1020\times 10^{-6}x^9-4.9591\times 10^{-6}x^8-1.1904\times 10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.1000x^3-0.4000x^2-0.4000x-0.2000 $$     (2.23) And the overall solution for n=9 is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_{9}(x)=C_1e^x+C_2e^{2x}-4.1103\times 10^{-18}x^{19}-1.1714\times 10^{-16}x^{18}-1.0543\times 10^{-15}x^{17}-8.9615\times 10^{-15}x^{16}-4.5405\times 10^{-13}x^{15}-9.1408\times 10^{-12}x^{14}-6.3985\times 10^{-11}x^{13}-4.1590\times 10^{-10}x^{12}-1.5021\times 10^{-8}x^{11}-2.2040\times 10^{-7}x^{10}-1.1020\times 10^{-6}x^9-4.9591\times 10^{-6}x^8-1.1904\times 10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.1000x^3-0.4000x^2-0.4000x-0.2000 $$     (2.24) Using the initial conditions:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 1=C_1+C_2-0.2 \& 0=C_1+2C_2-0.4 $$     (2.25) Solving yields $$C_1=2 \& C_2=-0.8 \!$$. Therefore the overall solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="1"

$$  \displaystyle y_{9}(x)=2e^x-0.8e^{2x}-4.1103\times 10^{-18}x^{19}-1.1714\times 10^{-16}x^{18}-1.0543\times 10^{-15}x^{17}-8.9615\times 10^{-15}x^{16}-4.5405\times 10^{-13}x^{15}-9.1408\times 10^{-12}x^{14}-6.3985\times 10^{-11}x^{13}-4.1590\times 10^{-10}x^{12}-1.5021\times 10^{-8}x^{11}-2.2040\times 10^{-7}x^{10}-1.1020\times 10^{-6}x^9-4.9591\times 10^{-6}x^8-1.1904\times 10^{-4}x^7-0.0011x^6-0.0033x^5-0.0083x^4-0.1000x^3-0.4000x^2-0.4000x-0.2000 $$     (2.26) The following plot shows the overall solution of the ODE at n=3,5,9 over the domain [0,4π]: Figure 4.2-2
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The near perfect overlap between all three graphs shows that the approximations converge quickly for very low values of n.

Next, the exact ODE will be calculated to find the accuracy of the above approximations. The homogeneous solution is the same as the homogeneous solution above, only with different coefficients. The particular solution will be in the form:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p(x)=K\cos x + M\sin x $$ (2.27)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_p'(x)=-K\sin x + M\cos x $$ (2.28)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_p''(x)=-K\cos x - M\sin x $$ (2.29) Plugging these values into the ODE:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -K\cos x - M\sin x + 3K\sin x - 3M\cos x + 2K\cos x + 2M\sin x =\sin x $$ (2.30) Separating sine and cosine terms yield two linear equations which can be used to solve for the unknown coefficients:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle K-3M=0 \& 3K+M=1 $$     (2.31) Solving these equations yield K = 0.3 and M = 0.1.
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_p(x)=0.3\cos x + 0.1\sin x $$ (2.32) Therefore the exact overall solution is:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y(x)=C_1e^x + C_2e^{2x}+0.3\cos x + 0.1\sin x $$ (2.33)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y'(x)=C_1e^x + 2C_2e^{2x}-0.3\sin x + 0.1\cos x $$ (2.34) Using the initial conditions yield the equations:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 1=C_1 + C_2 + 0.3 \&  0=C_1 + 2C_2 + 0.1 $$     (2.35)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solving these two equations yield $$C_1=1.5 \& C_2=-0.8 \!$$. Therefore the exact overall solution is:
 * {| style="width:100%" border="1"

$$  \displaystyle y(x)=1.5e^x - 0.8e^{2x}+0.3\cos x + 0.1\sin x $$ (2.36)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The following figure shows the plot of the exact solution over the plot in Fig. 4.2-2: Figure 4.2-3 The overlap of the plots shows that the Taylor series approximation approach to the ODE is actually accurate to a very large degree with respect to the exact solution of the ODE.

Author
Solved and Typed By - Egm4313.s12.team1.armanious (talk) 04:02, 14 March 2012 (UTC)

Reviewed By - Chris Stewart Egm4313.s12.team1.stewart (talk) 04:52, 14 March 2012 (UTC)

Statement
Consider the L2-ODE-CC (5) p7b-7 with log(1+x) as excitation:

 * {| style="width:100%" border="0"

y''-3y'+2y=r(x) $$     (3.0)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }
 * {| style="width:100%" border="0"

r(x) = \log (1+x) $$     (3.1)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

And the initial conditions
 * {| style="width:100%" border="0"

y(-\frac{3}{4}) =1, y'(-\frac{3}{4}) =0 $$     (3.2)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

1. Develop log(1+x) in Taylor series, about $$\displaystyle \hat x =0$$ to reproduce the figure on p.7-25

2. Let $$\displaystyle r_{n}(x)$$ be the truncated Taylor series, with n terms--which is also the highest degree of the Taylor (power) series -- of lg(1+x).

Find $$\displaystyle y_{n}(x)$$, for n=4,7,11, such that:

with the same initial conditions (2).

Plot $$\displaystyle y_{n}(x)$$ for n = 4,7,11 for x in $$\displaystyle [-\frac{3}{4},3]$$.

3. Use the matlab command ode45 to integrate numerically (5) p.7b-7 with (1)-(2) p 7-28 o obtain the numerical soln for y(x). Plot y(x) in the same figure with $$\displaystyle y_{n}(x)$$

Solution
1. Developing the Taylor series First, we take the generic Taylor series formula:

 * {| style="width:100%" border="0"

f(x)=\sum_{n=0}^{\infty }\frac{f^{(n)} (\hat x)}{n!} (x- \hat x)^n $$     (3.3)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

Then, log(1+x) is expanded into a power series:
 * {| style="width:100%" border="0"

log(1+x)= \frac{1}{1!} (x)^1 + \frac{-1}{2!} (x)^2 + \frac{1}{3!} (x)^3 + \frac{-1}{4!} (x)^4 ... $$     (3.4)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

2. Yn(x) at different n values First we create the characteristic equation in standard form:
 * {| style="width:100%" border="0"

$$\displaystyle{\lambda^2-3 \lambda +2=0}$$ (3.5) Then, by setting it equal to zero, we can find what $$ \lambda \!$$ equals:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$\displaystyle{(\lambda - 2)(\lambda -1) = 0}$$ (3.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$\displaystyle{\lambda = 2,\lambda =1}$$ (3.7)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Given two, distinct, real roots, the homogeneous solution looks like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_h(x)=C_1e^{2x} + C_2e^{x} $$     (3.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The particular solution at n=4 is of the form:

 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= A_4 x^4+ A_3 x^3 +A_2 x^2 + A_1 x + A_0 $$     (3.9)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

It's derivative would look like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p '(x)= 4A_4 x^3 + 3A_3 x^2 + 2 A_2 x + A_1 $$     (3.10)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

And the second derivative to follow would then become:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p ''(x)= 12A_4 x^2 + 6A_3 x + 2A_2 $$     (3.11)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Based on the coefficients, the following system of equations exists:
 * {| style="width:100%" border="0"

$$  \displaystyle 2A_4 = \frac{-1}{24} $$     (3.12)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle - 12A_4 + 2A_3 = \frac{1}{6} $$     (3.13)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 12 A_4 - 9A_3 + 2A_2 = \frac{-1}{2} $$     (3.14)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 6 A_3 - 6A_2 + 2A_1 = 1 $$     (3.15)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 2 A_2 - 3A_1 + 2A_0 = 0 $$     (3.16)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The results of this set of equations make the coefficients of A's:
 * {| style="width:100%" border="0"

$$  \displaystyle A_4 = \frac{-1}{48} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_3 =\frac{-1}{24} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_2 =\frac{-3}{16} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_1 =\frac{1}{16} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_0 =\frac{9}{32} $$ The resulting particular equation looks like this:
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= \frac{-1}{48}x^4 + \frac{-1}{24}x^3 + \frac{-3}{16} x^2 + \frac{1}{16} x + \frac{9}{32} $$     (3.17) By adding the particular and homogeneous solutions, we get the complete solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle \frac{-1}{48}x^4 + \frac{-1}{24}x^3 + \frac{-3}{16} x^2 + \frac{1}{16} x + \frac{9}{32} + C_1e^{2x} + C_2e^{x} = y_{n=4}(x) $$     (3.18)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

We consider the initial conditions by taking the first derivative of the complete solution:

 * {| style="width:100%" border="0"

$$  \displaystyle 4\frac{-1}{48}x^3 + 3\frac{-1}{24}x^2 + 2\frac{-3}{16} x + \frac{1}{16} + 2 C_1e^{2x} + C_2e^{x} = y' $$ (3.19)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

By plugging in -3/4 for x, 1 for y, and 0 for y', we can solve for the constants $$C_1, C_2 \!$$:
 * {| style="width:100%" border="0"

$$  \displaystyle 1= \frac{-1}{48}(-.75)^4 + \frac{-1}{24}(-.75)^3 + \frac{-3}{16} (-.75)^2 + \frac{1}{16} (-.75) + \frac{9}{32} + C_1e^{2(-.75)} + C_2e^{-.75} = y_{n=4}(-.75) $$     (3.20)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 0= 4\frac{-1}{48}(-.75)^3 + 3\frac{-1}{24}(-.75)^2 + 2\frac{-3}{16} (-.75) + \frac{1}{16} + 2 C_1e^{2(-.75)} + C_2e^{(-.75)} = y'_{n=4}(-.75) $$     (3.21)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solving the equations proves that $$C_1 = -4.8322, C_2 = 4.0745 \!$$: The resulting complete solution at n=4 with consideration for initial conditions then becomes:
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{-1}{48}x^4 + \frac{-1}{24}x^3 + \frac{-3}{16} x^2 + \frac{1}{16} x + \frac{9}{32} + -4.8322e^{2x} + 4.0745e^{x} = y_{n=4}(x) $$     (3.22)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The particular solution at n=7 is found using this matrix equation:

 * {| style="width:100%" border="0"

$$  \displaystyle {\begin{bmatrix} 2 & -3 & 2 & 0 & 0 & 0 & 0 \\ 0 & 2 & -6 & 6 & 0 & 0 & 0 \\ 0 & 0 & 2 & -9 & 12 & 0 & 0 \\ 0 & 0 & 0 & 2 & -12 & 20 & 0 \\ 0 & 0 & 0 & 0 & 2 & -15 & 30 \\ 0 & 0 & 0 & 0 & 0 & 2 & -18\\ 0 & 0 & 0 & 0 & 0 & 0 & 2 \\ \end{bmatrix}} \cdot \begin{pmatrix} {A}_{0}\\ {A}_{1}\\ {A}_{2}\\ {A}_{3}\\ {A}_{4}\\ {A}_{5}\\ {A}_{6}
 * style="width:95%" |
 * style="width:95%" |

\end{pmatrix} =\begin{Bmatrix} 0\\ 1\\ -1/2\\ 1/6\\ -1/24\\ 1/120\\ -1/720

\end{Bmatrix} $$     (3.23)
 *

 * }

The values for A then look like this:
 * {| style="width:100%" border="0"

$$  \displaystyle A_0 =\frac{-21}{128} $$ $$  \displaystyle A_1 =\frac{-21}{64} $$
 * style="width:95%" |
 * style="width:95%" |

$$  \displaystyle A_2 =\frac{-21}{64} $$

$$  \displaystyle A_3 =\frac{-5}{96} $$

$$  \displaystyle A_4 =\frac{-5}{192} $$

$$  \displaystyle A_5 =\frac{-1}{480} $$

$$  \displaystyle A_6 =-6.944E-4 $$
 * }

The resulting particular equation looks like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= -6.944E-4x^7 + \frac{-1}{480}x^6 + \frac{-5}{192}x^5 + \frac{-5}{96}x^4 + \frac{-21}{64}x^3 + \frac{-21}{64} x^2 + \frac{-21}{128} x $$ (3.24) By adding the particular and homogeneous solutions, we get the complete solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle -6.944E-4x^7 + \frac{-1}{480}x^6 + \frac{-5}{192}x^5 + \frac{-5}{96}x^4 + \frac{-21}{64}x^3 + \frac{-21}{64} x^2 + \frac{-21}{128} x + C_1e^{2x} + C_2e^{x} = y_{n=7}(x) $$     (3.25)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

We consider the initial conditions by taking the first derivative of the complete solution:

 * {| style="width:100%" border="0"

$$  \displaystyle (7)-6.944E-4x^6 + (6)\frac{-1}{480}x^5 + (5)\frac{-5}{192}x^4 + (4)\frac{-5}{96}x^3 + (3)\frac{-21}{64}x^2 + (2)\frac{-21}{64} x + \frac{-21}{128} + 2 C_1e^{2x} + C_2e^{x} = y'_{n=7}(x) $$     (3.26)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

By plugging in -3/4 for x, 1 for y, and 0 for y', we can solve for the constants $$C_1, C_2 \!$$:
 * {| style="width:100%" border="0"

$$  \displaystyle 1= -6.944E-4(-.75)^7 + \frac{-1}{480}(-.75)^6 + \frac{-5}{192}(-.75)^5 + \frac{-5}{96}(-.75)^4 + \frac{-21}{64}(-.75)^3 + \frac{-21}{64} (-.75)^2 + \frac{-21}{128} (-.75) + C_1e^{2(-.75)} + C_2e^{(-.75)} = y_{n=7}(-.75) $$     (3.27)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 0=  (7)-6.944E-4(-.75)^6 + (6)\frac{-1}{480}(-.75)^5 + (5)\frac{-5}{192}(-.75)^4 + (4)\frac{-5}{96}(-.75)^3 + (3)\frac{-21}{64}(-.75)^2 + (2)\frac{-21}{64} (-.75) + \frac{-21}{128} + 2 C_1e^{2(-.75)} + C_2e^{(-.75)} = y'_{n=7}((-.75)) $$     (3.28)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solving the equations proves that $$C_1 = -3.3921, C_2 = 3.5789 \!$$: The resulting complete solution at n=7 with consideration for initial conditions then becomes:
 * {| style="width:100%" border="0"

$$  \displaystyle -6.944E-4x^7 + \frac{-1}{480}x^6 + \frac{-5}{192}x^5 + \frac{-5}{96}x^4 + \frac{-21}{64}x^3 + \frac{-21}{64} x^2 + \frac{-21}{128} x + (-3.3921)e^{2x} + (3.5789)e^{x} = y_{n=7}(x) $$     (3.29)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The particular solution at n=11 is found using this matrix equation:

 * {| style="width:100%" border="0"

(3.30)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The values for A then look like this:
 * {| style="width:100%" border="0"

$$  \displaystyle A_0 =\frac{2481}{2048} $$ $$  \displaystyle A_1 =\frac{36635}{3072} $$
 * style="width:95%" |
 * style="width:95%" |

$$  \displaystyle A_2 =\frac{5897}{1024} $$

$$  \displaystyle A_3 =\frac{8987}{4608} $$

$$  \displaystyle A_4 =\frac{1417}{3072} $$

$$  \displaystyle A_5 =\frac{415}{4608} $$

$$  \displaystyle A_6 =\frac{33}{2560} $$

$$  \displaystyle A_7 =.001434 $$

$$  \displaystyle A_8 =5.27E-5 $$

$$  \displaystyle A_9 =3.44E-6 $$

$$  \displaystyle A_{10} =1.37786E-7 $$
 * }

The resulting particular equation looks like this:

 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= 1.37786E-7x^{11} + 3.44E-6x^{10} + 5.27E-5x^9 + .001434x^ 8 + \frac{33}{2560}x^7 + \frac{415}{4608}x^6 +  \frac{1417}{3072}x^5 +  \frac{8987}{4608} x^4 + \frac{5897}{1024} x^3 +  \frac{36635}{3072} x^2 + \frac{2481}{2048} x $$ (3.31) By adding the particular and homogeneous solutions, we get the complete solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 1.37786E-7x^{11} + 3.44E-6x^{10} + 5.27E-5x^9 + .001434x^ 8 + \frac{33}{2560}x^7 + \frac{415}{4608}x^6 +  \frac{1417}{3072}x^5 +  \frac{8987}{4608} x^4 + \frac{5897}{1024} x^3 +  \frac{36635}{3072} x^2 + \frac{2481}{2048} x  + C_1e^{2x} + C_2e^{x} = y_{n=11}(x) $$     (3.32)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

We consider the initial conditions by taking the first derivative of the complete solution:

 * {| style="width:100%" border="0"

$$  \displaystyle (11)1.37786E-7x^{10} + (10)3.44E-6x^9 + (9)5.27E-5x^8 + (8).001434x^ 7 + (7)\frac{33}{2560}x^6 + (6)\frac{415}{4608}x^5 +  (5)\frac{1417}{3072}x^4 +  (4)\frac{8987}{4608} x^3 + (3)\frac{5897}{1024} x^2 +  (2)\frac{36635}{3072} x + \frac{2481}{2048}  + C_1e^{2x} + C_2e^{x} = y'_{n=11}(x) $$     (3.33)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

By plugging in -3/4 for x, 1 for y, and 0 for y', we can solve for the constants $$C_1, C_2 \!$$:
 * {| style="width:100%" border="0"

$$  \displaystyle 1= 1.37786E-7(-.75)^{11} + 3.44E-6(-.75)^{10} + 5.27E-5(-.75)^9 + .001434(-.75)^ 8 + \frac{33}{2560}(-.75)^7 + \frac{415}{4608}(-.75)^6 +  \frac{1417}{3072}(-.75)^5 +  \frac{8987}{4608} (-.75)^4 + \frac{5897}{1024} (-.75)^3 +  \frac{36635}{3072} (-.75)^2 + \frac{2481}{2048} (-.75)  + C_1e^{2(-.75)} + C_2e^{(-.75)} = y_{n=11}(-.75) $$     (3.34)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 0=  (11)1.37786E-7(-.75)^{10} + (10)3.44E-6(-.75)^9 +  (9)5.27E-5(-.75)^8 + (8).001434(-.75)^ 7 + (7)\frac{33}{2560}(-.75)^6 + (6)\frac{415}{4608}(-.75)^5 +  (5)\frac{1417}{3072}(-.75)^4 +  (4)\frac{8987}{4608} (-.75)^3 + (3)\frac{5897}{1024} (-.75)^2 +  (2)\frac{36635}{3072} (-.75) + \frac{2481}{2048}  + C_1e^{2(-.75)} + C_2e^{(-.75)} = y'_{n=11}(-.75) $$     (3.35)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Solving the equations proves that $$C_1 = 56.1374, C_2 = -32.64 \!$$: The resulting complete solution at n=11 with consideration for initial conditions then becomes:
 * {| style="width:100%" border="0"

$$  \displaystyle 1.37786E-7x^{11} + 3.44E-6x^{10} + 5.27E-5x^9 + .001434x^ 8 + \frac{33}{2560}x^7 + \frac{415}{4608}x^6 +  \frac{1417}{3072}x^5 +  \frac{8987}{4608} x^4 + \frac{5897}{1024} x^3 +  \frac{36635}{3072} x^2 + \frac{2481}{2048} x  + 56.1374e^{2x} + -32.64e^{x} = y_{n=11}(x) $$     (3.36)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

'''Plot of all n=4 (red), n=7 (blue), n=11 (green). '''

3. Plotting the actual y(x) against approximations

Author
Solved and Typed By - Egm4313.s12.team1.silvestri (talk) 23:17, 12 March 2012 (UTC)

Reviewed By ---Egm4313.s12.team1.rosenberg (talk) 03:10, 13 March 2012 (UTC)

Problem R4.4
4.4 from lecture notes [https://elearning2.courses.ufl.edu/access/content/group/UFL-EGM4313-5641-12012/Lecture%20Notes/iea.s12.sec7c-1.djvu R4.1 Lect. 7c pgs. 29-30]

Extend the accuracy of the solution beyond $$ \widehat{x} = 1\!$$.

Part 1 Statement
1. Back up away a little from the brink of non-convergence at $$ x = 1\!$$ for the Taylor series of $$ log(1+x)\!$$ about $$ \widehat{x} = 0\!$$, and consider the point $$ x_1 = 0.9\!$$.

Find the value of $$ y_n(x_1), y'_n(x_1)\!$$ that will serve as initial conditions for the next iteration to extend the domain of accuracy of the analytical solution. Find $$n\!$$ sufficiently high so that $$ y_n(x_1), y'_n(x_1)\!$$ do not differ from the numerical solution by more than $$ 10^{-5}\!$$.

Part 2 Statement
2. Develop $$ log(1+x)\!$$ in Taylor series about $$ \widehat{x} = 1\!$$ for $$ n = 4, 7, 11\!$$, and plot these truncated series vs the exact function.

What is now the domain of convergence? (by observation of your results.)

Part 2 Solution
First, we have the general form of a Taylor series:

 * {| style="width:100%" border="0"

f(x)=\sum_{n=0}^{\infty }\frac{f^{(n)} (\hat x)}{n!} (x- \hat x)^n $$     (4.2.0)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

Next, we set $$ f(x) = r(x) = log(1+x)\!$$ and take several derivatives of $$ f(x)\!$$:

 * {| style="width:100%" border="0"

f(x)=log(1+x) \rightarrow f'(x) = \frac{1}{(x+1)}, f(x) = \frac{-1}{(x+1)^2}, f'(x) = \frac{2}{(x+1)^3}... $$
 * $$\displaystyle
 * $$\displaystyle
 * }

Using these derivatives, we can now develop $$ log(1+x)\!$$ in Taylor series about $$ \hat x = 1\!$$:

 * {| style="width:100%" border="0"

r(x) = log(1+x) = f(x)=\sum_{n=0}^{\infty }\frac{f^{(n)} (1)}{n!} (x- 1)^n = \frac{1}{0!}(x-1)^0 + \frac{1}{1!}(x-1)^1 - \frac{1}{2!}(x-1)^2 + \frac{2}{3!}(x-1)^3 - \frac{6}{4!}(x-1)^4 + ... $$     (4.2.1)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

 * {| style="width:100%" border="0"

r(x) = log(1+x) = f(x)=\sum_{n=0}^{\infty }\frac{(-1)^{n-1}f^{(n)}(x-1)^n}{n!} $$     (4.2.2)
 * $$\displaystyle
 * $$\displaystyle
 *

 * }

Now the Taylor series for $$ n = 4, 7, 11\!$$ can be developed:

For $$ n = 4\!$$:

 * {| style="width:100%" border="1"

$$  \displaystyle f(x)=\sum_{n=0}^{\infty }\frac{(-1)^{3}f^{(4)}(x-1)^4}{4!} = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{6}(x-1)^3 - \frac{1}{24}(x-1)^4 $$     (4.2.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

For $$ n = 7\!$$:

 * {| style="width:100%" border="1"

$$  \displaystyle f(x)=\sum_{n=0}^{\infty }\frac{(-1)^{6}f^{(7)}(x-1)^7}{7!} = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{6}(x-1)^3 - \frac{1}{24}(x-1)^4 + \frac{1}{120}(x-1)^5 - \frac{1}{720}(x-1)^6 + \frac{1}{5040}(x-1)^7 $$     (4.2.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

For $$ n = 11\!$$:

 * {| style="width:100%" border="1"

$$  \displaystyle f(x)=\sum_{n=0}^{\infty }\frac{(-1)^{10}f^{(11)}(x-1)^{11}}{11!} = (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{6}(x-1)^3 - \frac{1}{24}(x-1)^4 + \frac{1}{120}(x-1)^5 - \frac{1}{720}(x-1)^6 + \frac{1}{5040}(x-1)^7 - \frac{1}{40320}(x-1)^8 + \frac{1}{362880}(x-1)^9 - \frac{1}{3628800}(x-1)^{10} + \frac{1}{39916800}(x-1)^{11} $$     (4.2.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Part 3 Statement
3. Find $$ y_n(x)\!$$, for $$ n = 4, 7, 11\!$$, such that: $$ y''_n + ay'_n + by_n = r_n(x)\!$$ for $$ x\!$$ in $$ [0.9,3]\!$$ with the initial conditions found i.e., $$ y_n(x_1), y'_n(x_1)\!$$.

Plot $$ y_n(x)\!$$ for $$ n = 4, 7, 11\!$$ for $$ x\!$$ in $$ [0.9,3]\!$$.

Part 3 Solution
Using the same characteristic in problem 4.3 (3.5), we see that the homogenous solution is the same (3.8):

 * {| style="width:100%" border="0"

$$  \displaystyle y_h(x)=C_1e^{2x} + C_2e^{x} $$     (4.3.0)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The particular solution at n=4 is of the form:

 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= A_4 (x-1)^4+ A_3 (x-1)^3 +A_2 (x-1)^2 + A_1 (x-1) + A_0 $$     (4.3.1)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

It's derivative would look like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p '(x)= 4A_4 (x-1)^3 + 3A_3 (x-1)^2 + 2 A_2 (x-1) + A_1 $$     (4.3.2)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

And the second derivative to follow would then become:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p ''(x)= 12A_4 (x-1)^2 + 6A_3 (x-1) + 2A_2 $$     (4.3.3)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

Based on the coefficients, the following system of equations exists:
 * {| style="width:100%" border="0"

$$  \displaystyle 2A_4 = \frac{-1}{4} $$     (4.3.4)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle - 12A_4 + 2A_3 = \frac{1}{3} $$     (4.3.5)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 12 A_4 - 9A_3 + 2A_2 = \frac{-1}{2} $$     (4.3.6)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle 6 A_3 - 6A_2 + 2A_1 = 1 $$     (4.3.7)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 2 A_2 - 3A_1 + 2A_0 = 0 $$     (4.3.8)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The results of this set of equations make the coefficients of A's:
 * {| style="width:100%" border="0"

$$  \displaystyle A_4 = \frac{-1}{8} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_3 =\frac{-7}{12} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_2 =\frac{-17}{8} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_1 =\frac{-33}{8} $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle A_0 =\frac{-65}{16} $$ The resulting particular equation looks like this:
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= \frac{-1}{8}(x-1)^4 + \frac{-7}{12}(x-1)^3 + \frac{-17}{8}(x-1)^2 + \frac{-33}{8}(x-1) + \frac{-65}{16} $$     (4.3.9) By adding the particular and homogeneous solutions, we get the complete solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle y_{n=4}(x) = C_1e^{2x} + C_2e^{x} + \frac{-1}{8}(x-1)^4 + \frac{-7}{12}(x-1)^3 + \frac{-17}{8}(x-1)^2 + \frac{-33}{8}(x-1) + \frac{-65}{16} $$     (4.3.10)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The particular solution at n=7 is found using this matrix equation:

 * {| style="width:100%" border="0"

$$  \displaystyle {\begin{bmatrix} 2 & -3 & 2 & 0 & 0 & 0 & 0 \\ 0 & 2 & -6 & 6 & 0 & 0 & 0 \\ 0 & 0 & 2 & -9 & 12 & 0 & 0 \\ 0 & 0 & 0 & 2 & -12 & 20 & 0 \\ 0 & 0 & 0 & 0 & 2 & -15 & 30 \\ 0 & 0 & 0 & 0 & 0 & 2 & -18\\ 0 & 0 & 0 & 0 & 0 & 0 & 2 \\ \end{bmatrix}} \cdot \begin{pmatrix} {A}_{0}\\ {A}_{1}\\ {A}_{2}\\ {A}_{3}\\ {A}_{4}\\ {A}_{5}\\ {A}_{6}
 * style="width:95%" |
 * style="width:95%" |

\end{pmatrix} =\begin{Bmatrix} 0\\ 1\\ -1/2\\ 1/3\\ -1/4\\ 1/5\\ -1/6

\end{Bmatrix} $$     (4.3.11)
 *

 * }

The values for A then look like this:
 * {| style="width:100%" border="0"

$$  \displaystyle A_0 =\frac{-99}{2} $$
 * style="width:95%" |
 * style="width:95%" |

$$  \displaystyle A_1 =-99 $$

$$  \displaystyle A_2 =-49 $$

$$  \displaystyle A_3 =\frac{-95}{6} $$

$$  \displaystyle A_4 =\frac{-15}{4} $$

$$  \displaystyle A_5 =\frac{-13}{20} $$

$$  \displaystyle A_6 =\frac{-1}{12} $$
 * }

The resulting particular equation looks like this:
 * {| style="width:100%" border="0"

$$  \displaystyle y_p (x)= \frac{-1}{12}(x-1)^7 + \frac{-13}{20}(x-1)^6 + \frac{-15}{4}(x-1)^5 + \frac{-95}{6}(x-1)^4 + -49(x-1)^3 + -99(x-1)^2 + \frac{-199}{2}(x-1) $$     (4.3.12) By adding the particular and homogeneous solutions, we get the complete solution:
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

 * {| style="width:100%" border="0"

$$  \displaystyle y_{n=7}(x) = C_1e^{2x} + C_2e^{x} + \frac{-1}{12}(x-1)^7 + \frac{-13}{20}(x-1)^6 + \frac{-15}{4}(x-1)^5 + \frac{-95}{6}(x-1)^4 + -49(x-1)^3 + -99(x-1)^2 + \frac{-199}{2}(x-1) $$     (4.3.13)
 * style="width:95%" |
 * style="width:95%" |
 *

 * }

The particular solution at n=11 is found using this matrix equation:

Part 4 Statement
4. Use the matlab command ode45 to integrate numerically $$ y'' - 3y' + 2y = r(x)\!$$ with $$ r(x) = log(1+x)\!$$ and the initial conditions $$ y_n(x_1), y'_n(x_1)\!$$ to obtain the numerical solution for $$ y(x)\!$$.

Plot $$ y(x)\!$$ in the same figure with $$ y_n(x)\!$$.

Author
Solved and Typed By - --Egm4313.s12.team1.wyattling (talk) 19:44, 14 March 2012 (UTC)

Reviewed By - 209.251.138.213 14:00, 14 March 2012 (UTC)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/