<s>[INST] Where is my mistake when I am trying to solve $| \int_{\Gamma} \frac{1} {(z^2 +1)^2} dz | $ 
Find an upper bound for
$$ \bigg| \int_{\Gamma} \frac{1} {(z^2 +1)^2} dz \bigg|.$$

where Γ is the upper half-circle |z| = a with radius a > 1 traversed once in the counter clockwise direction.
I know the correct answer but I didn't know where I get wrong.
The following is my solution
$$
\bigg|\int_{0}^{\pi} \frac{1} {(a^2 e^{2i \theta} +1)^2} d (a e^{i \theta}) \bigg |
$$
$$
\bigg |\int_{0}^{\pi} \frac{1} {(a^2 e^{2i \theta} +1)^2} (a i e^{i \theta}) d \theta \bigg |
$$
$$
\bigg |\int_{0}^{\pi} \frac{(a i e^{i \theta})} {(a^2 e^{2i \theta} +1)^2}  d \theta \bigg |
$$
$$
\bigg |\int_{0}^{\pi} \frac{(a i e^{i \theta})} {(a^2 e^{2i \theta} +1)^2}  d \theta \bigg |
$$
$$
\bigg |\int_{0}^{\pi} \frac{(a i e^{i \theta})} {(a^2 e^{2i \theta} +1)^2}  d \theta \bigg |
\leq
\int_{0}^{\pi} \frac{\bigg |(a i e^{i \theta}) \bigg |} {|(a^2 e^{2i \theta} +1)^2|}  d \theta
$$
$$
\int_{0}^{\pi} \frac{|(a i (\cos \theta + i \sin \theta)|} {|(a^2 e^{2i \theta} +1)^2|}  d \theta
$$
$$
\int_{0}^{\pi} \frac{|(a i \cos \theta - a \sin \theta)|} {|(a^2 e^{2i \theta} +1)^2|}  d \theta
$$
$$
\int_{0}^{\pi} \frac{a} {|(a^2 e^{2i \theta} +1)^2|}  d \theta
$$
$$
\int_{0}^{\pi} \frac{a} {|(a^4 e^{4i \theta} + 2 a^2 e^{2i \theta} + 1)^2|}  d \theta
$$
$$
\int_{0}^{\pi} \frac{a} {|(a^4 \cos 4\theta + 2 a^2 \cos 2\theta + 1) + 
(a^4 \sin 4\theta + 2 a^2 \sin 2\theta) i|}  d \theta
$$
$$
\int_{0}^{\pi} \frac{a} {\sqrt{(a^4 \cos 4\theta + 2 a^2 \cos 2\theta + 1)^2 + 
(a^4 \sin 4\theta + 2 a^2 \sin 2\theta)^2}}  d \theta
$$
$$
\int_{0}^{\pi} \frac{a} {\sqrt{
{\left(1+2\ \cos\left(2\ \theta \right)\ a^2+a^4\right)}^2
}} d \theta
$$
Because a > 1 and $\theta \in [0, \pi]$, $\Rightarrow 1+2\ \cos\left(2\ \theta \right)\ a^2+a^4 \geq 0$
$$
\int_{0}^{\pi} \frac{a} {
{\left(1+2\ \cos\left(2\ \theta \right)\ a^2+a^4\right)}
} d \theta
$$
Use matlab symbolic function.
$$
\int_{0}^{\pi} \frac{a} {
{\left(1+2\ \cos\left(2\ \theta \right)\ a^2+a^4\right)}
} d \theta =
\frac{a \pi} {a^4 -1}
$$
$$
\bigg| \int_{\Gamma} \frac{1} {(z^2 +1)^2} dz \bigg | \leq
\frac{a \pi} {a^4 -1}
$$
$$
 \int_{\Gamma} \frac{1} {(z^2 +1)^2} dz  =
\int_{0}^{\pi} \frac{1} {(a^2 e^{2i \theta} +1)^2} (a i e^{i \theta}) d \theta =
-\frac{a} {a^2 + 1} + \frac{\pi}{2} + tan^{-1} a
,
(a>1)
$$
 [/INST] There is a classic bound, best seen by geometric reasoning: $$\left|\int_\Gamma\frac{1}{(z^2+1)^2}\,\mathrm{d}z\right|<\frac{\pi a}{(a^2-1)^2}$$
Which is slightly sharper than yours, $a>1$. The explanation: $\Gamma$ traces a half-circle - the locus of $z^2,\,z\in\Gamma$ traces a full circle (circle wraps around, arguments double...) of radius $a^2$. When you add $1$, you shift this to a circle of radius $a^2$ with centre $1$ - the minimum modulus (distance to the origin!) of any complex number on the circumference is 'clearly' given by that point of this locus on the real axis closest to the origin, which is the point $1-a^2$. The minimum modulus of $z^2+1$ is $a^2-1$, $a>1$, among $z\in\Gamma$.
That means I can bound the integrand from above by: $$\frac{1}{(a^2-1)^2}$$And the inequality follows.

</s>