<s>[INST] A First Order Homogenous Differential Equation The following problem is from Schaum's book on Differential Equations.
Problem:
Solve the following differential equation.
$$ y' = \frac{ x^4 + 3x^2y^2 + y^4}{x^3 y} $$
Answer:
We rewrite this equation as:
$$ \frac{dy}{dx} =
\frac{ 1 + 3 \left( \dfrac{y^2}{x^2}\right)  + \dfrac{y^4}{x^4} }{ \dfrac{y}{x} } $$
\begin{align*}
\text{Let }y &= xv \\
\frac{dy}{dx} &= x \frac{dv}{dx} + v \\
x \frac{dv}{dx} + v &= \frac{ 1 + 3 v^2  + v^4 }{ v} \\
x \frac{dv}{dx} &= \frac{ v^4 + 2v^2 + 1 } { v } \\
x \frac{dv}{dx} &= \frac{ (v^2 + 1)^2 } { v } \\
\frac{v \,\, dv}{(v^2+1)^2} &= \frac{dx}{x} 
\end{align*}
Now we need to perform the following integration:
$$ \int \frac{v}{(v^2+1)^2} \,\, dv $$
We use the substitution $u = v^2 + 1$.
\begin{align*}
du &= 2v \, dv \\
\int \frac{v}{(v^2+1)^2} \,\, dv &= \int \left( \frac{1}{2} \right) u^{-2} \, \, du \\
\int \frac{v}{(v^2+1)^2} \,\, dv &= - \left( \frac{1}{2} \right) u^{-1} \\
\int \frac{v}{(v^2+1)^2} \,\, dv &= - \frac{1}{2(v^2+1)} \\
\end{align*}
\begin{align*}
- \frac{1}{2(v^2+1)} &= \ln{|x|} + C_1 = \ln{|x|} + \ln( C_2 ) \\
- \frac{1}{2 \left( \left( \dfrac{y}{x} \right) ^2 + 1\right) } &= \ln{|C_2 x|} \\
- \frac{1}{2 \left( y^2 + x^2 \right) } &= \ln{|C_2 x|} x^2 \\
- \frac{1}{\left( y^2 + x^2 \right) } &= 2 \ln{|C_2 x|} x^2 = \ln{|C_2 x^2|} x^2 \\
\frac{1}{\left( y^2 + x^2 \right) } &= - \ln{|C_2 x^2|} x^2 \\
\end{align*}
However, the book's answer is:
$$ y^2 = -x^2 \left( 1 + \dfrac{1}{ \ln{|kx^2|} } \right) $$
Where did I go wrong?
Here is my updated and correct solution to the problem.
We rewrite this equation as:
$$ \frac{dy}{dx} =
 \frac{ 1 + 3 \left( \dfrac{y^2}{x^2}\right)  + \dfrac{y^4}{x^4} }{ \dfrac{y}{x} } $$
\begin{align*}
\text{Let }y &= xv \\
\frac{dy}{dx} &= x \frac{dv}{dx} + v \\
x \frac{dv}{dx} + v &= \frac{ 1 + 3 v^2  + v^4 }{ v} \\
x \frac{dv}{dx} &= \frac{ v^4 + 2v^2 + 1 } { v } \\
x \frac{dv}{dx} &= \frac{ (v^2 + 1)^2 } { v } \\
\frac{v \,\, dv}{(v^2+1)^2} &= \frac{dx}{x} 
\end{align*}
Now we need to perform the following integration:
$$ \int \frac{v}{(v^2+1)^2} \,\, dv $$
We use the substitution $u = v^2 + 1$.
\begin{align*}
du &= 2v \, dv \\
\int \frac{v}{(v^2+1)^2} \,\, dv &= \int \left( \frac{1}{2} \right) u^{-2} \, \, du \\
\int \frac{v}{(v^2+1)^2} \,\, dv &= - \left( \frac{1}{2} \right) u^{-1} \\
\int \frac{v}{(v^2+1)^2} \,\, dv &= - \frac{1}{2(v^2+1)} \\
\end{align*}
\begin{align*}
- \frac{1}{2(v^2+1)} &= \ln{|x|} + C_1 = \ln{|x|} + \ln( C_2 ) \\
- \frac{1}{2 \left( \left( \dfrac{y}{x} \right) ^2 + 1\right) } &= \ln{|C_2 x|} \\
- \frac{1}{2 \left( y^2 + x^2 \right) } &= \frac{ \ln{|C_2 x|} } { x^2 } \\
- \frac{1}{\left( y^2 + x^2 \right) } &= \frac{ 2 \ln{|C_2 x|} } { x^2 } \\
- \frac{1}{\left( y^2 + x^2 \right) } &= \frac{  \ln{|C_2 x^2|} } { x^2 } \\
\frac{1}{\left( y^2 + x^2 \right) } &= \frac{ - \ln{|C_2 x^2|} } { x^2 } \\
\end{align*}
Now, I need to simplify my answer. I do this by cross multiplying.
\begin{align*}
x^2 &= -(y^2 + x^2)\ln{|C_2 x^2|} \\
x^2 + x^2 \ln{|C_2 x^2|} &= -y^2 \ln{|C_2 x^2|} \\
\frac{x^2}{\ln{|C_2 x^2|}} + x^2 &= -y^2 \\
x^2 \left(  1 + \dfrac{1 } {\ln{|C_2 x^2|}} \right)  &= -y^2 \\
y^2 &= -x^2 \left( 1 + \dfrac{1}{ \ln{|kx^2|} } \right)
\end{align*}
 [/INST] Check the step after $$-\frac {1}{2((\frac yx)^2+1)}=\ln|C_2x|$$
You should get $$-\frac {1}{2(x^2+y^2)}=\frac {\ln|C_2x|}{x^2}$$
That is not what you wrote.
</s>