User:Egm6321.f11.team2.kim/PR5

=R*5.2 - Verify the second exactness for Legendre and Hermite equations =

Given
Legendre equation: $$\displaystyle G = (1 - x^2)y'' - 2xy' + n(n+1)y = 0 $$ (5.2.1)  Hermite equation: $$\displaystyle y'' - 2xy' + 2ny = 0 $$ (5.2.2)

Find
1. Verify the exactness of the designated L2-ODE-VC. 2. If eq (5.2.2) is not exact, check whether it is in power form, and see whether if it can be made exact using IFM $$\displaystyle \begin{align} H_0(x) &=1 \\ H_1(x) &= 2x \\ H_2(x) &= 4x^2-2 \end{align} $$ (5.2.2.2) 3. Verify the above equations are homogeneous solutions of the eq (5.2.2).

First Part
For Legendre equation by using first method: The first exactness condition is that

$$\displaystyle G= g(x,y,p) + f(x,y,p)y'' = 0 $$ $$\displaystyle G = \underbrace {(1 - x^2)}_{f(x,y,p)}y'' - \underbrace {2xp + n(n+1)y}_{g(x,y,p)} = 0 $$ this equation satisties the first exactness condition. In order to satisfy 2nd exactness condition, $$\displaystyle f_{xx} + 2pf_{xy}+p^2f_{yy} = g_{xp} + pg_{yp} - g_{y} $$ (5.2.3) $$\displaystyle f_{xp} + pf_{yp} + 2f_y = g_{pp} $$ (5.2.4) $$\displaystyle f(x,y,p) = (1-x^2) $$  $$\displaystyle g(x,y,p) = -2xp + n(n+1)y $$ $$\displaystyle \begin{align} f_{xx} &=-2 \\ f_{xy} &= 0 \\ f_{yy} &= 0 \\ g_{xp} &= -2 \\ g_{yp} &= 0 \\ g_y   &= n(n+1) \\ f_{xp} &= 0 \\ f_{yp} &= 0 \\ f_y &= 0 \\ g_{pp} &= 0 \\ \end{align} $$ From the above values, eq (5.2.3) and eq (5.2.4) are following that $$\displaystyle -2 = -2 + 0 - n(n+1), \,\,\,\,0=0 $$

It shows that eq (5.2.1) satisfies the 2nd exactness condition when n=0 or n= -1 For legendre equation by using second method:  $$\displaystyle g_0 - \frac {dg_1}{dx} + \frac {d^2g_2}{dx^2}=0$$  (5.2.5) $$\displaystyle \begin{align} g_0 &= \frac {\partial G}{\partial y^{(0)}} = n(n+1) \\ g_1 &= \frac {\partial G}{\partial y^{(1)}} = -2x \\ g_2 &= \frac {\partial G}{\partial y^{(2)}} = (1-x^2) \\ \frac {dg_1}{dx} &= -2 \\ \frac {d^2g_2}{dx^2} &= -2 \\ \end{align} $$ From above values, eq 5.2.5 is following that n(n+1) + 2 - 2 = 0 It also shows that this equation satisfies the second exactness when n=0. For Hermite equation by using first method: Hermite equation satisfies the first exactness condition due to following form. $$\displaystyle \underbrace {1}_{f(x,y,p)}\cdot y'' \underbrace {-2xp + 2ny}_{g(x,y,p)} = 0 $$ In order to satisfy 2nd exactness condition, the equation satisfies eq (5.2.3) and eq (5.2.4). $$\displaystyle f(x,y,p) = 1 \,\,\,\, g(x,y,p) = -2xp + 2np $$ $$\displaystyle \begin{align} f_{xx} &= 0 \\ f_{xy} &= 0 \\ f_{yy} &= 0 \\ g_{xp} &= -2 \\ g_{yp} &= 0 \\ g_y   &= 2n \\ f_{xp} &= 0 \\ f_{yp} &= 0 \\ f_y &= 0 \\ g_{pp} &= 0 \\ \end{align} $$ Eq (5.2.3) and Eq(5.2.4) is following that $$\displaystyle 0 + 0 + 0 = -2 + 0 + -2n \,\,\,\,2n = -2 \, \,\,\,\, n= -1 $$ $$\displaystyle 0=0 $$ It shows that eq (5.2.2) satisfies the 2nd exactness condition when n=-1. For Hermite equation by using second method: $$\displaystyle f_0 - \frac {df_1}{dx} + \frac {d^2f_2}{dx^2}=0$$ (5.2.6) $$\displaystyle \begin{align} f_0 &= \frac {\partial F}{\partial y^{(0)}} = 2n \\ f_1 &= \frac {\partial F}{\partial y^{(1)}} = -2x \\ f_2 &= \frac {\partial F}{\partial y^{(2)}} = 1 \\ \frac {df_1}{dx} &= -2 \\ \frac {d^2f_2}{dx^2} &= 0 \\ \end{align} $$ From the above values, eq 5.2.6 is following that 2n + 2 = 0 n= -1 It shows that this equation satisfies 2nd exactness condition when n= -1

