User:Egm6321.f09.Team1.andy/HW2

= Problem 1: Integrating Factor Method =

Given
General form of a First Order Nonlinear Ordinary Differential Equations(N1-ODE) is given by,


 * {| style="width:70%" border="0" align="center"



F(x, y(x),\dot y(x)) = 0. $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (1)


 * }
 * }

where, $$\displaystyle \dot y(x) = \frac{dy}{dx} $$

Find
Derive the Euler's Integrating factor $$\displaystyle h(x, y)$$, when it is just a function of y, i.e., $$\displaystyle h_x = 0. $$

Solution
As per the exactness condition (1) for a N1-ODE, Equation (1) must be in the form,


 * {| style=";width:70%" border="0" align="center"



M(x, y(x)) + \left[N(x,y(x)) \right] \frac{d}{dx} y(x) = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (2)


 * }
 * }

and as per the exactness condition (2) the following equation must be satisfied,


 * {| style="width:70%" border="0" align="center"



\Rightarrow \frac{\partial M}{\partial y} = \frac{\partial N}{\partial x} $$
 * $$\displaystyle



\Rightarrow M_y = N_x $$
 * $$\displaystyle

$$
 * $$\displaystyle \longrightarrow (3)


 * }
 * }

 Euler's Integrating Factors 

If, for a given N1-ODE [Equation (1)], condition (1) of Exactness is satisfied but not the condition (2), then we use Euler's method to find an Integrating Factor $$\displaystyle h(x,y)$$ with a constraint that the condition (2) is satisfied after multiplying $$\displaystyle h(x,y)$$ to the 1st order nonlinear ODE.


 * {| style=";width:70%" border="0" align="center"



M(x, y(x)) + \left[N(x,y(x)) \right] \frac{d}{dx} y(x) = 0 $$
 * $$\displaystyle


 * }
 * }

Multiplying throughout by $$\displaystyle dx $$,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow M dx + N dy = 0 $$
 * $$\displaystyle


 * }
 * }

Multiplying Euler's Integrating Factor $$\displaystyle h(x,y) $$, we get,


 * {| style=";width:70%" border="0" align="center"




 * $$\displaystyle

\Rightarrow \underbrace{(hM)}_\bar{M} dx + \underbrace{(hN)}_\bar{N} dy = 0

$$


 * }
 * }

We need to find the Euler Integrating Factor $$\displaystyle h(x,y) $$ such that,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow \bar{M}_y = \bar{N}_x $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (4)


 * }
 * }

which is nothing but,


 * {| style=";width:70%" border="0" align="center"





\Rightarrow (hM)_y = (hN)_x $$
 * $$\displaystyle
 * }
 * }

We know,


 * {| style=";width:70%" border="0" align="center"



\begin{align} \bar{M}_y & = (hM)_y \\ & \Rightarrow h_y M + h M_y \end{align} $$
 * $$\displaystyle

$$
 * $$\displaystyle \longrightarrow (5)


 * }
 * }

and,


 * {| style=";width:70%" border="0" align="center"



\begin{align} \bar{N}_x & = (hN)_x \\ & \Rightarrow h_x N + h N_x \end{align} $$
 * $$\displaystyle

$$
 * $$\displaystyle \longrightarrow (6)


 * }
 * }

Substituting Equations (5) and (6) into Equation (4),


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h_x N - h_y M + h (N_x - M_y) = 0 $$
 * $$\displaystyle

$$
 * $$\displaystyle \longrightarrow (7)


 * }
 * }

If $$\displaystyle h_x = 0$$, then Equation (7) becomes,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow - h_y M + h (N_x - M_y) = 0 $$
 * $$\displaystyle


 * }
 * }

Dividing throughout by h and re-arranging gives,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow \frac{h_y}{h} = \frac{1}{M}(N_x - M_y) $$
 * $$\displaystyle


 * }
 * }

Integrating throughout with respect to y,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow \int\frac{h_y}{h}dy = \int\frac{1}{M}(N_x - M_y) dy $$
 * $$\displaystyle



\Rightarrow \underbrace{\int\frac{\frac{\partial h}{\partial y}}{h}dy}_{log_e\ (h)} = \int\frac{1}{M}(N_x - M_y) dy $$
 * $$\displaystyle


 * }
 * }

Raising to exponential on both sides,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h(y) = \exp \left[\int\frac{1}{M}(N_x - M_y)dy\right] $$
 * $$\displaystyle


 * }
 * }

Let us define,


 * {| style=";width:70%" border="0" align="center"



-g(y) := \frac{1}{M}(N_x - M_y) $$
 * $$\displaystyle


 * }
 * }

