1. ## Solution

I want to solve the following IVP:

$y'-y/x=x/y, y(1)=4$.

Can I leave my answer as $y^2=2x^2\ln|x|+16x^2$? Should I write my final answer as $y=-x\sqrt{2}\sqrt{\ln{x}+8}, x>0$ ?

2. ## Re: Solution

\displaystyle \begin{align*} \frac{\mathrm{d}y}{\mathrm{d}x} - \frac{y}{x} &= \frac{x}{y} \\ \frac{\mathrm{d}y}{\mathrm{d}x} - \frac{y}{x} &= \frac{1}{\frac{y}{x}} \end{align*}

Let \displaystyle \begin{align*} v = \frac{y}{x} \implies y = x\,v \implies \frac{\mathrm{d}y}{\mathrm{d}x} = v + x\,\frac{\mathrm{d}v}{\mathrm{d}x} \end{align*} and the DE becomes

\displaystyle \begin{align*} v + x\,\frac{\mathrm{d}v}{\mathrm{d}x} - v &= \frac{1}{v} \\ x\,\frac{\mathrm{d}v}{\mathrm{d}x} &= \frac{1}{v} \\ v\,\frac{\mathrm{d}v}{\mathrm{d}x} &= \frac{1}{x} \\ \int{ v\,\frac{\mathrm{d}v}{\mathrm{d}x} \,\mathrm{d}x} &= \int{ \frac{1}{x}\,\mathrm{d}x} \\ \int{ v\,\mathrm{d}v} &= \ln{ \left| x \right| } + C_1 \\ \frac{v^2}{2} + C_2 &= \ln{ \left| x \right| } + C_1 \\ \frac{v^2}{2} &= \ln{ \left| x \right| } + C_1 - C_2 \\ v^2 &= 2\ln{ \left| x \right| } + C \textrm{ where } C = 2\,C_1 - 2\,C_2 \\ \left( \frac{y}{x} \right) ^2 &= 2\ln{ \left| x \right| } + C \\ \frac{y^2}{x^2} &= 2\ln{ \left| x \right| } + C \\ y^2 &= 2\,x^2 \ln{ \left| x \right| } + C\,x^2 \end{align*}

Now since \displaystyle \begin{align*} y \left( 1 \right) = 4 \end{align*} that means

\displaystyle \begin{align*} 4^2 &= 2 \left( 1 \right) ^2 \ln{ \left| 1 \right| } + C \left( 1\right) ^2 \\ 16 &= C \end{align*}

thus

\displaystyle \begin{align*} y^2 &= 2\,x^2\ln{ \left| x \right| } + 16\,x^2 \end{align*}

You should leave your answer like this, otherwise you would need to write it as \displaystyle \begin{align*} y = \pm \sqrt{ 2\,x^2\ln{ \left| x \right| } + 16\,x^2 } \end{align*}.