User:Egm6321.f11.team1.colsonfe/HW6

= R*6.6 Reverse Engineering ODE Equations =

Given
Trial solutions:


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

$$
 * $$\frac{e^{rx}}{x^2}, r=\text{constant}$$
 * $$\displaystyle (Equation\;6.6.1)
 * $$\displaystyle (Equation\;6.6.1)
 * }
 * }


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

$$
 * $$\frac{e^{rx}}{\sin x}, r=\text{constant}$$
 * $$\displaystyle (Equation\;6.6.2)
 * $$\displaystyle (Equation\;6.6.2)
 * }
 * }

Characteristic equations:
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle r^2+3=0$$
 * $$\displaystyle (Equation\;6.6.3)
 * $$\displaystyle (Equation\;6.6.3)
 * }
 * }


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

$$
 * $$\displaystyle r_1=2$$
 * $$\displaystyle (Equation\;6.6.4)
 * $$\displaystyle (Equation\;6.6.4)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$
 * $$r_2(x)=\frac{1}{x+1}$$
 * $$\displaystyle (Equation\;6.6.5)
 * $$\displaystyle (Equation\;6.6.5)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$.
 * $$\displaystyle (r-r_1)[r-r_2(x)]=0$$
 * $$\displaystyle (Equation\;6.6.6)
 * $$\displaystyle (Equation\;6.6.6)
 * }
 * }

== Find ==

Find a homogeneous L2-ODE-VC that accepts the trial solutions Equation 6.6.1 and Equation 6.6.2, and their respective characteristic equations, Equation 6.6.3, and Equation 6.6.4 thru Equation 6.6.6.

Solution
I will mirror the approach laid out in Meeting 36.

Multiply the trial solution of Equation 6.6.1 (and its derivatives) by unknown coefficients $$\displaystyle a(x)$$.

$$\left[\frac{e^{rx}}{x^2}\right]\times a_0(x)$$

$$\left[\frac{d}{dx}\left(\frac{e^{rx}}{x^2}\right)=\left(r-\frac{2}{x}\right)\frac{e^{rx}}{x^2}\right]\times a_1(x)$$

$$\left[\frac{d^2}{dx^2}\left(\frac{e^{rx}}{x^2}\right)=\left(r^2-\frac{4r}{x}+\frac{6}{x^2}\right)\frac{e^{rx}}{x^2}\right]\times a_2(x)$$

Now equate the sum of the above three results to the product of the trial solution (Equation 6.6.1) and the characteristic equation (Equation 6.6.3):

$$\frac{e^{rx}}{x^2}\left[a_2\left(r^2-\frac{4r}{x}+\frac{6}{x^2}\right)+a_1\left(r-\frac{2}{x}\right)+a_0\right]=\frac{e^{rx}}{x^2}(r^2+3)=0$$

$$a_2r^2+\left(\frac{4a_2}{x}+a_1\right)r+\left(\frac{6a_2}{x^2}-\frac{2a_1}{x}+a_0\right)=r^2+3$$

Comparing the polynomial coefficients of $$\displaystyle r$$ yields the following:

$$a_2=1, \quad a_1=-\frac{4}{x}, \quad a_0=3-\frac{48}{x^2}$$

If we define $$f:=\frac{e^{rx}}{x^2}$$, the following L2-ODE-VC will be satisfied:

Now the same technique will be applied to Equation 6.6.2 and its characteristic equation. Even though one root is a function of x, the technique is still valid as long as one root is constant. See page (36-2) in Meeting 36.

Multiply the trial solution of Equation 6.6.2 (and its derivatives) by unknown coefficients $$\displaystyle a(x)$$.

$$\left[\frac{e^{rx}}{\sin x}\right]\times a_0(x)$$

$$\left[\frac{d}{dx}\left(\frac{e^{rx}}{\sin x}\right)=\left(r-\cot x\right)\frac{e^{rx}}{\sin x}\right]\times a_1(x)$$

$$\left[\frac{d^2}{dx^2}\left(\frac{e^{rx}}{\sin x}\right)=\left(r^2-2r\cot x+\cot^2x+\csc^2x\right)\frac{e^{rx}}{\sin x}\right]\times a_2(x)$$

Now equate the sum of the above three results to the product of the trial solution (Equation 6.6.2) and the characteristic equation (Equation 6.6.6):

$$\frac{e^{rx}}{\sin x}\left[a_2\left(r^2-2r\cot x+\cot^2x+\csc^2x\right)+a_1\left(r-\cot x\right)+a_0\right]=\frac{e^{rx}}{\sin x}(r-r_1)[r-r_2(x)]=0$$

$$a_2r^2+\left(a_1-2a_2\cot x\right)r+\left(a_0-a_1\cot x +\cot^2x+\csc^2x\right)=r^2-2r-\frac{r}{x+1}+\frac{2}{x+1}$$

Comparing the polynomial coefficients of $$\displaystyle r$$ yields the following:

$$a_2=1, \quad a_1=2\cot x-\frac{1}{x+1}-2, \quad a_0=\cot x\left(2\cot x-\frac{1}{x+1}-2\right)-\cot^2x-\csc^2x+\frac{2}{x+1}$$

If we define $$f:=\frac{e^{rx}}{\sin x}$$, the following L2-ODE-VC will be satisfied:

= R*6.8 Find Solutions to L2-ODE-VC with Trial Solution and Variation of Parameters with Excitation=

Given
Two Non-Homogeneous L2-ODE-VC


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

$$
 * $$\displaystyle (x-1)y''-xy'+y=f(x)$$
 * $$\displaystyle (Equation\;6.8.1)
 * $$\displaystyle (Equation\;6.8.1)
 * }
 * }


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

$$
 * $$\displaystyle xy''+2y'+xy=f(x)$$
 * $$\displaystyle (Equation\;6.8.2)
 * $$\displaystyle (Equation\;6.8.2)
 * }
 * }

== Find ==

Find the 1st homogeneous solution by trial solution.

Find the complete solution by variation of parameters with the following excitation:


 * $$\displaystyle f(x)=x$$


 * $$\displaystyle f(x)=\sin x$$


 * $$\displaystyle f(x)=\exp(\alpha x)$$

Part 1
Find the 1st homogeneous solution by trial solution. Since we are looking for homogenous solution, $$\displaystyle f(x)=0$$. For Equation 6.8.1 we will assume the form $$\displaystyle y(x)=e^{rx}$$, where $$\displaystyle r$$ is an undetermined coefficient. Thus Equation 6.8.1 becomes:

$$\displaystyle (x-1)r^2e^{rx}-xre^{rx}+e^{rx}=0$$

$$\displaystyle (x-1)r^2-xr+1=0$$

$$\displaystyle [(x-1)r-1](r-1)=0$$

Thus the two roots are:

$$\displaystyle r_1=1$$

$$\displaystyle r_2=\frac{1}{x-1}$$

The second root is not valid, since it undermines the assumption of form in the trial solution due to it being a function of x. See R*6.3 for additional detail. Therefore the 1st homogeneous solution for Equation 6.8.1 is:

For Equation 6.8.2 we will assume the form $$\displaystyle y(x)=\frac{\sin rx}{x}$$, where $$\displaystyle r$$ is an undetermined coefficient. Thus Equation 6.8.2 becomes:

$$x\left(-\frac{(r^2x^2-2)\sin rx +2rx\cos rx}{x^3}\right)+2\frac{rx\cos rx -\sin rx}{x^2}+x\left(\frac{\sin rx}{x}\right)=0$$

$$-\frac{(r^2x^2-2)\sin rx +2rx\cos rx}{x^2}+2\frac{rx\cos rx -\sin rx}{x^2}+\sin rx=0$$

$$\frac{-r^2x^2\sin rx}{x^2}+\sin rx=0$$

$$\displaystyle -r^2\sin rx+\sin rx=0$$

$$\displaystyle 1-r^2=0$$

Thus the two roots are:

$$\displaystyle r_1=1$$

$$\displaystyle r_2=-1$$

Therefore, taking note that sine is an odd function, the 1st homogeneous solution for Equation 6.8.2 is either:

Section 1
Find the complete solution by variation of parameters to

$$\displaystyle (x-1)y''-xy'+y=x$$

$$\displaystyle y''-\frac{x}{x-1}y'+\frac{1}{x-1}y=\frac{x}{x-1}$$

Thus following the syntax of Meeting 34,

$$a_1(x)=-\frac{x}{x-1}$$

$$f(x)=\frac{x}{x-1}$$

We also deduced from Part 1 that

$$\displaystyle u_1(x)=e^x$$

Now via (4) on (34-5) of Meeting 34:


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

$$
 * $$u_2(x):=u_1(x)\int\frac{1}{u_1^2(x)}\exp\left[-\int a_1(x)dx\right]dx$$
 * <p style="text-align:right;">$$\displaystyle (Equation\;6.8.3)
 * <p style="text-align:right;">$$\displaystyle (Equation\;6.8.3)
 * }
 * }

$$u_2(x):=e^x\int\frac{1}{e^{2x}}\exp\left[-\int -\frac{x}{x-1}\right]dx$$

$$\displaystyle u_2(x)=-x$$

Now via (1) on (34-6) of Meeting 34:


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

$$
 * $$y_P(x)=u_1(x)\int\frac{1}{h(x)}\left[\int h(x)\frac{f(x)}{u_1(x)}dx\right]dx$$
 * <p style="text-align:right;">$$\displaystyle (Equation\;6.8.4)
 * <p style="text-align:right;">$$\displaystyle (Equation\;6.8.4)
 * }
 * }

Where

$$h(x)=u_1^2(x)\exp\left[\int a_1(x)dx\right]$$

$$\displaystyle h(x)=\frac{e^x}{x-1}$$

So