Then the integrating factor becomes,


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle \Rightarrow h(y) = \exp \left[-\int_{}^{y} g(s)ds\right] $$
 * style="width:45%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

= Problem 2: Finding Integrating Factor =

Given
A non homogeneous L1-ODE-VC [First Order Linear ODE with varying coefficients] is given by,


 * {| style=";width:70%" border="0" align="center"



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

$$
 * $$\displaystyle \longrightarrow (8)


 * }
 * }

and the integrating factor is given by,


 * {| style=";width:70%" border="0" align="center"



h(x) = \exp \left[ \int_{}^{x} a_0(s)ds \right] $$
 * $$\displaystyle


 * }
 * }

where $$\displaystyle a_0(x) $$ is given by,


 * {| style=";width:70%" border="0" align="center"



a_1(x)y' + a_0(x)y = b(x) $$
 * $$\displaystyle

$$
 * $$\displaystyle \longrightarrow (9)


 * }
 * }

Find
Show that,


 * {| style=";width:70%" border="0" align="center"



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


 * }
 * }

Solution
Given L1-ODE-VC,


 * {| style=";width:70%" border="0" align="center"



y' + \underbrace{\frac{1}{x}}_{a_0(x)} y = x^2 $$
 * $$\displaystyle


 * }
 * }

which means,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h(x) = \exp \left[ \int_{}^{x} \frac{1}{s}ds \right] $$
 * $$\displaystyle



\Rightarrow h(x) = \exp \left[ log_e[x] \right] $$
 * $$\displaystyle


 * }
 * }

Taking natural logarithm on both sides,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow log_e [h(x)] = log_e [e]^{ log_e[x] } $$
 * $$\displaystyle



\Rightarrow log_e [h(x)] = log_e [x] \underbrace{log_e [e]}_{=1} $$
 * $$\displaystyle




 * }


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle \Rightarrow h(x) = x $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |


 * }
 * }

= Problem 3: Finding solution to L1-ODE-VC =

Given
After multiplying the integrating factor $$\displaystyle h(x) = x $$ to the non homogeneous L1-ODE-VC of Equation (8), we get


 * {| style=";width:70%" border="0" align="center"



xy' + y = x^3 $$
 * $$\displaystyle


 * }
 * }

Find
Show that,


 * {| style=";width:70%" border="0" align="center"



y = \frac{x^3}{4} + \frac{c}{x} $$
 * $$\displaystyle


 * }
 * }

where $$\displaystyle c $$ is a constant.

Solution
Solution to a L1-ODE-VC of Equation (9) with integrating factor $$\displaystyle h(x) $$ is given by,


 * {| style=";width:70%" border="0" align="center"



y(x) = \frac{1}{h(x)} \int_{}^{x} h(s)b(s)ds $$
 * $$\displaystyle


 * }
 * }

So, with $$\displaystyle b(x) = x^2 $$ and $$\displaystyle h(x) = x $$, the solution is given by,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow y(x) = \frac{1}{x} \int_{}^{x} s^3 ds $$
 * $$\displaystyle


 * }
 * }

After integration,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow y(x) = \frac{1}{x} \left[\frac{x^4}{4} + c \right] $$
 * $$\displaystyle


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle \Rightarrow y(x) = \frac{x^3}{4} + \frac{c}{x} $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

= Problem 4: To show a L1-ODE-VC is Exact=

Given
A L1-ODE-VC is given as,


 * {| style=";width:70%" border="0" align="center"



\frac{1}{2}x^2y' + \left[x^4 + 10 \right] = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (10)


 * }
 * }

Find
To show that equation (10) is exact.

Solution
Equation (10) satisfies the exactness condition (1), where


 * {| style=";width:70%" border="0" align="center"



M(x,y) = x^4y + 10 $$
 * $$\displaystyle


 * }
 * }

and


 * {| style=";width:70%" border="0" align="center"



N(x,y) = \frac{1}{2}x^2 $$
 * $$\displaystyle


 * }
 * }

The exactness condition (2) is not satisfied because,


 * {| style=";width:70%" border="0" align="center"



N_x = x \ne M_y = x^4 $$
 * $$\displaystyle


 * }
 * }

We'll try to find an integrating factor $$\displaystyle h(x) $$ such that, [please refer Case: 1]


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h = \exp \left[-\int\frac{1}{N}(N_x - M_y)dx \right] $$
 * $$\displaystyle


 * }
 * }

and we know $$\displaystyle N,\ N_x\ and\ M_y\ are\ all\ functions\ x.$$

On substituting,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h = \exp \left[-\int\frac{1}{\frac{x^2}{2}}(x - x^4)dx \right] $$
 * $$\displaystyle



\Rightarrow h = \exp \left[-2 \int \left(\frac{1}{x} - x^2 \right)dx \right] $$
 * $$\displaystyle



