# Integrating factor, initial value problem

#### wmccunes

##### New member
$kxy \frac{dy}{dx} = y^2 - x^2 \quad , \quad y(1) = 0$

My professor suggests substituting P in for y^2, such that:

$P = y^2 dP = 2y dy$

I am proceeding with an integrating factor method, but unable to use it to separate the variables, may be coming up with the wrong integrating factor ( x )

#### Ackbach

##### Indicium Physicus
Staff member
It's Bernoulli. I would do
\begin{align*}
kxy \frac{dy}{dx}&=y^{2}-x^{2} \\
\frac{dy}{dx}&= \frac{y}{kx}- \frac{x}{ky} \\
\frac{dy}{dx}- \frac{y}{kx}&=- \frac{x}{ky}.
\end{align*}
Then you can see that the appropriate substitution is what your professor suggested, which is $v=y^{1-(-1)}=y^{2}$. Then $dv/dx = 2y dy/dx$. Multiplying the equation by $2y$ yields
\begin{align*}
2y \frac{dy}{dx}- \frac{2 y^{2}}{kx}&=- \frac{2 x}{k} \\
\frac{dv}{dx}- \frac{2 v}{kx}&=- \frac{2x}{k}.
\end{align*}
This is first-order linear in $v$, so you can use the integrating factor method here.