User:Egm6321.f12.team4.harris/Homework5 R*5.13

Problem R*5.13 – Exactness of Classical Special Functions
sec27-2

Statement
For the Legendre and Hermite equations,

1. Verify the exactness. For the second exactness condition, use two methods. Method 1 can be found at (1) and (2) sec16-5. Method 2 can be found at (1) sec22-3.

2. If the Hermite equation is not exact, check if it obeys the power form and see if it can be made exact via the Integrating Factor Method.

3. Verify the following are homogeneous solutions of the Hermite Differential Equation: a. $$ H_0 = 1 $$ b. $$ H_1 = 2x $$ c. $$ H_2 = 4x^2-2 $$

Given
The Legendre Differential Equation is written as
 * {| style="width:100%" border="0"

$$ (1-x^2)y'' - 2xy' + n(n+1)y=0 $$     (5.13.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

The Hermite Differential Equation is written as
 * {| style="width:100%" border="0"

$$ y''-2xy'+2ny = 0 $$     (5.13.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

The first exactness condition states that $$ \phi (y',y,x) = k $$ exists such that
 * {| style="width:100%" border="0"

$$ G(y,y',y,x) = \frac{d \phi (y',y,x)}{dx} = g(x,y,p)+f(x,y,p) y = 0 $$     (5.13.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

where one defines $$ p=y' $$. The ODE must be able to be written in the form shown in equation 5.13.1.

The second exactness condition can be stated in two methods. Method 1, as shown above in the problem statement, is written as
 * {| style="width:100%" border="0"

$$ f_{xx}+2Pf_{xy}+P^2f_{yy}=g_{xp}+Pg_{yp}-g_y $$     (5.13.4a) and
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$ f_{xp}+Pf_{yp}+2f_y=g_{pp} $$     (5.13.4b)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

such that $$ f_{xx}=\frac{\partial }{\partial x}\frac{\partial f}{\partial x} $$, etc.

Method 2, as shown above in the problem statement, is written as
 * {| style="width:100%" border="0"

$$ g_0 - \frac{dg_1}{dx} + \frac{d^2 g_2}{dx^2}=0 $$     (5.13.5) such that $$ g_i = \frac{\partial G}{\partial y^{(i)}} $$.
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

The power form for a L2-ODE is
 * {| style="width:100%" border="0"

$$ \alpha x^ry'' + \beta x^sy' + \gamma x^ty $$     (5.13.6) and should the equation not be exact, the Integrating Factor is
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

(5.13.7)
 * style="width:95%" |
 * style="width:95%" |
 * }

Part A: The Legendre Differential Equation
The Legendre Differential Equation is given by equation 5.13.?. One can define $$ g(x,y,p) $$ and $$ f(x,y,p) $$ as follows:
 * {| style="width:100%" border="0"

$$ g(x,y,p):= -2xy' + n(n+1)y = -2xp + n(n+1)y $$     (5.13.8)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ f(x,y,p):= 1-x^2 $$     (5.13.9) Thus $$ g(x,y,p) + f(x,y,p)y'' = 0 $$. Since this is of the form expressed in equation 5.13.3, the first exactness condition is satisfied.
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

From equations 5.13.4a and 5.13.4b, one needs to take the various derivatives of $$ f $$ and $$ g $$ to show the second exactness condition for method 1. They are calculated as follows:
 * {| style="width:100%" border="0"

$$ f_{xx}=\frac{\partial }{\partial x} \frac{\partial f}{\partial x}=\frac{\partial }{\partial x}[-2x]=-2 $$     (5.13.10)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ f_{xy}=\frac{\partial }{\partial y} \frac{\partial f}{\partial x}=\frac{\partial }{\partial y}[-2x]=0 $$     (5.13.11)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ f_{yy}=\frac{\partial }{\partial y} \frac{\partial f}{\partial y}=\frac{\partial }{\partial y}[0]=0 $$     (5.13.12)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ g_{xp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial x}=\frac{\partial }{\partial P}[-2p]=-2 $$     (5.13.13)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ g_{yp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial y}=\frac{\partial }{\partial P}[n(n+1)]=0 $$     (5.13.14)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ g_{y}=\frac{\partial g}{\partial y}=n(n+1) $$     (5.13.15)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ f_{xp}=\frac{\partial }{\partial P} \frac{\partial f}{\partial x}=\frac{\partial }{\partial P}[-2x]=0 $$     (5.13.16)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ f_{yp}=\frac{\partial }{\partial P} \frac{\partial f}{\partial y}=\frac{\partial }{\partial P}[0]=0 $$     (5.13.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_y=\frac{\partial f}{\partial y} =0 $$     (5.13.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{pp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial P}=\frac{\partial }{\partial P}[-2x]=0 $$     (5.13.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Plugging equations 5.13.10-5.13.19 into equations 5.13.? and 5.13.?, one can see that
 * {| style="width:100%" border="0"

$$ -2+2p(0)+p^2(0)=-2+p(0)-n(n+1) $$     (5.13.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and


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

$$ 0+p(0)+2(0)=0 $$     (5.13.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From equation 5.13.20, it can be seen that the Legendre Differential Equation is only exact if $$ n=0,-1 $$. Thus for $$ n\ne 0,-1 $$, the equation is not exact and the IFM would need to be used to solve the equation.

For the second method, one can see that
 * {| style="width:100%" border="0"

$$ g_0 = \frac{\partial G}{\partial y^{(0)}}=n(n+1) $$     (5.13.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_1 = \frac{\partial G}{\partial y^{(1)}}=-2x $$     (5.13.22)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_2 = \frac{\partial G}{\partial y^{(2)}}=1-x^2 $$     (5.13.23)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{dg_1}{dx} = -2 $$     (5.13.24)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{d^2 g_2}{dx^2} = -2 $$     (5.13.25)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Plugging equations 5.13.21-5.13.25 into equation 5.13.5, one can see that
 * {| style="width:100%" border="0"

$$ n(n+1)-(-2)+(-2)=0 $$     (5.13.26)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Thus the Legendre Differential Equation is only exact if $$ n=0,-1 $$. Thus for $$ n\ne 0,-1 $$, the equation is not exact and the IFM would need to be used to solve the equation. This is consistent with the result of Method 1.

Part B: The Hermite Differential Equation.
The Hermite Differential Equation is given by equation 5.13.2. One can define $$ g(x,y,p) $$ and $$ f(x,y,p) $$ as follows:
 * {| style="width:100%" border="0"

$$ g(x,y,p):= -2xy'+2ny=-2xp+2ny $$     (5.13.27)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f(x,y,p):= 1 $$     (5.13.28) Thus $$ g(x,y,p) + f(x,y,p)y'' = 0 $$. Since this is of the form expressed in equation 5.13.3, the first exactness condition is satisfied.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From equations 5.13.?a and 5.13.?b, one needs to take the various derivatives of $$ f $$ and $$ g $$ to show the second exactness condition for method 1. They are calculated as follows:
 * {| style="width:100%" border="0"

$$ f_{xx}=\frac{\partial }{\partial x} \frac{\partial f}{\partial x}=\frac{\partial }{\partial x}[0]=0 $$     (5.13.29)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{xy}=\frac{\partial }{\partial y} \frac{\partial f}{\partial x}=\frac{\partial }{\partial y}[0]=0 $$     (5.13.30)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{yy}=\frac{\partial }{\partial y} \frac{\partial f}{\partial y}=\frac{\partial }{\partial y}[0]=0 $$     (5.13.31)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{xp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial x}=\frac{\partial }{\partial P}[-2p]=-2 $$     (5.13.32)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{yp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial y}=\frac{\partial }{\partial P}[2n]=0 $$     (5.13.33)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{y}=\frac{\partial g}{\partial y}=2n $$     (5.13.34)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{xp}=\frac{\partial }{\partial P} \frac{\partial f}{\partial x}=\frac{\partial }{\partial P}[0]=0 $$     (5.13.35)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{yp}=\frac{\partial }{\partial P} \frac{\partial f}{\partial y}=\frac{\partial }{\partial P}[0]=0 $$     (5.13.36)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_y=\frac{\partial f}{\partial y} =0 $$     (5.13.37)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{pp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial P}=\frac{\partial }{\partial P}[-2x]=0 $$     (5.13.38)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Plugging equations 5.13.29-5.13.38 into equations 5.13.4a and 5.13.4b, one can see that
 * {| style="width:100%" border="0"

$$ 0+2p(0)+p^2(0)=-2+p(0)-2n $$     (5.13.39)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and


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

$$ 0+p(0)+2(0)=0 $$     (5.13.40)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From equation 5.13.39, it can be seen that the Hermite Differential Equation is only exact if $$ n=-1 $$. Thus for $$ n\ne -1 $$, the equation is not exact and the IFM would need to be used to solve the equation.

For the second method, one can see that
 * {| style="width:100%" border="0"

$$ g_0 = \frac{\partial G}{\partial y^{(0)}}=2n $$     (5.13.41)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_1 = \frac{\partial G}{\partial y^{(1)}}=-2x $$     (5.13.42)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_2 = \frac{\partial G}{\partial y^{(2)}}=1 $$     (5.13.43)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{dg_1}{dx} = -2 $$     (5.13.44)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \frac{d^2 g_2}{dx^2} = 0 $$     (5.13.45)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Plugging equations 5.13.41-5.13.45 into equation 5.13.5, one can see that
 * {| style="width:100%" border="0"

$$ 2n-(-2)+0=0 $$     (5.13.46)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Thus the Hermite Differential Equation is only exact if $$ n=-1 $$. Thus for $$ n\ne -1 $$, the equation is not exact and the IFM would need to be used to solve the equation. This is consistent with the result of Method 1.

Part 2. If the Hermite equation is not exact, check if it obeys the power form and see if it can be made exact via the Integrating Factor Method.
The Hermite Equation is not exact if $$ n\ne -1 $$. For this case, one needs to see if the equation is of the power form. The power form was given in equation 5.13.?. Therefore if $$ \alpha = 1 $$, $$ r = o $$, $$ \beta =-2 $$, $$ s=1 $$, $$ \gamma =2n $$, and $$ t = o $$, the Hermite Differential Equation is of the power form $$ \forall n \in \mathbb {R} $$. As such, the IFM can be used such that the integrating factor is given in equation 5.13.?. The calculations are as follows:


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

$$ x^my^n[y-2xy'+2ky]=x^my^ny-2x^{m+1}y^ny'+2kx^my^{n+1}=0 $$     (5.13.47)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The $$ n $$ in the Hermite Differential Equation was redefined as $$ k $$ to avoid confusion with the Integrating Factor. From 5.13.47, one can define $$ g(x,y,p) $$ and $$ f(x,y,p) $$ as follows:
 * {| style="width:100%" border="0"

$$ g(x,y,p):= -2x^{m+1}y^ny' + 2kx^my^{n+1} $$     (5.13.48)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f(x,y,p):= x^my^n $$     (5.13.49)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From equations 5.13.4a and 5.13.4b, one needs to take the various derivatives of $$ f $$ and $$ g $$ to solve for $$ m,n $$. They are calculated as follows:
 * {| style="width:100%" border="0"

$$ f_{xx}=\frac{\partial }{\partial x} \frac{\partial f}{\partial x}=\frac{\partial }{\partial x}[mx^{m-1}y^n]=m(m-1)x^{m-2}y^n $$     (5.13.50)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{xy}=\frac{\partial }{\partial y} \frac{\partial f}{\partial x}=\frac{\partial }{\partial y}[mx^{m-1}y^n]=mnx^{m-1}y^{n-1} $$     (5.13.51)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{yy}=\frac{\partial }{\partial y} \frac{\partial f}{\partial y}=\frac{\partial }{\partial y}[nx^my^{n-1}]=n(n-1)x^my^{n-1} $$     (5.13.52)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{xp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial x}=\frac{\partial }{\partial P}[-2(m+1)x^my^np+2kmx^{m-1}y^{n+1}]=-2(m+1)x^my^n $$     (5.13.53)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{yp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial y}=\frac{\partial }{\partial P}[-2(m+1)x^my^np+2kmx^{m-1}y^{n+1}]=-2nx^{m+1}y^{n-1} $$     (5.13.54)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{y}=\frac{\partial g}{\partial y}=-2nx^{m+1}y^{n-1}p+2k(n+1)x^my^n $$     (5.13.55)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{xp}=\frac{\partial }{\partial P} \frac{\partial f}{\partial x}=\frac{\partial }{\partial P}[mx^{m-1}y^n]=0 $$     (5.13.56)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_{yp}=\frac{\partial }{\partial P} \frac{\partial f}{\partial y}=\frac{\partial }{\partial P}[nx^my^{n-1}]=0 $$     (5.13.57)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ f_y=\frac{\partial f}{\partial y} = nx^my^{n-1} $$     (5.13.58)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ g_{pp}=\frac{\partial }{\partial P} \frac{\partial g}{\partial P}=\frac{\partial }{\partial P}[-2x^{m+1}y^n]=0 $$     (5.13.59)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Plugging equations 5.13.50-5.13.59 into equations 5.13.4a and 5.13.4b, one can see that
 * {| style="width:100%" border="0"

$$ m(m-1)x^{m-2}y^n+2pmnx^{m-1}y^{n-1}+p^2n(n-1)x^my^{n-2}=-2(m+1)x^my^n+p(-2)nx^{m+1}y^{n-1}+2nx^{m+1}y^{n-1}p-2k(n+1)x^my^n $$     (5.13.60)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

and


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

$$ 0+p(0)+2(nx^my^{n-1}=0 $$     (5.13.61)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

From equation 5.13.61, one can see that $$ 2nx^my^{n-1}=0 \therefore n=0 $$. Substituting this result back into equation 5.13.60, one can see that
 * {| style="width:100%" border="0"

$$ m(m-1)x^{m-2}=-2(m+1)x^m-2kx^m $$     (5.13.62) This equation will only be valid if both sides are equal to zero. Thus it can be shown that $$ m=0 $$ when $$ k=-1 $$ and $$ m=1 $$ when $$ k=-2 $$. Since $$ n=0 $$, $$ m\ne 0 $$, because then the integrating factor would be 1. Therefore, $$ m=1 $$, and the integrating factor is $$ h(x,y)=x^1y^0=x $$.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part A: $$ H_0(x)=1 $$
When $$ H_0(x)=1 $$, $$ y(x)=1 $$, $$ y'(x)=0 $$, and $$ y''(x)=0 $$. Therefore the Hermite Differential Equation becomes
 * {| style="width:100%" border="0"

$$ 0=0-2x(0)+2k(1) $$     (5.13.63) This is a valid homogeneous solution if k=0.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part B: $$ H_1(x)=2x $$
When $$ H_0(x)=2x $$, $$ y(x)=2x $$, $$ y'(x)=2 $$, and $$ y''(x)=0 $$. Therefore the Hermite Differential Equation becomes
 * {| style="width:100%" border="0"

$$ 0=0-2x(2)+2k(2x) $$     (5.13.64) This is a valid homogeneous solution if k=1.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Part C: $$ H_2(x)=4x^2-2 $$
When $$ H_0(x)=4x^2-2 $$, $$ y(x)=4x^2-2 $$, $$ y'(x)=8x $$, and $$ y''(x)=8 $$. Therefore the Hermite Differential Equation becomes
 * {| style="width:100%" border="0"

$$ 0=8-2x(8x)+2k(4x^2-2) $$     (5.13.65) This is a valid homogeneous solution if k=2.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Author and References

 * Solved by -- Kaitlin Harris and Seong Hyeon Hong
 * Typed by -- Kaitlin Harris