<s>[INST] 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.
 [/INST] 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.
</s>