5

I want to prove that $$ \int_{0}^{\pi } \sin(n \, x) \, \sin(m \, x) \, \mathrm{d} x=0 $$ for m,n integers and $$ m\neq n$$ My try is:

$Assumptions = m ≠ n
$Assumptions = m ∈ Integers
$Assumptions = n ∈ Integers
Integrate[Sin[m x] Sin[n x], {x, 0, π} ]

But no luck

Michael E2
  • 235,386
  • 17
  • 334
  • 747
  • 1
    Do you have a space (multiplication) between m, n and x ? – b.gates.you.know.what Dec 05 '19 at 11:01
  • I didn't.... Now i am getting this ((-1)^n n Sin[m π])/(m^2 - n^2) – alicia roberts Dec 05 '19 at 11:04
  • 4
    Note that the assumption m != n is not needed to get a result of 0. See https://mathematica.stackexchange.com/questions/174011/how-to-get-a-universal-answer-using-integrate and https://mathematica.stackexchange.com/questions/67080/how-to-code-around-known-mma-special-case-failures – Michael E2 Dec 05 '19 at 11:21

1 Answers1

10

You overwrite $Assumptions several times, so it does not contain all the information that you meant to provide. Also Simplify can help where Integrate gave up the simplification. Try this:

$Assumptions = m != n && m ∈ Integers && n ∈ Integers
Simplify@Integrate[Sin[m x]*Sin[n x], {x, 0, π}]
none
  • 19
  • 5
Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309