User:Egm6321.f10.team2.zou/HW2

= Problem 5: =

Given

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

$$ \displaystyle M(x,y)+N(x,y)f(y')=0$$ (Eq 5.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Find
Find $$\displaystyle f(y')$$ so that there is no analytical solution to $$\displaystyle f(y')=-\frac{M}{N}$$. (i.e., such ODE cannot be exact.)

Solution
If we were to create the following parts of such an equation that is described in Eq 5.1, we can get the following functions out of an infinite possibilities pool.


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

$$ \displaystyle
 * style="width:95%" |
 * style="width:95%" |

M(x,y)=5xy$$

(Eq 5.2)
 * 
 * }


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

$$ \displaystyle N(x,y)={{x}^{2}}{{y}^{3}}$$ (Eq 5.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \displaystyle f(y')=10y'{{e}^{y'}}$$ (Eq 5.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Then plugging in all of the equations into Eq 5.1 will get us the following:


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

$$ \displaystyle 5xy+{{x}^{2}}{{y}^{3}}(10y'{{e}^{y'}})=0$$ (Eq 5.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Reorganizing the equation to solve for y’ will yield


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

$$ \displaystyle 5xy+{{x}^{2}}{{y}^{3}}(10y'{{e}^{y'}})=0$$ (Eq 5.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \displaystyle {{x}^{2}}{{y}^{3}}(10y'{{e}^{y'}})=-5xy$$ (Eq 5.7)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \displaystyle y'{{e}^{y'}}=-\frac{5xy}{10{{x}^{2}}{{y}^{3}}}=-\frac{1}{2xy}$$ (Eq 5.8)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Finally taking the natural logarithms of both sides will yield


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

