Step 1: Rearrange. \[ \frac{dy}{dx} = \frac{1+y^{2}}{\tan^{-1}y - x} \]
Step 2: Substitution. Let $z = \tan^{-1}y \implies \frac{dz}{dy} = \frac{1}{1+y^{2}} \implies dy = (1+y^{2})dz$
Step 3: Rewrite. Substitute into original equation: \[ (z - x)(1+y^{2})dz = (1+y^{2})dx \] Cancel $(1+y^{2})$: \[ (z - x)dz = dx \]
Step 4: Rearrange terms. \[ \frac{dx}{dz} + x = z \]
Step 5: Solve linear ODE. This is linear in $x$: \[ \frac{dx}{dz} + x = z \] Integrating factor: $e^{\int 1dz} = e^{z}$ \[ \frac{d}{dz}(xe^{z}) = ze^{z} \]
Step 6: Integrate. \[ xe^{z} = \int ze^{z}dz \] Integration by parts: \[ \int ze^{z}dz = (z-1)e^{z} + C \] So, \[ xe^{z} = (z-1)e^{z} + C \] \[ x = z - 1 + Ce^{-z} \]
Step 7: Back substitution. $z = \tan^{-1}y$ \[ \boxed{x = \tan^{-1}y - 1 + Ce^{-\tan^{-1}y}} \]