# What is the general solution of the differential equation  (1+x)dy/dx-y=1+x ?

Jan 6, 2018

$y = \left(1 + x\right) \ln \left(1 + x\right) + C \left(1 + x\right)$

#### Explanation:

We have:

$\left(1 + x\right) \frac{\mathrm{dy}}{\mathrm{dx}} - y = 1 + x$

We can re-arrange this ODE as follows:

$\frac{\mathrm{dy}}{\mathrm{dx}} - \frac{1}{1 + x} y = 1$ ..... [1]

This is a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

$\frac{\mathrm{dy}}{\mathrm{dx}} + P \left(x\right) y = Q \left(x\right)$

We can readily generate an integrating factor when we have an equation of this form, given by;

$I = {e}^{\int P \left(x\right) \mathrm{dx}}$
$\setminus \setminus = \exp \left(\int \setminus - \frac{1}{1 + x} \setminus \mathrm{dx}\right)$
$\setminus \setminus = \exp \left(- \ln \left(1 + x\right)\right)$
$\setminus \setminus = - \left(1 + x\right)$

And if we multiply the DE [1] by this Integrating Factor, $I$, we will have a perfect product differential;

$- \frac{1}{1 + x} \frac{\mathrm{dy}}{\mathrm{dx}} + \frac{1}{1 + x} ^ 2 y = - \frac{1}{1 + x}$
$\therefore \frac{d}{\mathrm{dx}} \left[- \frac{1}{1 + x} y\right] = - \frac{1}{1 + x}$

Which we can directly integrate to get:

$\frac{1}{1 + x} y = \int \setminus \frac{1}{1 + x} \setminus \mathrm{dx}$
$\therefore \frac{1}{1 + x} y = \ln \left(1 + x\right) + C$

$\therefore y = \left(1 + x\right) \ln \left(1 + x\right) + C \left(1 + x\right)$