I am trying to show that the definite integral
Integrate[
(y*(1 - y) + (1 - t)*y^2 + t*(y - 1)^2)/((1 - t)*y^2 + t*(y - 1)^2)^2,
{y, -Infinity, Infinity}
]
is
$$\frac{\pi}{\sqrt{t(1-t)}}$$
with $t$ restricted to be real. However, the code above returns a conditional expression. Subsequently simplifying to restrict $t$ to be real returns 'undefined'. What am I doing wrong?
, Assumptions -> Im[t] == 0 && 0 < t < 1
to the integral. $\endgroup$