The following integral $S = \int^\infty_1 \frac{1}{1+x^2}dx$ needs to be transformed using $x = tan(t)$ into a new expression which has a new interval and which can be solved analytically.
The new interval I got it and it is from x = 0 to x = 1 using the improper integral identity. But filling in $x = tan(t)$ gives $S_2 = \int^1_0 \frac{1}{1+tan^2(x)}dx$.
Is the above correct and if yes how can I solve it? Integration by parts?
Note $\tan \frac \pi 4 = 1$ and $\tan t \to \infty$ as $t \to \frac{\pi}{2}^-$ so the limits on your integral should be $\frac \pi 4$ and $\frac \pi 2$. You also left out the differential $\sec^2 t$ when you computed $dt$, so you should have $$\int_1^\infty \frac{1}{1+x^2} \, dx = \int_{\pi/4}^{\pi/2} \frac{1}{1 + \tan^2 t} \sec^2 t \, dt.$$
This is pretty simple once you recognize $1 + \tan^2 t = \sec^2 t$.