**Toolbox:**

- A first order differential equation is an equation of the form $\frac{dy}{dx}+Px=Q$
- The solution is given by $ye^{\int Pdx}=\int Qe^{\int Pdx}dx+c$
- Note that $x$ and $y$ are interchangeable in the above equations.
- Integration by parts: $\int udv=uv-\int vdu$
- Integral of $e^x$ is $e^x$, i.e., $\int e^x dx = e^x + c$
- If $y=0, tan^{-1} y = 0$.

Given: $(\tan ^{-1}y -x) dy=(1+y^2)dx$

$\textbf{Step 1: Re-write the differential equation in the standard form}$:

$\Rightarrow$ $(\tan ^{-1}y -x) dy=(1+y^2)dx \rightarrow \large\frac{dx}{dy}=\frac{\tan^{-1}y}{1+y^2} - \frac{x}{1+y^2}$

$=>\large\frac{dx}{dy}+\frac{x}{1+y^2}=\frac{\tan ^{-1}y}{1+y^2}$

This is a linear differential equation of the form: $\frac{dx}{dy}+Px=Q$.

The solution for this is given by $xe^{\int Pdy}=\int Qe^{\int Pdy}dy+c$

$\textbf{Step 2: Substitute for P and Q}$:

In the above equation, $P=\frac{1}{1+y^2}$ and $Q=\frac{\tan ^{-1}y}{1+y^2}$

$\Rightarrow P=\frac{1}{1+y^2}\rightarrow \int Pdy=\tan^{-1}y$

Therefore, the equation can be written as follows: L.H.S. = R.H.S: $xe^{\tan^{-1}y}=\large\int (\large\frac{\tan ^{-1}y}{1+y^2})$$(e^{\tan ^{-1}y}) dy+c$.

$\textbf{Step 3: Reduce using integration by parts}$:

Let us set up the equation in this form: $\int udv=uv-\int vdu$

Let $\tan ^{-1}y=t$ $\Rightarrow \frac{1}{1+y^2}dy=dt$

$\Rightarrow$ R.H.S, $\int e^{\tan ^{-1}y}.\frac{\tan^{-1}y}{1+y^2}dy$ can be expressed as follows: $\int e^t.t.dt$

Let $u=t$ and $e^tdt=dv \rightarrow$ $du=dt$ and $e^t=v$

Therefore, $\int t.e^t dt=t.e^t-\int e^t.dt$

Integral of $e^x$ is itself, i.e, $\int e^x dx = e^x + c$

$\Rightarrow \int t.e^t dt=t.e^t-e^t+c$

Therefore R.H.S. $\int e^{\tan ^{-1}y}.\frac{\tan^{-1}y}{1+y^2}dy =\int e^t.t.dt = te^t-e^t+c$

Since L.H.S. = R.H.S., $xe^{\tan ^{-1}y} = te^t-e^t+c$

Substituting for $t$, we get $xe^{\tan ^{-1}y}=\tan^{-1}y\;e^{\tan^{-1}y}-e^{\tan^{-1}y}+c$

$\Rightarrow x \tan^{-1}y=e^{\tan ^{-1}y}[\tan^{-1}y-1]+c$

$\textbf{Step 4: Evaluation the contstant c}$:

If $y=0, tan^{-1} y = 0$.

When $x=0, y=0$, the equation reduces to: $0 = e^0(0-1)+c$.

$\Rightarrow e^0 + c = 0 \rightarrow 1 + c = 0$

$\Rightarrow c = -1$

$\textbf{Step 5: Finding the general solution}$:

Substituting for $c=-1$ in $x \tan^{-1}y=e^{\tan ^{-1}y}[\tan^{-1}y-1]+c$

$\Rightarrow$ $x \tan ^{-1}y=e^{\tan^{-1}}[\tan^{-1}y-1]-1$

$\Rightarrow e^{\tan^{-1}y}(x-\tan^{-1}y+1)=1$