# How to evaluate conditional expression for definite integral [closed]

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?

• Just add , Assumptions -> Im[t] == 0 && 0 < t < 1 to the integral. Jan 24 at 17:42
• Thank you very much! Jan 24 at 17:49

Integrate[(y*(1 - y) + (1 - t)*y^2 +