# Find the differential equation  (1+y^2)(1+lnx)dx+xdy=0 with y(1)=1?

Oct 11, 2017

$y = \tan \left(\frac{\pi}{4} - \ln x - {\ln}^{2} x\right)$

#### Explanation:

You have found the differential equation - it is in the question! We assume you seek the solution of the differential equation and also that the log base is $e$.

$\left(1 + {y}^{2}\right) \left(1 + \ln x\right) \mathrm{dx} + x \mathrm{dy} = 0$ with $y \left(1\right) = 1$ ..... [A]

We can rearrange this ODE from differential form to standard and collect terms:

$- \frac{1}{1 + {y}^{2}} \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{1 + \ln x}{x}$

This now separable, so separating the variables yields:

$\setminus \setminus \setminus \setminus \setminus - \setminus \int \setminus \frac{1}{1 + {y}^{2}} \setminus \mathrm{dy} = \int \setminus \frac{1 + \ln x}{x} \setminus \mathrm{dx}$

$\therefore - \setminus \int \setminus \frac{1}{1 + {y}^{2}} \setminus \mathrm{dy} = \int \setminus \frac{1}{x} \setminus \mathrm{dx} + \int \setminus \ln \frac{x}{x} \setminus \mathrm{dx}$ ..... [B]

The first and and second integrals are standard, the third will require an application of integration by parts:

Let $\left\{\begin{matrix}u & = \ln x & \implies \frac{\mathrm{du}}{\mathrm{dx}} & = \frac{1}{x} \\ \frac{\mathrm{dv}}{\mathrm{dx}} & = \frac{1}{x} & \implies v & = \ln x\end{matrix}\right.$

Then plugging into the IBP formula:

$\int \setminus \left(u\right) \left(\frac{\mathrm{dv}}{\mathrm{dx}}\right) \setminus \mathrm{dx} = \left(u\right) \left(v\right) - \int \setminus \left(v\right) \left(\frac{\mathrm{du}}{\mathrm{dx}}\right) \setminus \mathrm{dx}$

gives us

$\int \setminus \left(\ln x\right) \left(\frac{1}{x}\right) \setminus \mathrm{dx} = \left(\ln x\right) \left(\ln x\right) - \int \setminus \left(\ln x\right) \left(\frac{1}{x}\right) \setminus \mathrm{dx}$

$\therefore 2 \setminus \int \setminus \frac{\ln x}{x} \setminus \mathrm{dx} = {\ln}^{2} x \implies \int \setminus \frac{\ln x}{x} \setminus \mathrm{dx} = {\ln}^{2} \frac{x}{2}$

Using this result, we can now return to integrating our earlier result [B]:

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

Applying the initial condition $y \left(1\right) = 1$ we have:

$- \arctan 1 = \ln 1 + \frac{{\ln}^{2} 1}{2} + C \implies C = - \frac{\pi}{4}$

Thus:

$- \arctan y = \ln x + \frac{{\ln}^{2} x}{2} - \frac{\pi}{4}$

$\therefore \arctan y = \frac{\pi}{4} - \ln x - {\ln}^{2} x$

$\therefore y = \tan \left(\frac{\pi}{4} - \ln x - {\ln}^{2} x\right)$