When I first met the integral $$I(a)=\int_0^{\infty} \frac{1}{\left(1+x^a\right)(1+x)^2}d x,$$ having the value $ \frac12$, which is decent and independent of $a$.
Then I want to generalised it in a similar way. For any $b\ge 0$, we have $$ \begin{aligned} I(b) & =\int_0^{\infty} \frac{x^b}{\left(1+x^a\right)(1+x)^{2b+2}} d x \stackrel{x\mapsto\frac{1}{x}}{=} \int_0^{\infty} \frac{x^ax^b}{\left(x^a+1\right)(x+1)^{2b+2}} d x \end{aligned} $$
Averaging them $$ I(b) =\frac{1}{2} \int_0^{\infty} \frac{\left(1+x^a\right) x^b}{\left(x^a+1\right)(x+1)^{b+2}} d x =\frac{1}{2} \int_0^{\infty} \frac{x^b}{(x+1)^{2 b+2}} d x $$
Using the result of beta function, $$ \int_0^{\infty} \frac{t^{x-1}}{(1+t)^{x+y}} d t=B(x,y), $$ we have $$I(b)=\frac12B(b+1,b+1)= \frac{\Gamma^2(b+1)}{2\Gamma(2 b+2)} $$
For examples, $$\int_0^{\infty} \frac{1}{\left(1+x^a\right)(1+x)^2}d x =\frac 12;$$ $$ \int_0^{\infty} \frac{\sqrt{x}}{\left(1+x^\pi\right)(1+x)^3} d x=\frac{\Gamma^2\left(\frac{1}{2}\right)}{2\Gamma(3)}=\frac{\left[\frac{1}{2} \times\Gamma \left(\frac{1}{2}\right)\right]^2}{4}=\frac \pi{16} $$
Are there any more generalisation or interesting definite integral $I(a)$ with value independent of $a$?
Consider the integral $$\int_0^\infty \frac{dx}{(1 + x^a) (1 + x^2)}$$ The substitution $x \mapsto \frac{1}{x}$ yields the equality $$\int_0^\infty \frac{dx}{(1 + x^{-a}) (1 + x^2)} = \int_0^\infty \frac{x^a \,dx}{(1 + x^a) (1 + x^2)} ,$$ so (for all $a$) \begin{align*}\int_0^\infty \frac{dx}{(1 + x^a) (1 + x^2)} & = \frac{1}{2} \left(\int_0^\infty \frac{dx}{(1 + x^a) (1 + x^2)} + \int_0^\infty \frac{x^a \,dx}{(1 + x^a) (1 + x^2)}\right) \\ &= \frac{1}{2} \int_0^\infty \frac{dx}{1 + x^2} \\ &= \frac{\pi}{4} \end{align*}
More generally, for any $b > -2$ we have $$\int_0^\infty \frac{dx}{(1 + x^a) (1 + b x + x^2)} = \left\{ \begin{array}{cl} \displaystyle \frac{1}{\sqrt{4 - b^2}} \arccos \frac{b}{2} , & b < 2 \\ \frac{1}{2}, & b = 2 \\ \displaystyle \frac{1}{\sqrt{b^2 - 4}} \operatorname{arcosh} \frac{b}{2}, & b > 2 \\ \end{array} \right.$$ for all real $a$. This example subsumes both the previous one ($b = 0$) and the first example in the question statement ($b = 2$).
Remark The change of variable $x = \tan \theta$, $dx = \sec^2 \theta \,d\theta$, transforms the original integral to $$\int_0^\frac\pi2 \frac{d\theta}{1 + \tan^a \theta} ,$$ which appeared with the red-herring value $a = \sqrt{2}$ in the well-known problem A3 on the 1980 Putnam Exam.