\Rightarrow h = \exp \left[\frac{2x^3}{3} - 2 log_e(x)\right] $$
 * $$\displaystyle




 * }

This shows that Equation (11) is  exactly integrable  and so, is exact.

= Problem 5: To show a N1-ODE is Exact=

Given
A N1-ODE is given as,


 * {| style=";width:70%" border="0" align="center"



\frac{y^5}{5}(5x^3+2) + \frac{x^3}{3}y^4y' = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (11)


 * }
 * }

Find
To show that equation (11) is exact.

Solution
Equation (11) satisfies the exactness condition (1), where


 * {| style=";width:70%" border="0" align="center"



M(x,y) = \frac{y^5}{5}(5x^3+2) $$
 * $$\displaystyle


 * }
 * }

and


 * {| style=";width:70%" border="0" align="center"



N(x,y) = \frac{x^3}{3}y^4 $$
 * $$\displaystyle


 * }
 * }

The exactness condition (2) is not satisfied because,


 * {| style=";width:70%" border="0" align="center"



N_x = x^2y^4 \ne M_y = y^4(5x^3+2) $$
 * $$\displaystyle


 * }
 * }

We'll try to find an integrating factor $$\displaystyle h(x) $$ such that, [please refer Case: 1]


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h = \exp \left[-\int\frac{1}{N}(N_x - M_y)dx \right] $$
 * $$\displaystyle


 * }
 * }

On substituting,


 * {| style=";width:70%" border="0" align="center"



\Rightarrow h = \exp \left[-\int\frac{1}{\frac{x^3}{3}y^4}\left(x^2y^4 - y^4(5x^3+2)\right)dx \right] $$
 * $$\displaystyle



\Rightarrow h = \exp \left[-\int\frac{3}{x^3y^4}y^4\left(x^2 -(5x^3+2)\right)dx \right] $$
 * $$\displaystyle



\Rightarrow h = \exp \left[\int(-\frac{3}{x}+15+\frac{6}{x^3})dx \right] $$
 * $$\displaystyle



\Rightarrow h = \exp \left[-3log_ex+15x-\frac{12}{x^2}\right] $$
 * $$\displaystyle




 * }

This shows that Equation (11) is  exactly integrable  and so, is exact.

= Problem 6: To show a N2-ODE is Exact=

Given
A N2-ODE is given as,


 * {| style=";width:70%" border="0" align="center"



(xy)y'' + x(y')^2 + yy' = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (12)


 * }
 * }

and is in the form of


 * {| style=";width:70%" border="0" align="center"



f(x,y,y')y'' + g(x,y,y') = 0 $$
 * $$\displaystyle


 * }
 * }

where,


 * {| style=";width:70%" border="0" align="center"



f(x,y,y') = xy $$
 * $$\displaystyle


 * }
 * }

and


 * {| style=";width:70%" border="0" align="center"



g(x,y,y') = x(y')^2 + yy' $$
 * $$\displaystyle


 * }
 * }

satisfying the exactness condition (1) for N2-ODE.

Find
To show that equation (12) satisfies the exactness conditions (2) and so, is exact.

Solution
The exactness conditions (2) are given by,


 * {| style=";width:70%" border="0" align="center"



f_{xx} + 2pf_{xy} + p^2f_{yy} = g_{xp} + pg_{yp} - g_{y} $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (13)


 * }
 * }

and


 * {| style=";width:70%" border="0" align="center"



f_{xp} + pf_{yp} + 2f_{y} = g_{pp} $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (14)


 * }
 * }

where $$\displaystyle p := y' $$

Calculating the terms on the Left Hand Side of the Equation (13),


 * {| style=";width:70%" border="0" align="center"



f_x = y \ \Rightarrow f_{xx} = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (15)


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



f_x = y \ \Rightarrow f_{xy} = 1 \ \Rightarrow 2pf_{xy} = 2p $$ $$
 * $$\displaystyle
 * $$\displaystyle \longrightarrow (16)


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



f_y = x \ \Rightarrow f_{yy} = 0 \ \Rightarrow p^2f_{yy} = 0 $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (17)


 * }
 * }

Adding up Equations (15), (16) and (17) to get the Left Hand Side of Equation (13),


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle f_{xx} + 2pf_{xy} + p^2f_{yy} = 2p $$ $$
 * style="width:45%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (18)
 * }
 * }

Calculating the terms on the Right Hand Side of the Equation (13),


 * {| style=";width:70%" border="0" align="center"



g_x = (y')^2 = p^2\ \Rightarrow g_{xp} = 2p $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (19)


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



g_y = y' = p\ \Rightarrow g_{yp} = 1 \ \Rightarrow pg_{yp} = p $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (20)


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



-g_y = -p $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (21)


 * }
 * }

