5
$\begingroup$

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

$\endgroup$
9
$\begingroup$

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 \[Element] Integers && n \[Element] Integers
Simplify@Integrate[Sin[m x]*Sin[n x], {x, 0, \[Pi]}]
$\endgroup$
  • $\begingroup$ Great, thanks!! $\endgroup$ – Alicia Roberts Dec 5 '19 at 11:07
  • $\begingroup$ You're welcome! $\endgroup$ – Henrik Schumacher Dec 5 '19 at 11:07
  • 2
    $\begingroup$ Also $Assumptions = m \[Element] Integers && n \[Element] Integers gives the same result 0 which is obviously wrong for the case n==m . Still (v12) a Mathematica problem? $\endgroup$ – Ulrich Neumann Dec 5 '19 at 11:17
  • $\begingroup$ Uh, yes. Must be the thing about Simplify assuming some generacity of the symbols... =/ $\endgroup$ – Henrik Schumacher Dec 5 '19 at 11:18
  • $\begingroup$ @UlrichNeumann Funny, I was making the same comment at the same time under the OP. :) $\endgroup$ – Michael E2 Dec 5 '19 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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