How to solve ordinary differential equations: $({2xy^2 - y}){dx} + ({y^2 + x+ y}){dy} = 0$?

62 Views Asked by At

I used the integrating factor for this equation, when i supposed that it only have ${x}$ or ${y}$, i found that the integrating factor have $x$ and $y$:$$$$ Call $u(x,y)$ is integrating factor, we have: $${u(2xy^2-y)}{dx} + {u(y^2 + x + y)dy} = 0$$ and: $$\frac{du}{dy}P + \frac{dP}{dy}u = \frac{du}{dx}Q + \frac{dQ}{dx}u$$ I suppose that ${u}$ only have ${x}$, we have: $$\frac{dP}{dy}u=\frac{du}{dx}Q+\frac{dQ}{dx}u$$ I found the result of $u$ is: $$u=e^{2x^2y-2x} $$ So how to solve this problem? I need your help.

2

There are 2 best solutions below

0
On BEST ANSWER

Solving as an exact ODE method. (as it looks like that is what the book wants, from the way the ode is written).

The first step is to write the ODE in standard form for exact, which is \begin{align*} M(x,y) \mathop{\mathrm{d}x}+ N(x,y) \mathop{\mathrm{d}y}=0 \tag{1A} \end{align*} Therefore \begin{align*} \left(2 x \,y^{2}-y\right)\mathop{\mathrm{d}x} + \left(y^{2}+x +y\right)\mathop{\mathrm{d}y} &= 0 \tag{2A} \end{align*} Comparing (1A) and (2A) shows that \begin{align*} M(x,y) &= 2 x \,y^{2}-y\\ N(x,y) &= y^{2}+x +y \end{align*} The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied $$ \frac{\partial M}{\partial y} = \frac{\partial N}{\partial x} $$ Using result found above gives \begin{align*} \frac{\partial M}{\partial y} &= \frac{\partial}{\partial y} \left(2 x \,y^{2}-y\right)\\ &= 4 x y -1 \end{align*} And \begin{align*} \frac{\partial N}{\partial x} &= \frac{\partial}{\partial x} \left(y^{2}+x +y\right)\\ &= 1 \end{align*} Since $\frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}$ then the ODE is not exact.

Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let \begin{align*} A &= \frac{1}{N} \left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x} \right) \\ &=\frac{1}{y^{2}+x +y}\left( \left( 4 x y -1\right) - \left(1 \right) \right) \\ &=\frac{4 x y -2}{y^{2}+x +y} \end{align*}

Since $A$ depends on $y$, it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let \begin{align*} B &= \frac{1}{M} \left( \frac{\partial N}{\partial x} - \frac{\partial M}{\partial y} \right) \\ &=\frac{1}{2 x \,y^{2}-y}\left( \left( 1\right) - \left(4 x y -1 \right) \right) \\ &=-\frac{2}{y} \end{align*}

Since $B$ does not depend on $x$, it can be used to obtain an integrating factor. Let the integrating factor be $\mu$. Then \begin{align*} \mu &= e^{\int B \mathop{\mathrm{d}y}} \\ &= e^{\int -\frac{2}{y}\mathop{\mathrm{d}y} } \end{align*} The result of integrating gives \begin{align*} \mu &= e^{-2 \ln \left(y \right) } \\ &= \frac{1}{y^{2}} \end{align*} $M$ and $N$ are now multiplied by this integrating factor, giving new $M$ and new $N$ which are called $\overline{M}$ and $\overline{N}$ so not to confuse them with the original $M$ and $N$ \begin{align*} \overline{M} &=\mu M \\ &= \frac{1}{y^{2}}\left(2 x \,y^{2}-y\right) \\ &= \frac{2 x y -1}{y} \end{align*} and \begin{align*} \overline{N} &=\mu N \\ &= \frac{1}{y^{2}}\left(y^{2}+x +y\right) \\ &= \frac{y^{2}+x +y}{y^{2}} \end{align*} So now a modified ODE is obtained from the original ODE which will be exact and can be solved using the standard method. The modified ODE is \begin{align*} \overline{M} + \overline{N} \frac{ \mathop{\mathrm{d}y}}{\mathop{\mathrm{d}x}} &= 0 \\ \left(\frac{2 x y -1}{y}\right) + \left(\frac{y^{2}+x +y}{y^{2}}\right) \frac{ \mathop{\mathrm{d}y}}{\mathop{\mathrm{d}x}} &= 0 \end{align*}

The following equations are now set up to solve for the function $\phi\left(x,y\right)$ \begin{align*} \frac{\partial \phi}{\partial x } &= \overline{M} \\ &= \frac{2 x y -1}{y}\tag{1} \\ \frac{\partial \phi}{\partial y } &= \overline{N} \\ &= \frac{y^{2}+x +y}{y^{2}}\tag{2} \end{align*} Integrating (1) w.r.t $x$ gives
\begin{align*} \int \frac{\partial \phi}{\partial x} \mathop{\mathrm{d}x} &= \int \frac{2 x y -1}{y}\mathop{\mathrm{d}x} \\ \phi &= \frac{x \left(x y -1\right)}{y}+ f(y) \tag{3} \end{align*} Where $f(y)$ is used for the constant of integration since $\phi$ is a function of both $x$ and $y$. Taking derivative of equation (3) w.r.t $y$ gives \begin{align*} \frac{\partial \phi}{\partial y} &= -\frac{x^{2} y -x}{y^{2}}+\frac{x^{2}}{y}+f'(y) \tag{4} \\ &= \frac{x}{y^{2}}+f'(y) \end{align*} But equation (2) says that $\frac{\partial \phi}{\partial y} = \frac{y^{2}+x +y}{y^{2}}$. Therefore equation (4) becomes \begin{align*} \frac{y^{2}+x +y}{y^{2}} &= \frac{x}{y^{2}}+f'(y) \tag{5} \end{align*} Solving equation (5) for $ f'(y)$ gives\begin{align*} f'(y) &= \frac{y +1}{y} \end{align*} Integrating the above w.r.t $y$ gives\begin{align*} \int f'(y) \mathop{\mathrm{d}y} &= \int \left( \frac{y +1}{y}\right) \mathop{\mathrm{d}y} \\ f(y) &= y +\ln \left(y \right)+ c_1 \end{align*} Where $c_1$ is constant of integration. Substituting result found above for $f(y)$ into equation (3) gives $\phi$ $$ \phi = \frac{x^{2} y -x}{y}+y +\ln \left(y \right)+ c_1 $$ But since $\phi$ itself is a constant function, then let $\phi=c_0$ where $c_0$ is new constant and combining $c_1$ and $c_0$ constants into new constant $c_1$ gives the solution as $$ c_1 = \frac{x \left(x y -1\right)}{y}+y +\ln \left(y \right) $$

0
On

Hint

If you try to work with $y(x)$, as you almost noticed, you will arrive to some implicit equation.

So, consider instead $$({2xy^2 - y})x' + ({y^2 + x+ y}) = 0$$ and first let $x=u+\frac 1{2y}$ (because of the first term).

Try it and see how simple it is.