Adding up Equations (19), (20) and (21) to get the Right Hand Side of Equation (13),


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle g_{xp}+pg_{yp}-g_y = 2p $$ $$
 * style="width:45%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (22)


 * }
 * }

Hence, Equation (18) and Equation (22) are equal and so, Equation (13) is satisfied.

Calculating the terms on the Left Hand Side of the Equation (14),


 * {| style=";width:70%" border="0" align="center"



f_x = y \ \Rightarrow f_{xp} = 0 $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (23)


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



f_y = x \ \Rightarrow f_{yp} = 0 \ \Rightarrow pf_{yp} = 0 $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (24)


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



f_y = x \ \Rightarrow 2f_{y} = 2x $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (25)


 * }
 * }

Adding up Equations (23), (24) and (25) to get the Left Hand Side of Equation (14),


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle f_{xp} + pf_{yp} + 2f_{y} = 2x $$ $$
 * style="width:45%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (26)


 * }
 * }

Right Hand Side of Equation (14),


 * {| style=";width:70%" border="0" align="center"



g_{p} = 2xp $$
 * $$\displaystyle


 * }
 * }


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle g_{pp} = 2x $$ $$
 * style="width:45%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (27)


 * }
 * }

Hence, Equations (27) and (26) are equal, and so, Equation (14) is satified

This shows that Equation (12), which is a N2-ODE, is  exact .

= Problem 7: Second condition of exactness conditions (2) for a N2-ODE =

Given
A general N2-ODE is given as,


 * {| style=";width:70%" border="0" align="center"



F(x,y,y',y'') = 0 $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (28)


 * }
 * }

and satisfies exactness condition (1) if it is in the form,


 * {| style=";width:70%" border="0" align="center"



f(x,y,p)y'' + g(x,y,p) = 0 $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (29)


 * }
 * }

where $$\displaystyle p:=y' $$

Find
To derive 2nd condition of exactness condtions(2) of a N2-ODE, which is given by


 * {| style=";width:70%" border="0" align="center"



f_{xp} + pf_{yp} + 2f_{y} = g_{pp} $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (30)


 * }
 * }

Solution
A N2-ODE of Equation (28) is exact, if there exists a first integral $$\displaystyle \phi(x,y,p) $$ such that,


 * {| style=";width:70%" border="0" align="center"



F(x,y,y',y'') = \frac{d}{dx} \phi(x,y,p) $$
 * $$\displaystyle


 * }
 * }

which is given by,


 * {| style=";width:70%" border="0" align="center"



F = \phi_x + \phi_y y' + \phi_p y'' $$
 * $$\displaystyle


 * }
 * }

Rearranging,


 * {| style=";width:70%" border="0" align="center"



F = \phi_p y''+ (\phi_x + \phi_y p) $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (31)


 * }
 * }

Comparing Equations (29) and (31),


 * {| style=";width:70%" border="0" align="center"



f(x,y,p) = \phi_p $$
 * $$\displaystyle


 * }
 * }

and


 * {| style=";width:70%" border="0" align="center"



g(x,y,p) = \phi_x + \phi_y p $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (32)


 * }
 * }

Differentiating Equation (32) partially with respect to p,


 * {| style=";width:70%" border="0" align="center"



g_p = \phi_{xp} + (\phi_{yp})p + \phi_y $$
 * $$\displaystyle


 * }
 * }

We know,


 * {| style=";width:70%" border="0" align="center"



\begin{align} \phi_{xp} & = \phi_{px} \\ & = (\phi_p)_x \\ & = f_x \end{align} $$
 * $$\displaystyle


 * }
 * }

and,


 * {| style=";width:70%" border="0" align="center"



\begin{align} \phi_{yp} & = \phi_{py} \\ & = (\phi_p)_y \\ & = f_y \end{align} $$
 * $$\displaystyle


 * }
 * }

and so,


 * {| style=";width:70%" border="0" align="center"



g_p = f_x + pf_y + \phi_y $$ $$
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle \longrightarrow (33)


 * }
 * }

Again, differentiating the Equation (33) partially with respect to p,


 * {| style=";width:70%" border="0" align="center"



g_{pp} = f_{xp} + pf_{yp} + f_y+ \phi_{yp} $$
 * $$\displaystyle


 * }
 * }

Substituting $$\displaystyle \phi_{yp} = f_y $$, we get


 * {| style=";width:70%" border="0" align="center"



$$\displaystyle g_{pp} = f_{xp} + pf_{yp} + 2f_y $$
 * style="width:45%; padding:10px; border:2px solid #8888aa" |
 * style= |


 * }
 * }