Second Part
$$\displaystyle h(x,y) = x^m y^n$$ n in the eq 5.2.2 is replaced with b to avoid some mistakes. $$\displaystyle x^m y^n[y'' - 2xy' + 2ny]= 0 $$ $$\displaystyle \underbrace {x^m y^n}_{f(x,y,p)}y'' \underbrace {-2x^{m+1}y^ny'+2bx^my^{n+1}}_{g(x,y,p)}=0 $$ This equation satisfies the first exactness condition due to form of above equation. $$\displaystyle f(x,y,p) = x^my^n$$ $$\displaystyle g(x,y,p) = -2x^{m+1}y^np + 2bx^my^{n_1}$$ $$\displaystyle \begin{align} f_x &= mx^{m-1}y^n \\ f_{xx} &=m(m-1)x^{m-2}y^n \\ f_{xy} &= nmx^{m-1}y^{n-1} \\ f_{yy} &= n(n-1)x^my^{n-2} \\ g_x &= -2(m+1)x^my^np + 2bmx^{m-1}y^{n+1} \\ g_{xp} &= -2(m+1)x^my^n \\ g_{yp} &= -2nx^{m+1}y^{n-1} \\ g_y   &= -2nx^{m+1}y^{n-1}p+2b(n+1)x^my^n \\ f_{xp} &= 0 \\ f_{yp} &= 0 \\ f_y &= nx^my^{n-1} \\ g_{pp} &= 0 \\ \end{align} $$ From the above values, Eq 5.2.4 is following that $$\displaystyle 2nx^my^{n-1}=0 $$ To satisfy the above equation, n=0. From the above values with n=0, Eq 2.5.3 is following that $$\displaystyle m(m-1)x^{m-2} = -2(m+1)x^m -2bx^m $$ $$\displaystyle \frac {m(m-1)}{x^2}x^m = -2(m+1)x^m - 2bx^m $$ $$\displaystyle m(m-1) = -2(m+1)x^2 - 2bx^2 $$ $$\displaystyle m^2-m = -2mx^2 - 2x^2 - 2bx^2 $$ $$\displaystyle m^2-m+2mx^2+2x^2+2bx^2 $$ $$\displaystyle m^2 + (2x^2-1)m + 2x^2(1+b) = 0 $$ $$\displaystyle m = \frac {-(2x^2-1)\pm \sqrt{(2x^2-1)^2-4\cdot 2x^2(1+b)}}{2} $$ When m satisfies the above relationship, Eq 5.2.2 would be exact. Generic form of power series : $$\displaystyle y(x) = \sum^{oo}_{n=0} a_n\cdot x^n $$ (5.2.7) $$ y'(x) = \sum^{oo}_{n=1} a_n\cdot nx^{n-1}$$  (5.2.8) $$ y''(x) = \sum^{oo}_{n=2} a_n\cdot n\cdot(n-1)x^{n-2}$$ (5.2.9) From eq (5.2.7)~(5.2.9), eq (5.2.2) is following that $$\displaystyle \sum^{oo}_{n=2} a_n\cdot n\cdot(n-1)x^{n-2} -2x\sum^{oo}_{n=1} a_n\cdot nx^{n-1}+2b\sum^{oo}_{n=0} a_n\cdot x^n =0 $$ $$\displaystyle \sum^{oo}_{n=2} a_n\cdot n\cdot(n-1)x^{n-2} -\sum^{oo}_{n=1} 2n\cdot a_n\cdot nx^{n}+\sum^{oo}_{n=0} 2b\cdot a_n\cdot x^n =0 $$ $$ \displaystyle \sum^{oo}_{n=0} (n+2)(n+1)a_{n+2}\cdot x^{n} -\sum^{oo}_{n=0} 2n\cdot a_n\cdot nx^{n}+\sum^{oo}_{n=0} 2b\cdot a_n\cdot x^n =0 $$ (5.2.10) From Eq (5.2.10), $$\displaystyle a_{n+2}= \frac {2(n-b)}{(n+2)(n+1)}a_n = 0$$ (5.2.11) For n=0,1,2,3,...... This is valid only positive integer of b (1,2,3,4,.......)

