$$\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 & $\frac1{(1+x^2)^2}< \frac1{5-x^2}$ \cr \frac{\sqrt5}{10}\log|\sqrt5+x| -\frac{\sqrt5}{10}\log|\sqrt5-x| +C_2 & $\frac1{5-x^2}< \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>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<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).$$