User:Egm6321.f10.team4.Yoon/HW2

= prob 3 ploting =

clear all; close all; clc;

%Constructing a Handle to an y_h1,y_h2; y_h1 = @(x) x; y_h2 = @(x) (x/2)*log((1+x)/(1-x))-1;

hold all fplot (y_h1,[-1.5 1.5],'b-'); fplot (y_h2, [-1.5 1.5],'r-');

xlabel('x'); ylabel('y');

title('Plots of y_1H and y_2H'); legend('y_1H = x', 'y_2H = x/2 *log(1+x)/(1-x)-1','location','north');

= - L1_ODE_VC Exactness =

= Problem 1-  =

From lecture page

Given
Verify that for a N1_ODE the following equation holds true.

$$\ {\rm{M}}\left( {x,y} \right) + {\rm{N}}\left( {x,y} \right)\frac = 0$$

Solution
Let (Eq.1-1) be a function of H(y) $$H(y)= {\rm{M}}\left( {x,y} \right) + {\rm{N}}\left( {x,y} \right)\frac$$

For the given general equation to be linear, it has to meet both of the following conditions, H is a dummy function and alpha and beta is an arbitrary constant.


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

$$\displaystyle H(\alpha )=\alpha H $$ $$
 * $$\displaystyle (Eq. 1-2)
 * }
 * }


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

$$\displaystyle H(\alpha+\beta)=H(\alpha)+H(\beta) $$ $$
 * $$\displaystyle (Eq. 1-3)
 * }
 * }

By the first condition of Linearity,
 * {| style="width:100%" border="0" align="left"

$$\displaystyle H(\alpha )= {\rm{M}}\left( {x,\alpha y} \right) + {\rm{N}}\left( {x,\alpha y} \right)(\alpha y)' $$


 * }
 * }


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

$$\displaystyle \alpha H = \alpha[{\rm{M}}\left( {x,y} \right) + {\rm{N}}\left( {x,y} \right)y'] $$ Thus,
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle H(\alpha ) \neq \alpha H' $$
 * }
 * }

By the second condition of Linearity,
 * {| style="width:100%" border="0" align="left"

$$\displaystyle H(\alpha+\beta)={\rm{M}}\left( {x,\alpha + \beta} \right) + {\rm{N}}\left( {x, \alpha + \beta} \right) \left(\alpha + \beta \right)' $$
 * }
 * }


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

$$\displaystyle H(\alpha)+H(\beta)={\rm{M}}\left( {x,\alpha} \right) + {\rm{N}}\left( {x, \alpha} \right)(\alpha)'+{\rm{M}}\left( {x,\beta} \right) + {\rm{N}}\left( {x, \beta} \right)(\beta)' $$
 * }
 * }

Thus,
 * {| style="width:100%" border="0" align="left"

$$\displaystyle H(\alpha+\beta) \neq H(\alpha)+H(\beta) $$
 * }
 * }

Since the given equation doesn't satisfy neither of the linearity conditions, the given general N1_ODE_VC is non-linear.

= Problem 6 - Verify condition of Exactness =

Given

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

$$\displaystyle y(x) = \sin ^{ - 1} (k - 15x^5 ) $$     (Eq 6.1)
 * 
 * }

Verify the given equation above satisfies the following First condition of exactness,


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

$$\displaystyle M\left(x,y\right)+N(x,y)y'=0 $$
 * }

Solution

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

$$\displaystyle M(x,y):={\phi}_{x}(x,y)=\frac{\partial \phi(x,y)}{\partial x} $$
 * }


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

$$\displaystyle

N(x,y):={\phi}_{y}(x,y)=\frac{\partial \phi(x,y)}{\partial y} $$
 * }

From the (Eq 6.1),


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

$$\displaystyle 15x^5+\mathrm{sin}\left[y\left(x\right)\right]=k =: \phi(x,y) $$     (Eq 6.)
 * 
 * }

