<s>[INST] Shortcut for value of $f(1)$ where $f(x) = \int e^x \left(\arctan x + \frac {2x}{(1+x^2)^2}\right)\,dx$ If $$f(x) = \int e^x \biggr(\arctan x + \frac {2x}{(1+x^2)^2}\biggr)\,dx$$ and $f(0)=0$ then value of $f(1)$ is? 
This is actually a Joint Entrance Examination question so I have to do it in two minutes. Is there a shortcut to finding this result quickly? It seems very complicated. The answer is $e(\pi/4-(1/2)). $
 [/INST] Actually there is a formula $$\int e^x (g (x)+g'(x))\,dx = e^x\cdot g (x)+c.$$
Now for $$\int e^x \biggr(\arctan x + \frac {2x}{(1+x^2)^2}\biggr)\,dx $$, do the following manipulation:
 $$\int e^x \biggr(\arctan x + \frac {2x}{(1+x^2)^2}\biggr)\,dx =\int e^x \biggr(\arctan x - \frac {1}{1+x^2}+\frac {1}{1+x^2}+\frac {2x}{(1+x^2)^2}\biggr)\,dx. $$
Note that $$\biggr(\arctan x - \frac {1}{1+x^2}\biggr)'=\frac {1}{1+x^2}+\frac {2x}{(1+x^2)^2}. $$
Then by the above formula  $$\int e^x \biggr(\arctan x + \frac {2x}{(1+x^2)^2}\biggr)\,dx=e^x \biggr(\arctan x - \frac {1}{1+x^2}\biggr)+c.$$
So $$f (1)=\biggr[e^x \biggr(\arctan x - \frac {1}{1+x^2}\biggr)\biggr]_0^1=\frac {e\pi}{4}-\frac {e}{2}+1. $$
</s>