$$y_P(x)=e^x\int\frac{1}{\frac{e^x}{x-1}}\left[\int \frac{e^x}{x-1}\frac{\frac{x}{x-1}}{e^x}dx\right]dx$$

To find the complete solution we use (3) on (34-5) from Meeting 34, where constants are determined by initial conditions:


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

$$
 * $$\displaystyle y(x)=k_1u_1(x)+k_2u_2(x)+y_P(x)$$
 * <p style="text-align:right;">$$\displaystyle (Equation\;6.8.5)
 * <p style="text-align:right;">$$\displaystyle (Equation\;6.8.5)
 * }
 * }

Section 2
Find the complete solution by variation of parameters to

$$\displaystyle (x-1)y''-xy'+y=\sin x$$

$$\displaystyle y''-\frac{x}{x-1}y'+\frac{1}{x-1}y=\frac{\sin x}{x-1}$$

Thus following the syntax of Meeting 34,

$$a_1(x)=-\frac{x}{x-1}$$

$$f(x)=\frac{\sin x}{x-1}$$

$$\displaystyle u_1(x)=e^x$$

The solution is the same as that of Section 1, except now

$$y_P(x)=e^x\int\frac{1}{\frac{e^x}{x-1}}\left[\int \frac{e^x}{x-1}\frac{\frac{\sin x}{x-1}}{e^x}dx\right]dx$$

Section 3
Find the complete solution by variation of parameters to

$$\displaystyle (x-1)y''-xy'+y=\exp(\alpha x)$$

$$\displaystyle y''-\frac{x}{x-1}y'+\frac{1}{x-1}y=\frac{\exp(\alpha x)}{x-1}$$

Thus following the syntax of Meeting 34,

$$a_1(x)=-\frac{x}{x-1}$$

$$f(x)=\frac{\exp(\alpha x)}{x-1}$$

$$\displaystyle u_1(x)=e^x$$

The solution is the same as that of Section 1, except now

$$y_P(x)=e^x\int\frac{1}{\frac{e^x}{x-1}}\left[\int \frac{e^x}{x-1}\frac{\frac{\exp(\alpha x)}{x-1}}{e^x}dx\right]dx$$

Section 4
Find the complete solution by variation of parameters to

$$\displaystyle xy''-2y'+xy=x$$

$$\displaystyle y''-\frac{2}{x}y'+y=1$$

Thus following the syntax of Meeting 34,

$$a_1(x)=-\frac{2}{x}$$

$$\displaystyle f(x)=1$$

We also deduced from Part 1 that

$$\displaystyle u_1(x)=\frac{\sin x}{x}$$

Now via Equation 6.8.3

$$u_2(x):=\frac{\sin x}{x}\int\frac{1}{\frac{\sin^2 x}{x^2}}\exp\left[-\int -\frac{2}{x}\right]dx$$

Now use Equation 6.8.4, where

$$h(x)=u_1^2(x)\exp\left[\int a_1(x)dx\right]$$

$$\displaystyle h(x)=\frac{\sin^2x}{x^4}$$

So

$$y_P(x)=\frac{\sin x}{x}\int\frac{1}{\frac{\sin^2x}{x^4}}\left[\int \frac{\sin^2x}{x^4}\frac{1}{\frac{\sin x}{x}}dx\right]dx$$

To find the complete solution use Equation 6.8.5

Section 5
Find the complete solution by variation of parameters to

$$\displaystyle xy''-2y'+xy=\sin x$$

$$\displaystyle y''-\frac{2}{x}y'+y=\frac{\sin x}{x}$$

Thus following the syntax of Meeting 34,

$$a_1(x)=-\frac{2}{x}$$

$$\displaystyle f(x)=\frac{\sin x}{x}$$

$$\displaystyle u_1(x)=\frac{\sin x}{x}$$

The solution is the same as that of Section 4, except now

$$y_P(x)=\frac{\sin x}{x}\int\frac{1}{\frac{\sin^2x}{x^4}}\left[\int \frac{\sin^2x}{x^4}\frac{\frac{\sin x}{x}}{\frac{\sin x}{x}}dx\right]dx$$

Section 6
Find the complete solution by variation of parameters to

$$\displaystyle xy''-2y'+xy=\exp(\alpha x)$$

$$\displaystyle y''-\frac{2}{x}y'+y=\frac{\exp(\alpha x)}{x}$$

Thus following the syntax of Meeting 34,

$$a_1(x)=-\frac{2}{x}$$

$$\displaystyle f(x)=\frac{\exp(\alpha x)}{x}$$

$$\displaystyle u_1(x)=\frac{\sin x}{x}$$

The solution is the same as that of Section 4, except now

$$y_P(x)=\frac{\sin x}{x}\int\frac{1}{\frac{\sin^2x}{x^4}}\left[\int \frac{\sin^2x}{x^4}\frac{\frac{\exp(\alpha x)}{x}}{\frac{\sin x}{x}}dx\right]dx$$

= References =