1
$\begingroup$

When computing the integral of two orthogonal sine functions

$\qquad \sin(n\,\pi\,x)\,\sin(m\,\pi\,x)$, where $n,\,m$ are integers > 0

Mathematica seems to miss the solution where $n=m$. I don't exactly understand why it misses it. It is possible to find the solution by taking the limit of the expression that it gives. In the example below, this is found by taking the limit as $n \rightarrow 5$.

Have I coded something up incorrectly?

Example code

a = 
 Integrate[Sin[5 Pi x] Sin[n Pi x], {x, 0, 1}, 
   Assumptions -> {n  ∈ Integers && x ∈ Reals && m ∈ Integers && n > 0 && m > 0}]

B[n_] = 
  FullSimplify[a, 
    Assumptions -> {n  ∈ Integers && x ∈ Reals && m ∈ Integers  && n > 0 && m > 0}]
(5 Sin[n π])/(25 π - n^2 π)
0

Apparently, FullSimplify misses the case where n == 5. Zero is correct only when n ≠ 5. Taking the appropriate limit of the function before FullSimplify yields the correct result.

Limit[(10 Sin[n π])/(25 π - n^2 π), n -> 5]

1/2

$\endgroup$
  • 7
    $\begingroup$ This is once more the issue of generic solutions. The result is generically correct except for a countable subset. $\endgroup$ – J. M. is in limbo Nov 15 '19 at 1:07

Your Answer

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

Browse other questions tagged or ask your own question.