User:EGM6321.f11.team1.pan/HW4

= R*4.5 Solve a L2-ODE-VC = == Given ==
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle G=(cosx)y''+(x^2-sinx)y'+2xy=0$$
 * $$\displaystyle (Equation\;4.5.1)
 * $$\displaystyle (Equation\;4.5.1)
 * }
 * }

Find
1）Show Equation(4.5.1) is exact. 2）Find $$\displaystyle\, \phi$$ 3）Solve for $$\displaystyle y(x)$$.

Solution
1) The particular form of N2-ODE-VC is $$\displaystyle G(x,y,y',y)=g(x,y,p)+f(x,y,p)y$$ where $$\displaystyle g(x,y,p)=(x^2-sinx)y'+2xy$$ $$\displaystyle f(x,y,p)=cosx$$ This is shown that Equation(4,5,1) satisfies the 1st exactness condition. To verify its exactness, we calculate following terms: $$\displaystyle f_x=-sinx;f_{xx}=-cosx;$$ $$\displaystyle f_{xy}=f_{xp}=0;$$ $$\displaystyle f_y=0;f_{yy}=f_{yp}=0;$$ $$\displaystyle g_x=2xy'-cosx\cdot p+2y;$$ $$\displaystyle g_{xp}=2x-cosx;$$ $$\displaystyle g_y=2x;g_{yp}=0;$$ $$\displaystyle g_p=x^2-sinx;g_{pp}=0.$$ Recall the 2nd exactness condition for L2-ODE-VC:
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle f_{xx}=2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y$$
 * $$\displaystyle (Equation\;4.5.2)
 * $$\displaystyle (Equation\;4.5.2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$ Substituting those calculated terms into Equation(4,5,2) and Equation(4.5.3). As for Equation(4,5,2) , $$\displaystyle LHS=-cosx+0+0=-cosx$$ $$\displaystyle RHS=2x-cosx+0-2x=-cosx$$ which means $$\displaystyle LHS=RHS$$ As for Equation(4,5,3) , $$\displaystyle LHS=0+0+0=0$$ $$\displaystyle RHS=0$$ which means $$\displaystyle LHS=RHS$$ Therefore, Equation(4,5,1) is exact.
 * $$\displaystyle f_{xp}+pf_{yp}+2f_y=g_{pp}$$
 * $$\displaystyle (Equation\;4.5.3)
 * $$\displaystyle (Equation\;4.5.3)
 * }
 * }

2) We find the first integral $$\displaystyle \phi$$ by integrating $$\displaystyle f=\phi_p=cosx$$. $$\displaystyle \phi=h(x,y)+\int fdp$$ $$\displaystyle \phi=h(x,y)+cosx\cdot p$$ Also, $$\displaystyle g=(x^2-sinx)p+2xy=\phi_x+\phi_y p$$ where, $$\displaystyle \phi_x=h_x-sinx\cdot p$$ $$\displaystyle \phi_y=h_y$$. Substituting those partial derivatives of $$\phi$$ into function g. $$\displaystyle (x^2-sinx)p+2xy=(h_y-sinx)p+h_x$$. To solving h(x,y), we assume that $$\displaystyle h_x=2xy $$ Therefore, $$\displaystyle h(x,y)=x^2 y+k_1(y)$$ Partial derivate respect to y, $$\displaystyle h_y=x^2+k_1'(y)-sinx=x^2-sinx$$ We can find that $$\displaystyle k_1'(y)=0$$ which means $$\displaystyle k_1(y)=k_1=constant$$. Therefore, the first integral is $$\displaystyle \phi=x^2y+cosx\cdot p+k_!$$

3) Recall that $$\displaystyle \phi=k_2$$, we obtain a L1-ODE-VC that $$\displaystyle x^2y+cosx\cdot p=k_2 -k_1:=k_3$$. Rewrite it into $$\displaystyle y'+\underbrace{\frac{x^2}{cosx}}_{\displaystyle a_0(x)}y=\underbrace{\frac{k_3}{cosx}}_{\displaystyle b(x)}$$

Therefore, the integration factor is $$\displaystyle h(x)=exp[\int^x a_0'(s)ds]$$ $$\displaystyle =exp[\int^x \frac{s^2}{cos s}ds]$$. The solution is