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$
3

1 Answer 1

10
$\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 ∈ Integers && n ∈ Integers
Simplify@Integrate[Sin[m x]*Sin[n x], {x, 0, π}]
$\endgroup$
6
  • $\begingroup$ Great, thanks!! $\endgroup$ Dec 5, 2019 at 11:07
  • $\begingroup$ You're welcome! $\endgroup$ Dec 5, 2019 at 11:07
  • 4
    $\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$ Dec 5, 2019 at 11:17
  • $\begingroup$ Uh, yes. Must be the thing about Simplify assuming some generacity of the symbols... =/ $\endgroup$ Dec 5, 2019 at 11:18
  • $\begingroup$ @UlrichNeumann Funny, I was making the same comment at the same time under the OP. :) $\endgroup$
    – Michael E2
    Dec 5, 2019 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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