# Thread: Tricky First Order Differential Equation

1. ## Tricky First Order Differential Equation

Plz help with this First Order Differential Equation.

So the equation is: x*y'-y=x^3-1

I can't separate the variables?

Anyone knows how to solve that?

2. The DE can be written in the form...

$y^{'}= a(x)\cdot y + b(x)$ (1)

... so that it is linear and can be solved in 'standard way'...

Kind regards

$\chi$ $\sigma$

3. Originally Posted by gergofoto
Plz help with this First Order Differential Equation.

So the equation is: x*y'-y=x^3-1

I can't separate the variables?

Anyone knows how to solve that?
$x\frac{dy}{dx} - y = x^3 - 1$

$\frac{dy}{dx} - x^{-1}y = x^2 - x^{-1}$.

Now we need an integrating factor:

$e^{\int{-x^{-1}\,dx}} = e^{-\ln{x}} = e^{\ln{x^{-1}}} = x^{-1}$.

Multiply the DE through by the integrating factor:

$x^{-1}\frac{dy}{dx} - x^{-2}y = x - x^{-2}$.

Now the LHS is a product rule expansion of $\frac{d}{dx}(x^{-1}y)$.

So $\frac{d}{dx}(x^{-1}y) = x - x^{-2}$

$x^{-1}y = \int{x - x^{-2}\,dx}$

$x^{-1}y = \frac{1}{2}x^2 + x^{-1} + C$

$y = \frac{1}{2}x^3 + 1 + Cx$.