$$ \displaystyle \ln (y')+y'=\ln (-\frac{1}{2xy})$$ (Eq 5.9)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Therefore, it can be concluded that $$\displaystyle f(y')=10y'{{e}^{y'}}$$ will not yield an exact equation for the given $$\displaystyle M(x,y)$$ & $$\displaystyle N(x,y)$$.

= Problem 6: =

Given

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

$$ \displaystyle y(x)={{\sin }^{-1}}(k-15{{x}^{5}})$$, (Eq 6.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \displaystyle M(x,y)+N(x,y)y'=0$$, (Eq 6.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

where $$\displaystyle \left\{ \begin{align} & M(x,y)=75{{x}^{4}} \\ & N(x,y)=\cos y \\ \end{align} \right.$$.

Find
Verify that Eq 6.1 satisfies Eq 6.2.

Step 1
When we plug in the given $$\displaystyle M(x,y)$$ & $$\displaystyle N(x,y)$$ values into Eq 6.2, we get:


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

$$ \displaystyle 75{{x}^{4}}+(\cos y)y'=0$$. (Eq 6.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Step 2
So now let’s look at Eq 6.1 and rewrite it in a different from such that


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

$$ \displaystyle y(x)={{\sin }^{-1}}(k-15{{x}^{5}})\Rightarrow \sin y=(k-15{{x}^{5}})$$. (Eq 6.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Step 3
Taking the derivative of both sides of the new form we get the following:


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

$$ \displaystyle (\sin y)'=(k-15{{x}^{5}})'$$, (Eq 6.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \displaystyle (\cos y)y'=-75{{x}^{4}}$$. (Eq 6.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Step 4
Rearranging the result from Step 3 will give us $$\displaystyle 75{{x}^{4}}+(\cos y)y'=0$$; thereby, proof is complete.

= Problem 7: Solving General Non-Homogeneous Linear First Order Ordinary Differential Equations =

Given

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

$$ \displaystyle {y}'+xy=2x+3$$, (Eq 7.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$ \displaystyle {y}'+\frac{{{a}_{0}}(x)}{{{a}_{1}}(x)}y=\frac{b(x)}{{{a}_{1}}(x)}$$, (Eq 7.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where we assume that for any $$\displaystyle x $$, $$\displaystyle {{a}_{1}}(x)\ne 0 $$.


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

$$ \displaystyle ({{x}^{2}}+1){y}'+xy=2x$$. (Eq 7.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Solutions regarding Eq 7.1 ~ Eq 7.3.

Solution
Before we get started, we should find the method of deriving solutions of non-homogeneous 1st order ODEs.

Method by King et al.
Consider a general non-homogeneous 1st order ODE like:


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

$$ \displaystyle {{a}_{1}}(x){y}'+{{a}_{0}}(x)y=b(x)$$, (Eq 7.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

If for any $$\displaystyle x $$, $$\displaystyle {{a}_{1}}(x)\ne 0 $$, then we get another form of $$Eq 7.4 $$,


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

$$ \displaystyle {y}'+P(x)y=Q(x)$$, (Eq 7.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$P(x)=\frac{{{a}_{0}}(x)}{{{a}_{1}}(x)}$$ and $$Q(x)=\frac{b(x)}{{{a}_{1}}(x)}$$.

If we let factor $$\displaystyle \exp \left\{ \int_ – ^{x}{P(s)ds} \right\}$$ times each sides of Eq 7.5, we derive,


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

$$ \displaystyle \exp \left\{ \int_ – ^{x}{P(s)ds} \right\}\frac{dy}{dx}+\exp \left\{ \int_ – ^{x}{P(s)ds} \right\}P(x)y=Q(x)\exp \left\{ \int_ – ^{x}{P(s)ds} \right\}$$. (Eq 7.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can see that the left side of the equation can be simplified, thus,


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

$$ \displaystyle {{h}^{1}}\frac{dy}{dx}+y\frac{d{{h}^{1}}}{dx}=Q{{h}^{1}}$$, (Eq 7.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

By integrating Eq 7.7 we have the solution,


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

$$ \displaystyle y(x)=\frac{1}{{{h}^{1}}(x)}\int_ – ^{x}{{{h}^{1}}(s)Q(s)}ds$$, (Eq 7.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle {{h}^{^{1}}}(x)=\exp \left\{ \int_ – ^{x}{P(s)ds} \right\} $$.

Method by finding exact total differential
We can also get the solution fully under the idea of using exact total differential to eliminate the $$\displaystyle {{y}'} $$ and utility of line integral. By doing this, Eq 7.5 can be also be written as,


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

$$ \displaystyle \left[ P(x)y-Q(x) \right]dx+dy=0$$. (Eq 7.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

If we find a function $$\displaystyle \mu (x,y)$$ whose total differential is same as the left side of Eq 7.9, then we will have,


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

$$ \displaystyle \mu (x,y)=C$$, (Eq 7.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle C$$ is some constant, then we get the implicit or explicit solution from Eq 7.10.

However the prerequisite of existence of such $$\displaystyle \mu (x,y)$$ is not assured, so we need a factor multipled to the Eq 7.9 to make it satisfy the second condition of exactness. Let's call this factor $$\displaystyle {{h}^{2}}$$ and assume it a function only of $$\displaystyle x$$. We have,


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

$$ \displaystyle {{h}^{2}}(x)\left[ P(x)y-Q(x) \right]dx+{{h}^{2}}(x)dy=0$$. (Eq 7.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Eq 7.11 must satisfy the second condition of exactness, hencce we obtain,


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

$$ \displaystyle \frac{\partial \left\{ {{h}^{2}}(x)\left[ P(x)y-Q(x) \right] \right\}}{\partial y}=\frac{\partial {{h}^{2}}(x)}{\partial x}$$ (Eq 7.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \displaystyle \Rightarrow {{h}^{2}}(x)=\exp \int_ – ^{x}{P(s)}ds$$ (Eq 7.13)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can see that the assumption "$$\displaystyle {{h}^{2}}(x)$$ is a function only of $$\displaystyle x$$" is automatically satisfied and $$\displaystyle {{h}^{2}}(x)$$ is actually equal to $$\displaystyle {{h}^{1}}(x)$$.

Now we can concentrate on getting the critical important function: $$\displaystyle \mu (x,y)$$.

Theorem 7-1
Let $$\displaystyle I(x,y)$$ and $$\displaystyle J(x,y)$$ be both smooth functions in its domain and such relationship is satisfied:


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

$$ \displaystyle \frac{\partial I}{\partial y}=\frac{\partial J}{\partial x}$$. (Eq 7.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Then the total differential of function $$\displaystyle u(x,y)=\int_{({{x}_{0}},{{y}_{0}})}^{(x,y)}{I(x,y)dx+J(x,y)dy}$$ equals $$\displaystyle I(x,y)dx+J(x,y)dy$$ in which the $$\displaystyle u(x,y)$$ is a line integral and $$\displaystyle ({{x}_{0}},{{y}_{0}})$$ is an arbitrary point.

Verification:

To illustrate this theorem, we just need to prove relationships below:


 * $$\displaystyle \frac{\partial u}{\partial x}=I(x,y)$$, $$\displaystyle \frac{\partial u}{\partial y}=J(x,y)$$

Then we have,


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

$$ \displaystyle \frac{\partial u}{\partial x}=\underset{\Delta x\to 0}{\mathop{\lim }}\,\frac{u(x+\Delta x,y)-u(x,y)}{\Delta x}$$ (Eq 7.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The Eq 7.14 satisfied the condition of path independence of line integrals(please see Green's theorem), therefore, line integral $$\displaystyle u(x+\Delta x,y)=\int_{({{x}_{0}},{{y}_{0}})}^{(x+\Delta x,y)}{I(x,y)dx+J(x,y)dy}$$ can be designated onto 2 line segments:


 * $$\displaystyle ({{x}_{0}},{{y}_{0}})\to (x,y)\to (x+\Delta x,y)$$. We obtain,


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

$$ \displaystyle u(x+\Delta x,y)=u(x,y)+\int_{(x,y)}^{(x+\Delta x,y)}{I(x,y)dx+J(x,y)dy}$$, (Eq 7.16)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \displaystyle \Rightarrow u(x+\Delta x,y)-u(x,y)=\int_{x}^{x+\Delta x}{I(x,y)dx}$$, (Eq 7.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \displaystyle \Rightarrow u(x+\Delta x,y)-u(x,y)=I(x+\omega *\Delta x,y)\Delta x$$, (Eq 7.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle 0\le \omega \le 1$$(please see Intermediate value problem).

Then we substituting Eq 7.18 back to Eq 7.15, we derive,


 * $$\frac{\partial u}{\partial x}=I(x,y)$$.

Similarly we have,


 * $$\frac{\partial u}{\partial y}=J(x,y)$$.

Thus the whole theorem is proved.

Now we go back to the Eq 6.11. Because Eq 6.12 meets the prerequisite of Eq 7.14, we can apply Theorem 7-1 on Eq 7.11, we have,


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

$$ \displaystyle \begin{align} u(x,y) & =\int_{({{x}_{0}},{{y}_{0}})}^{(x,y)}{\left\{ {{h}^{2}}(x)\left[ P(x)y-Q(x) \right]dx+{{h}^{2}}(x)dy \right\}} \\ & =\int_{({{x}_{0}},{{y}_{0}})}^{(x,{{y}_{0}})}{\left\{ {{h}^{2}}(x)\left[ P(x)y-Q(x) \right] \right\}dx}+\int_{(x,{{y}_{0}})}^{(x,y)}{{{h}^{2}}(x)dy} \end{align}$$, (Eq 7.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle ({{x}_{0}},{{y}_{0}})$$ is an arbitrary point. And if combined with Eq 7.10, we are able to get the solution from the equation below:


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

$$ \displaystyle \int_{({{x}_{0}},{{y}_{0}})}^{(x,{{y}_{0}})}{\left\{ {{h}^{2}}(x)\left[ P(x)y-Q(x) \right] \right\}dx}+\int_{(x,{{y}_{0}})}^{(x,y)}{{{h}^{2}}(x)dy}=C$$, (Eq 7.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle C$$ is some constant.

Solution for Eq 7.1
We use the first method.

From Eq 7.1 we know,

$$\displaystyle P(x)=x$$, $$\displaystyle Q(x)=2x+3$$.

The integrating factor is,


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

$$ \displaystyle \begin{align} h= & \exp \int_ – ^{x}{sds} \\ & ={{e}^{\tfrac{2}}} \end{align}$$. (Eq 7.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

So,


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

$$ \displaystyle \begin{align} y & =\frac{1}{h(x)}\int_ – ^{s}{h(s)Q(s)ds} \\ & ={{e}^{-\frac{2}}}\int_ – ^{x}(2s+3)ds \\ & ={{e}^{-\frac{2}}}\left( 2\int_ – ^{x}{{{e}^{\frac{2}}}d\frac{2}+3\int_ – ^{x}{{{e}^{\frac{{{s}^{2}}}{2}}}ds}} \right) \\ & =2+{{e}^{-\frac{2}}}*3\int_ – ^{x}{{{e}^{\frac{{{s}^{2}}}{2}}}ds} \\ & =2+\frac{3\sqrt{\pi }}{2}{{e}^{-\frac{2}}}*erfi(x) \end{align}$$, (Eq 7.22)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The term $$\displaystyle \int_ – ^{x}{{{e}^{\frac{{{s}^{2}}}{2}}}ds}$$ is unable to be described by the combination of elementary functions and their integrals (please see Lists of integrals). But it can be described by imaginary error function(the term $$\displaystyle erfi(x)$$ in Eq 7.22), see also Error Function.

Solution for Eq 7.2
From Eq 7.2 we know,

$$P(x)=\frac{{{a}_{0}}(x)}{{{a}_{1}}(x)}$$ and $$Q(x)=\frac{b(x)}{{{a}_{1}}(x)}$$.

Substituting these two into Eq 7.8, we dereive,


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

$$ \displaystyle y(x)=\frac{1}{\exp \left\{ \int_ – ^{x}{\frac{{{a}_{0}}(s)}{{{a}_{1}}(s)}ds} \right\}}\int_ – ^{x}{\exp \left\{ \int_ – ^{x}{\frac{{{a}_{0}}(s)}{{{a}_{1}}(s)}ds} \right\}\frac{b(s)}{{{a}_{1}}(s)}ds}$$ (Eq 7.23)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution for Eq 7.3
We use second method.

As $$\displaystyle {{a}_{1}}=({{x}^{2}}+1)\ne 0$$, Eq 7.3 can de written as:


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

$$ \displaystyle {y}'+\frac{x}{{{x}^{2}}+1}y=\frac{2x}{{{x}^{2}}+1}$$ (Eq 7.24)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The integation factor is,


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

$$ \displaystyle h=\exp \int_ – ^{x}{\frac{s}{{{s}^{2}}+1}ds}={{\left( {{x}^{2}}+1 \right)}^{\frac{1}{2}}}$$ (Eq 7.25)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Hence Eq 7.24 can be written as,


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

$$ \displaystyle \frac{\left( y-2 \right)x}{\sqrt{{{x}^{2}}+1}}dx+\sqrt{{{x}^{2}}+1}dy=0$$ (Eq 7.26)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Integrate Eq 7.26, we have,


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

$$ \displaystyle \begin{align} & \int_{(0,0)}^{(x,y)}{\left\{ \frac{\left( y-2 \right)x}{\sqrt{{{x}^{2}}+1}}dx+\sqrt{{{x}^{2}}+1}dy \right\}=0} \\ & \Rightarrow \int_{(0,0)}^{(x,0)}{\frac{\left( y-2 \right)x}{\sqrt{{{x}^{2}}+1}}dx}+\int_{(x,0)}^{(x,y)}{\sqrt{{{x}^{2}}+1}dy}=0 \\ & \Rightarrow -2\sqrt{{{x}^{2}}+1}+\sqrt{{{x}^{2}}+1}*y=C \\ & \Rightarrow y=\frac{C}{\sqrt[{}]{{{x}^{2}}+1}}+2 \\ & \\ \end{align}$$ (Eq 7.27)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

where $$\displaystyle C$$ is some constant.