# Solve the Differential Equation (x^2+1)y’=xy

In this tutorial we shall solve a differential equation of the form $\left( {{x^2} + 1} \right)y’ = xy$ by using the separating the variables method.

The differential equation of the form is given as

$\left( {{x^2} + 1} \right)y’ = xy$

This differential equation can also be written as
$\left( {{x^2} + 1} \right)\frac{{dy}}{{dx}} = xy$

Separating the variables, the given differential equation can be written as
$\frac{1}{y}dy = \frac{x}{{{x^2} + 1}}dx\,\,\,\,{\text{ – – – }}\left( {\text{i}} \right)$

Keep in mind that in the separating variable technique the terms $dy$ and $dx$ are placed in the numerator with their respective variables.

Now integrating both sides of the equation (i), we have
$\begin{gathered} \int {\frac{1}{y}dy = \int {\frac{x}{{{x^2} + 1}}dx} } \\ \Rightarrow \int {\frac{1}{y}dy = \frac{1}{2}\int {\frac{{2x}}{{{x^2} + 1}}dx} } \\ \end{gathered}$

Using the formulas of integration $\int {\frac{{f’\left( x \right)}}{{f\left( x \right)}}dx = \ln f\left( x \right)}$ and $\int {\frac{1}{x}dx = \ln x}$, we get
$\begin{gathered} \ln y = \frac{1}{2}\ln \left( {{x^2} + 1} \right) + \ln c \\ \Rightarrow \ln y = \ln {\left( {{x^2} + 1} \right)^{\frac{1}{2}}} + \ln c \\ \Rightarrow \ln y = \ln \sqrt {{x^2} + 1} + \ln c \\ \Rightarrow \ln y = \ln c\sqrt {{x^2} + 1} \\ \Rightarrow y = c\sqrt {{x^2} + 1} \\ \end{gathered}$

This is the required solution of the given differential equation.