User:Egm6321.f12.team06.gu/report4

Problem Statement

 * Consider the following L2-ODE-VC
 * $$ G= (cosx)\,y''+(x^2-sinx)\,y'+2xy=0$$
 * 1. Show that it is exact
 * 2. Find $$ \phi $$
 * 3. Solve for $$ y(x) $$

Nomenclature

 * L2-ODE-VC: Linear 2nd Order ODE with varying coefficients
 * $$ \displaystyle p=y'=\frac{dy}{dx}$$
 * $$ \tau, s $$: Dummy variables
 * $$ \displaystyle \phi_x(x,y,p) =\frac{\partial\phi(x,y,p)}{\partial x}, \phi_y(x,y,p) =\frac{\partial \phi(x,y,p)}{\partial y} $$
 * $$ \displaystyle f_{xx}=\frac{\partial^2 f(x,y,p)}{\partial x^2}, f_{xy}=\frac{\partial^2 f(x,y,p)}{\partial x \partial y}, f_{xp}=\frac{\partial^2 f(x,y,p)}{\partial x \partial p} $$
 * $$ \displaystyle f_y=\frac{\partial f(x,y,p)}{\partial y}, f_{yy}=\frac{\partial^2 f(x,y,p)}{\partial y^2}, f_{yp}=\frac{\partial^2 f(x,y,p)}{\partial y \partial p} $$
 * $$ \displaystyle g_y=\frac{\partial g(x,y,p)}{\partial y}, g_{xp}=\frac{\partial^2 g(x,y,p)}{\partial x \partial p}, g_{yp}=\frac{\partial^2 g(x,y,p)}{\partial y \partial p}, g_{pp}=\frac{\partial^2 g(x,y,p)}{\partial p^2} $$

Part 1 Verify exactness

 * Re-write equation (4.1):


 * It follows that


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


 * style="width:92%; padding:10px; border:2px solid #8888aa" |


 * Thus equation(1) satisfies the 1st exactness condition


 * }


 * To verify the second exactness condition, one just need to show that if equation (4.1) satisfies the following equations:


 * Calculate partial derivatives from equation (4.3) and (4.4)
 * $$ f_{xx}=-cosx$$
 * $$ f_{xy}=f_{yy}=g_{yp}=0$$
 * $$ g_{xp}=2x-cosx$$
 * $$ g_{y}=2x$$
 * $$ f_{xp}=f_{yp}=f_{y}=g_{pp}=0$$


 * Bring them into equation (4.5) and (4.6), we have
 * $$ f_{xx}+2p\,f_{xy}+p^2\,f_{yy}=-cosx+0+0=-cosx $$
 * $$ g_{xp}+p\,g_{yp}-g_y=2x-cosx+0-2x=-cosx $$
 * Thus equation (4.5) is satisfied
 * $$ f_{xp}+p\,f_{yp}+2\,f_{y}=0+0+0=0 $$
 * $$ g_{pp}=0 $$
 * Thus equation (4.6) is satisfied


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


 * style="width:92%; padding:10px; border:2px solid #8888aa" |


 * Therefore, equation (4.1) also satisfies the second exactness condition since both equation (4.5) and (4.6) are satisfied, we can conclude that equation (4.1) is an exact L2-ODE-VC.


 * }

Part 2 Find First Integral

 * From equation (4.4), the first integral $$ \phi(x,y,p) $$ can be written as


 * By bringing equation (4.4) into (4.7), we get


 * Further, we can calculate that :$$ \phi_x=h_x-sinx\,p, \phi_y=h_y $$. By bringing them into equation (4.3), we get
 * $$ g(x,y,p)= 2xy+(x^2-sinx)\,p=h_x+(h_y-sinx)\,p$$


 * Integrate both sides of equation (4.9), we get


 * From both equation (4.11) and (4.10), the partial derivative of $$ h(x,y)$$ with respect to $$ y $$ can be expressed as


 * Equation (4.11) can now be written as


 * Bring equation (4.13) into (4.8), we get the first integal:
 * $$ \phi(x,y,p)=x^2\,y+k_1+cosx\,p=k_2 $$


 * (4.14)
 * }

Part 3 Solve for y(x)

 * The solution in part 2 is indeed a general non-homogeneous L1-ODE-VC


 * Where $$ M(x,y)= x^2\,y, N(x,y)=cosx $$
 * Since $$ M_y= x^2\neq N_x=-sinx $$, we need to find integration factor $$h$$ to make equation (4.15) exact


 * Divide both sides of equation (4.15) by $$ cosx $$, we have


 * Let's assume that $$h$$ is only a function of $$x$$, then


 * Finally, one can derive $$ y(x) $$ with the integrating factor


 * (4.18)
 * }