Total differential of function $$\phi\left(x,y\right)$$,


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

$$\displaystyle d\phi\left(x,y\right)=\frac{\partial \phi}{\partial x}dx+\frac{\partial \phi}{\partial y}dy $$     (Eq 6.)
 * 
 * }

As$$\phi\left(x,y\right)=k=const$$, then $$ d\mathbf{\phi}=0 $$, We can rewrite the (Eq 6.),


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

$$\displaystyle \frac{\partial \phi}{\partial x}+\frac{\partial \phi}{\partial y}\frac{dy}{dx}=0 $$     (Eq 6.)
 * 
 * }

For the given problem,
 * {| style="width:100%" border="0" align="left"

$$\displaystyle {\phi}_{x}(x,y)=\frac{\partial \phi(x,y)}{\partial x} = 75x^4 $$     (Eq 6.)
 * 
 * }


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

$$\displaystyle {\phi}_{y}(x,y)=\frac{\partial \phi(x,y)}{\partial y} = \mathrm{cos}y $$     (Eq 6.)
 * 
 * }

So, we can verify that the eqn(6.1) could be converted to the form of the first condition of exactness(6.2).

For the given problem,
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \underbrace{\left(75x^4\right)}_{M\left(x,y\right)}+\underbrace{\left(\mathrm{cos}y\right)}_{N\left(x,y\right)}\cdot y'=0 $$     (Eq 6.)
 * 
 * }

Given

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

\frac{1}{3} x^3 y^4 y' + \left(5x^3 + 2 \right) \left(\frac{1}{5} y^5 \right) = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * }
 * }

Find
Show that Eq.(1) is an exact nonlinear, first order ODE(N1_ODE_VC).

Solution
with rearranging the given Eq.(1) by reduction order of y
 * $$ \underbrace{(5x^{3}+2)\left(\frac{1}{5}y^{5}\right)}_{M(x,y)} + \underbrace{\left(\frac{1}{3}x^{3}y^{4}\right)}_{N(x,y)}y'=0$$

We can find the first exactness condition is met by defining M(x),N(x). However,
 * {| style="width:100%" border="0" align="left"

M(x,y) := \left(5x^3 + 2 \right) \left(\frac{1}{5} y^5 \right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }


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

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

To satisfy the second condition of exactness, My = Nx
 * $$M_y = 5x^3y^4+2y^4 \neq x^2y^4 = N_x$$

To find an integrating factor, deviding the (Eq. 1) by :$$\frac{1}{3}x^3y^4$$ to make the coefficient of Y' to 1
 * {| style="width:100%" border="0" align="left"





y' +\frac{3}{x^3y^4}(5x^{3}+2)\left(\frac{1}{5}y^{5}\right) = 0 $$



\underbrace{1}_{N}\cdot y' + \underbrace{\left(3 + \frac{6}{5x^3}\right)}_{a(x)}y = 0 $$

Now we will make use of integrating factor knowledge:



\Phi(x,y) = \exp\int^{x}a(s)ds = \exp\int^{x}\left(3 + \frac{6}{5s^3}\right)ds = \exp\left(3x - \frac{3}{5x^2}\right) $$

multiplying Φ(x,y) through to find,
 * $$\bar{M}(x,y)=M(x,y) \cdot \Phi (x,y)$$
 * $$\bar{N}(x,y)=N(x,y) \cdot \Phi (x,y)$$

so to meet the second exactness condition,
 * $$\bar{N}_{x}=\bar{M}_{y}$$

Substituting and differenciating,
 * $$\bar{M}y=exp \left(3x-\frac3{5x^2}\right)\cdot \left(3+\frac6{5x^3}\right)$$
 * $$\bar{N}x=exp \left(3x-\frac3{5x^2}\right)\cdot \left(3+\frac6{5x^3}\right)$$,

Thus above is satisfying $$\bar{N}x=\bar{M}y$$, (Eq. 1) is an exact N1_ODE_VC