2
$\begingroup$

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?

$\endgroup$
2
  • 4
    $\begingroup$ Just add , Assumptions -> Im[t] == 0 && 0 < t < 1 to the integral. $\endgroup$
    – flinty
    Jan 24 at 17:42
  • $\begingroup$ Thank you very much! $\endgroup$
    – Mtheorist
    Jan 24 at 17:49

1 Answer 1

5
$\begingroup$

If you want to give conditions to an integrand, you may use the option "Assumptions->...". In your case:

Integrate[(y*(1 - y) + (1 - t)*y^2 + 
    t*(y - 1)^2)/((1 - t)*y^2 + t*(y - 1)^2)^2, {y, -Infinity, 
  Infinity}, Assumptions -> t \[Element] Reals]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.