Third Part
From eq 5.2.2.2 Boundary condition of eq 5.2.2.2 is that where b=0, y(0)= 1, y'(0)=0 where b=1, y(0)= 0, y'(0)=2 where b=2, y(0)= -2, y'(0)= 0 where b=1, and the initial conditions are given as $$\displaystyle y(0)= a_0 = 0, y'(0) = a_1 = 2$$ It shows that all even coefficients will be equal to zero because each coefficient is a multiple of its second predecessor. $$\displaystyle a_0 = a_2 = a_4 = a_6 = a_8 = a_10 ..... = 0$$ From eq (5.2.11), $$\displaystyle a_3 = \frac {2(1-1)}{(1+2)(1+1)}a_1 = 0 $$ It shows that $$\displaystyle a_5 = a_7 = a_9 = .... = 0$$ Only a1 = 2. Thus, from the eq 5.2.7, $$\displaystyle y(x) = H_1(x) = a_0\cdot x^0 + a_1\cdot x^1 + a_2\cdot x^2 + ...... a_n\cdot x^n = x $$ Where b=2, and the initial conditions are given as $$\displaystyle y(0)= a_0 = -2, y'(0) = a_1 = 0$$ eq 5.2.11 is following that $$\displaystyle a_2 = \frac {2(0-2)}{(0+2)(0+1)}a_0 = 4$$ $$\displaystyle a_4 = \frac {2(2-2)}{(2+2)(2+1)}a_2 = 0 $$ It shows that $$\displaystyle a_4 = a_6 = a_8 = .... = 0$$ Only a0 = -2 and a2 = 4

Thus, from the eq 5.2.7 $$\displaystyle y(x) = H_2(x) = a_0 \cdot x^0 + a_1\cdot x^1 + a_2\cdot x^2 + ........ a_n\cdot x^n = 4x^2 -2 $$

Where b=0, and the initial conditions are given as $$\displaystyle y(0)= a_0 = 1, y'(0) = a_1 = 0$$ We can not use eq 5.2.11 because the eq 5.2.11 is only valid for positive integer number. So We can calculate other ways. $$\displaystyle y'' - 2xy' = 0$$ $$\displaystyle y(x)= c1 + \frac {1}{2}\sqrt{\pi}\cdot c2\cdot erfi(x) $$ (5.2.12) From the initial values, c1= 0, c2=0. eq 5.2.12 is that <Br/> $$\displaystyle y(x)=H_0(x) = 1$$ $$\displaystyle \begin{align} H_0(x) &=1 \\ H_1(x) &= 2x \\ H_2(x) &= 4x^2-2\\ \end{align} $$

These results show that the equations in (5.2.2.2) are homogeneos solutions of this Hermite differentail equation.

=R*5.8 - Particular Solution by using Variation Parameters Method =

Given
$$\displaystyle y(x) = A(x)y_H(x)$$<p style="text-align:center"> (5.8.1) $$\displaystyle y' + a_0(x)y = 0 $$ $$\displaystyle y_H(x) = exp[-\int^x a_0(s)ds] $$

Differential eq is that $$\displaystyle y' + P(x)y = Q(x) $$<p style="text-align:center"> (5.8.2) $$\displaystyle y_H(x) = exp[-\int P(x)dx] $$<p style="text-align:center"> (5.8.3)

Find
Find particular solution Yp <Br/>

Solution
$$\displaystyle y(x) = A(x)y_H(x) $$ $$\displaystyle y(x)' = A(x)'y_H(x) + A(x)y_H(x)' $$<p style="text-align:center"> (5.8.4) From the eq 5.8.3, $$\displaystyle y_H(x)'= -P(x)\cdot exp[-\int P(x)dx]=-P(x)y_H(x)$$ Thus, eq 5.8.4 is following that <Br/> $$\displaystyle y(x)' = A(x)'\cdot exp[-\int P(x)dx] - P(x)\cdot exp[-\int P(x)dx]A(x) = exp[-\int P(x)dx]\cdot[A(x)'-P(x)A(x)]$$ <Br/> Plugging the above equation into Eq 5.8.2, $$\displaystyle exp[-\int P(x)dx]\cdot[A(x)'-P(x)A(x)] + P(x)A(x)\cdot exp[-\int P(x)dx]= Q(x) $$ $$\displaystyle exp[-\int P(x)dx](A(x)'-P(x)A(x)+A(x)P(x))=Q(x)$$ $$\displaystyle exp[-\int P(x)dx]\cdot A(x)' = Q(x)$$ $$\displaystyle A(x)' = \frac {Q(x)}{exp[-\int P(x)dx]} = Q(x)\cdot exp[\int P(x)dx] $$ $$\displaystyle A(x) = \int Q(x) \cdot exp[\int P(x)dx]dx $$ Thus, paricular solution is that $$\displaystyle y(x) = \int Q(x) \cdot exp[\int P(x)dx]dx \cdot exp[-\int P(x)dx] $$