Finding integration factor for an ODE

I'm trying to get the following system of equation to exact differential equation form:

$$\left\{ \begin{array} \dot \dot x =y^2-x \\ \dot y = 2y \end{array} \right.$$

What I tried:

$$\frac{dx}{dy}=\frac{y^2-x}{2y} \quad \Rightarrow \quad 2ydx+(x-y^2)dy=0$$

Next I tried to find an integration factor:

$$\frac{N_x-M_y}{M}=-\frac{1}{2y}$$

$$\Rightarrow \quad \mu(y)=e^{\int-\frac{1}{2y}dy}=e^{-\frac{1}{2}ln|y|}=\frac{1}{\sqrt{|y|}}$$

Is there a way I can get rid of the absolute value? omitting it gives an exact differential equation but only for part of the domain.

• You can solve the second equation at first. – Dr. Sonnhard Graubner Apr 21 '18 at 12:37
• Interesting idea. But if I wanted to it with integration factor anyway? – user401516 Apr 21 '18 at 12:55
• I think you don't need that – Dr. Sonnhard Graubner Apr 21 '18 at 12:59

A straight forward and simple solution

By solving the second equation of the system, first, we yield :

$$y' = 2y \Leftrightarrow \frac{y'}{y} = 2 \Rightarrow \int \frac{y'} {y}dy = \int2dt \Rightarrow y(t) = c_1e^{2t}$$

Plugging it in the first equation, now, we yield :

$$x' = c_1^2e^{4t} - x := ce^{4t}-x$$

which can be solved easily.

Note that you cannot find an integrating factor

The functions of the differential system are set over a variable $t$, $x(t)$, $y(t)$ and not as $x(y)$ and $y(x)$. This means that the complete form of the expression of the first equation, is :

$$x'(t) = y^2(t) - x(t)$$

which cannot be solved as a single differential equation and that's the exact meaning of the system, thus there is no integrating factor. The only way you can yield $x(t)$ out of it, is by the general integral solution :

$$x(t) = c_1e^{-t} + e^{-t}\int_1^te^ξy^2(ξ)dξ$$

• +1 for your complete answer...... – Isham Apr 21 '18 at 13:04
• The variable of the original system is $t$. Thus $y(t)=ce^{2t}$ etc. – LutzL Apr 21 '18 at 13:12
• Next $\frac{dx}{dt}+x=c^2e^{4t}$ can indeed be easily solved, $x(t)=de^{-t}+\frac15c^2e^{4t}$. – LutzL Apr 21 '18 at 13:15
• @LutzL Sometimes the brain lags. Thanks a lot for the heads up, helped to correct it earlier than remembering the silly mistake later on ! (answer updated accordingly). – Rebellos Apr 21 '18 at 13:18

You can take your first form which is a linear ODE in $x(y)$, $$\frac{dx}{dy}=\frac{y}2-\frac{x}{2y}$$ which has integrating factor $\sqrt{y}$ for $y>0$ so that $$\frac{d}{dy}(\sqrt{y}x(y))=\frac{y^{3/2}}2\implies x(y)=cy^{-1/2}+\frac{y^2}{5}.$$

Translated to the form of the exact ODE, the integrating factor is $\mu(x,y)=\frac1{\sqrt y}$ for $y>0$ or $\frac1{\sqrt{|y|}}$ for $y\ne0$, as you already found out. As the solution space is divided by the constant solution $y=0$ all solutions always have a constant sign in $y$ so that there will be no singularities produced by this form of the integrating factor.

In terms of differentials for $y\ne 0$ one can also compute $$d(x\sqrt{|y|})=\sqrt{|y|}dx+\frac{\text{sign}(y)x}{2\sqrt{|y|}}dx =\frac{2ydx+xdy}{2\text{sign}(y)\sqrt{|y|}}=\frac{{\rm sign}(y)}2\,|y|^{3/2}dy=\frac15d(|y|^{5/2})$$