$\int \min \{\frac1{(1+x^2)^2},\frac1{5-x^2}\}$ solution verification $$\int \min \{\frac1{(1+x^2)^2},\frac1{5-x^2}\}$$
I see this integral as the integral of the function which smaller of these two
$$\int\frac1{(1+x^2)^2}=\frac12\arctan(x)+\frac x{2(1+x^2)}+C_1$$
$$\int\frac1{5-x^2}=\frac{\sqrt5}{10}\log|\sqrt5+x| -\frac{\sqrt5}{10}\log|\sqrt5-x| +C_2$$
$$
  \int \min \{\frac1{(1+x^2)^2},\frac1{5-x^2}\}= \cases{        \frac12\arctan(x)+\frac x{2(1+x^2)}+C_1       &amp; $\frac1{(1+x^2)^2}&lt; \frac1{5-x^2}$ \cr
                 \frac{\sqrt5}{10}\log|\sqrt5+x| -\frac{\sqrt5}{10}\log|\sqrt5-x| +C_2 &amp; $\frac1{5-x^2}&lt; \frac1{(1+x^2)^2}$  }
$$
Is the idea correct and what happens in points where $\frac1{(1+x^2)^2}=\frac1{5-x^2}$ ?
For $x^2&gt;5$, the function reduces to $\dfrac1{5-x^2}$ and we can use an indefinite integral
$$F(x)=\int\frac{dx}{5-x^2}+C_0.$$ Notice that you may not cross the borders $x^2=5$ and there can be two distinct constants on either sides.

For $x^2&lt;5$, we first restrict the study to $x\ge0$ for convenience. We switch from one function to the other at $x=1$. So for $x\le1$, we adopt
$$F(x)=\int_0^x\frac{dt}{5-t^2}+C_1$$ and for
$$1\le x\le \sqrt5,$$
$$F(x)=\int_0^1\frac{dt}{5-t^2}+\int_1^x\frac{dt}{(1+t^2)^2}+C_1=\frac1{\sqrt 5}\text{artanh}\frac1{\sqrt 5}+\int_1^x\frac{dt}{(1+t^2)^2}+C_1.$$
Now for the negative domain, we can use by symmetry
$$F(x)= C_1-F(-x).$$
What did you do to determine which values of x make one smaller than the other?
First notice that $\frac{1}{(1+ x^2)^2}$ is always positive while $\frac{1}{5- x^2}$ is positive only for $-\sqrt{5}&lt; x&lt; \sqrt{5}$.
For all $x&lt; -\sqrt{5}$ and all $x&gt; \sqrt{5}$, the minimum if $\frac{1}{5- x^2}$.  For $-\sqrt{5}&lt; x&lt; \sqrt{5}$,
$\frac{1}{(1+ x^2)^2}&lt; \frac{1}{5- x^2}$
if and only if $5- x^2&lt; (1- x^2)^2= 1- 2x^2+ x^4$.
So we want to find x such that $x^4- x^2- 4&gt; 0$.
Let $y= x^2$ and solve $y^2- y- 4&gt; 0$.  $y^2- y- 4= y^2- y+ \frac{1}{4}- \frac{1}{4}- 4= (y- \frac{1}{2})^2- \frac{17}{4}&gt; 0$.  $(y- \frac{1}{2})^2&gt; \frac{17}{4}$.
That will be true for $y= x^2&lt; \frac{1- \sqrt{17}}{2}$ and for $y= x^2&gt; \frac{1+ \sqrt{17}}{2}$.  Of course, for real x, $x^2$ is not negative so we are left with $x^2&gt; \frac{1+ \sqrt{17}}{2}$ which means $x&lt; -\sqrt{\frac{1+ \sqrt{17}}{2}}$ and $x&gt; \sqrt{\frac{1+ \sqrt{17}}{2}}$.