I was trying to differentiate the question and I did it in the following 2 ways:
METHOD $1:$
Using the cain rule, we get, $$\frac{\,d}{\,dx}\mathrm{e}^{x\arctan\left(x\right)}=\mathrm{e}^{x\arctan\left(x\right)}\frac{\,d}{\,dx}x\arctan\left(x\right)=\mathrm{e}^{x\arctan\left(x\right)}\left\{\arctan\left(x\right)+\frac{x}{x^2+1}\right\}\tag1$$
METHOD $2:$
But, when we try to do implicit differentiation, we get $$y=\mathrm{e}^{x\arctan\left(x\right)}$$
$$\ln y=x\arctan\left(x\right)$$
$$\frac{\,d}{\,dx}\tan\left(\frac{\ln\left(y\right)}{x}\right)=\frac{\,d}{\,dx}x$$
$$\frac{1}{\cos^2\left(\frac{\ln\left(y\right)}{x}\right)}\frac{1}{xy}y’=1$$
$$y’=\cos^2\left(\tan^{-1}\left(x\right)\right)x\mathrm{e}^{x\arctan\left(x\right)}$$
$$y’=\frac{x}{x^2+1}\mathrm{e}^{x\arctan\left(x\right)}$$
But these give different answers, please help me where have I gone wrong.