I've began a course on PDE's; and I am very rusty with integration.
One question required the integral $\displaystyle\int\dfrac{1}{1+x^2}dx$ . My first instinct was to substitute $x=\sinh(z)\implies dx=\cosh(z)~dz$ and we get the integral $$\displaystyle\int\dfrac{\cosh(z)}{1+\sinh^2(z)}dz=\displaystyle\int\dfrac{1}{\cosh(z)}dz$$
at which point I didn't really know how to evaluate it any further.. Tried a different route and $x=\tan(z)$ did much better, and got the result $\arctan(x)$.
But, that is definitely not the result of the last integral of my first approach, and I cannot see any mistakes I made in getting to it; what have I done?
I think that trigonometric substitution is the most straightforward approach here.
Given your integral, we put $x =\tan \theta \implies dx = \sec^2 \theta \,d\theta, \quad \theta = \arctan x$
Substituting correctly, you should obtain, in the end,
$$\int \frac{1}{1 + x^2}\,dx = \int \frac{\sec^\theta\,d\theta}{1 + \tan^2 \theta} = \int \frac {\sec^2 \theta}{\sec^2\theta}\,d\theta = \int d\theta = \theta + C = \arctan(x) + C$$
If we substitute, instead, $x = \sinh z$,
$$\displaystyle\int\dfrac{\cosh(z)}{1+\sinh^2(z)}dz=\displaystyle\int\dfrac{1}{\cosh(z)}dz = \arctan(\sinh z) + C=\arctan(x) + C$$