Find the general solution to the ODE: I was asked to find the general solution to these ODEs.

*

*$$\frac{dy}{dx}=\frac{(-8x+3y-31)}{(-3x+y-11)}$$
I tried by rearranging to the form $M(x,y)+N(x,y)\frac{dy}{dx}=0$ and let $y=vx$, but what I got was $$(v^2x-6vx-11v+8x+31)dx+x(-3x+vx-11)dv=0$$
and I could not separate $x$ and $v$ for integration.


*$$\frac{dy}{dx}=\frac{y}{x}+\frac{9}{2}xexp(-\frac{2y}{x})+\frac{9}{2}xexp(\frac{2y}{x})$$
I have totally no idea which method to be used in Question 2.
May I know if I'm on the wrong track, and how should I solve them? Thanks.
 A: Your equation is $\dfrac{dy}{dx}=\dfrac{(-8x+3y-31)}{(-3x+y-11)}=-\dfrac{8x-3y+31}{-3x+y-11}$ which is an exact differential equation.
The differential form associated to it is $\omega=(8x-3y+31)dx+(-3x+y-11)dy$ and its domain is $\mathbb R$ which is simply connected hence we have the relation $\text{exact}\iff\text{closed}$.
Let's call the fisrt coefficient of the form $A(x,y)$ and the second coefficient $B(x,y)$, then
$$\dfrac{\partial}{\partial_y}A(x,y)=-3=\dfrac{\partial}{\partial_x}B(x,y)\implies\omega\text{ is closed and exact}.$$
The only thing we have to do now is calculating the potential $U(x,y)$ of the form:
$$\int A(x,y)dx=4x^2-3xy+31x+g(y)$$
$$\dfrac{d}{dy}(4x^2-3xy+31x+g(y))=-3x+g'(y)=-3x+y-11\implies g(y)=\dfrac{y^2}{2}-11y+c$$
$$U(x,y)=4x^2-3xy+31x+\dfrac{y^2}{2}-11y+c, c\in\mathbb R.$$
You can now write the solution explicitly or you could study the implicit function defined by the relation $U(x,y)=0$.
A: Rewrite as
$$(-3x+y-11)\,dy-(-8x+3y-31)\,dx=0$$
or
$$-3(x\,dy+y\,dx)+(y-11)\,dy+(8x+31)\,dx=0.$$
This is an exact differential, integration is immediate.
A: We have
$$
\frac{dy}{dx} = \frac{-8x+3y-31}{-3x+y-11}.
$$
One way to solve it is to introduce time variable $t$, obtaining a system
$$
\left\{
\begin{align*}
&\dot{y} = -8x+3y-31 \\
&\dot{x} = -3x+y-11
\end{align*}
\right. ,
$$
which is linear. A matrix of this system
$$
A =
\begin{pmatrix}
-8 & 3\\
-3 & 1
\end{pmatrix}
$$
is nondegenerate: $\det A = 1$.
Thus we can find a particular solution almost immediately substituting
$$
\left\{
\begin{align*}
&y = Y \\
&x = X
\end{align*}
\right. .
$$
That gives us a system of linear equations:
$$
\left\{
\begin{align*}
&-8X+3Y = 31\\
&-3X+Y = 11
\end{align*}
\right. ,
$$
which has a unique solution $Y = 5$, $X = -2$. Now everything what we we have to do is to find a general solution of the homogeneous system
$$
\left\{
\begin{align*}
&\dot{y} = -8x+3y\\
&\dot{x} = -3x+y
\end{align*}
\right. .
$$
So we consider a characteristic equation $\det (A - \lambda I) = \lambda^2 + 7\lambda + 1 = 0$. We have two distinct roots:
$$
\left\{
\begin{align*}
&\lambda_1 = \frac{3\sqrt{5}-7}{2}\\
&\lambda_2 = \frac{-3\sqrt{5}-7}{2}
\end{align*}
\right. .
$$
Corresponding eigenvectors are
$$
e_1 = \begin{pmatrix} \frac{-\sqrt{5}+3}{2} \\ 1 \end{pmatrix}, \quad e_2 = \begin{pmatrix} \frac{\sqrt{5}+3}{2} \\ 1 \end{pmatrix}.
$$
Hence the general solution is
$$
\begin{pmatrix} y \\ x \end{pmatrix} = C_1\begin{pmatrix} \frac{-\sqrt{5}+3}{2} \\ 1 \end{pmatrix} \exp{\left(\frac{3\sqrt{5}-7}{2}t\right)} + C_2\begin{pmatrix} \frac{\sqrt{5}+3}{2} \\ 1 \end{pmatrix} \exp{\left(\frac{-3\sqrt{5}-7}{2}t\right)},
$$
$C_1, C_2 = \mathrm{const}$. Finally, we combine two parts together:
$$
\begin{pmatrix} y \\ x \end{pmatrix} = C_1\begin{pmatrix} \frac{-\sqrt{5}+3}{2} \\ 1 \end{pmatrix} \exp{\left(\frac{3\sqrt{5}-7}{2}t\right)} + C_2\begin{pmatrix} \frac{\sqrt{5}+3}{2} \\ 1 \end{pmatrix} \exp{\left(\frac{-3\sqrt{5}-7}{2}t\right)} + \begin{pmatrix} 5 \\ -2 \end{pmatrix}.
$$
To proceed to the answer we have to say a few words about singularities where the right hand side of our original equation doesn't exist. A condition is $-3x + y - 11 = 0$ (we look for singularities). It gives us
$$
C_1\left(\frac{-\sqrt{5}+3}{2}  - 3 \right)\exp{\left(\frac{3\sqrt{5}-7}{2}t\right)} + C_2\left(\frac{\sqrt{5}+3}{2} - 3 \right)\exp{\left(\frac{-3\sqrt{5}-7}{2}t\right)} = 0,
$$
$$
C_1\frac{\sqrt{5}+3}{2}\exp{\left(\frac{3\sqrt{5}-7}{2}t\right)} =  C_2\frac{\sqrt{5}-3}{2}\exp{\left(\frac{-3\sqrt{5}-7}{2}t\right)},
$$
$$
C_1\frac{\sqrt{5}+3}{\sqrt{5}-3}\exp{\left(3\sqrt{5}t\right)} =  C_2.
$$
But those points are not a real problem: in those points a tangent line to our integral curves is vertical. Not a big deal. So the answer is above in the form of a family of curves parametrised by time.
