I am trying to evaluate (on Mathematica v.9) the integral \begin{equation} \int_0^x [\sin (x) \sin (2 y)-\sin (2 x) \sin (y)]^t \,\mathrm{d}y, \end{equation} where $t$ is an even, positive integer. Since Mathematica seems to be reluctant to perform the definite integral, my strategy is to compute the indefinite one first and then manually substitute the limits. So I use the following:

FullSimplify[Integrate[(Sin[x] Sin[2 y] - Sin[ 2 x] Sin[y])^t, y, Assumptions -> t \[Element] Integers]]

and the result that I get is

1/(1 + t)2 AppellF1[(1 + t)/2, 1 + 2 t, -t, (3 + t)/2, -Tan[y/2]^2, Cot[x/2]^2 Tan[y/2]^2] (Sec[y/2]^2)^( 2 t) (-Sin[2 x] Sin[y] + Sin[x] Sin[2 y])^t Tan[y/  2] (1 - Cot[x/2]^2 Tan[y/2]^2)^-t

On substituting /.y-> x (the formula above is 0 at the other limit), the expression that I obtain is
\begin{equation} \frac{2 \Gamma \left(\frac{t}{2}+\frac{3}{2}\right) \Gamma (t+1) \tan \left(\frac{x}{2}\right) \sec ^2\left(\frac{x}{2}\right)^{2 t} \, _2F_1\left(\frac{t+1}{2},2 t+1;t+\frac{t+3}{2};-\tan ^2\left(\frac{x}{2}\right)\right)}{(t+1) \Gamma \left(\frac{3 t}{2}+\frac{3}{2}\right)} \end{equation}

(1/((1 + t) Gamma[3/2 + (3 t)/2]))2 Gamma[3/2 + t/2] Gamma[ 1 + t] Hypergeometric2F1[(1 + t)/2, 1 + 2 t, t + (3 + t)/2, -Tan[x/2]^2] (Sec[x/2]^2)^(2 t) Tan[x/2]

However, this is evidently incorrect. For instance, consider the case when $t=2$. The definite integral

FullSimplify[Integrate[(Sin[x] Sin[2 y] - Sin[ 2 x] Sin[y])^2, {y, 0, x}]]

can now be performed exactly to yield \begin{equation} -\frac{1}{24} \sin ^2(x) (-36 x+28 \sin (2 x)+\sin (4 x)-24 x \cos (2 x)) \end{equation}

Let's choose a particualr value of $x$, say $0.5$, to see the inconsistency. Plugging in $t = 2,\, x = 0.5$ in the former expression results in $0.0450968$, whereas the latter equation gives $0.000125868$!

I am really puzzled by this discrepancy and would greatly appreciate any help or insights in this regard. I am aware that there is a bug concerning the ''hanging'' integration order but I am not sure if that is the one responsible for this mess.

Many thanks!

  • 1
    $\begingroup$ Is there any reason to believe the indefinite integral will have no jump discontinuity on the path of integration? $\endgroup$ Jan 2 '16 at 20:27
  • $\begingroup$ The integrand is a continuous function, and the integration is along the real line ($x$ \in \mathbb{R}). My point is that if the first expression has to be correct, it should be a generic one that works for all values of $t$, but it clearly doesn't! $\endgroup$
    – Integrator
    Jan 2 '16 at 20:30
  • $\begingroup$ @DanielLichtblau Moreover, the output generated by Mathematica is not even a ConditionalExpression, as is often the case, so presumably Mathematica does not require any constraints on $t$ in its evaluation. $\endgroup$
    – Integrator
    Jan 2 '16 at 20:36
  • 1
    $\begingroup$ (1) Mathematica never generates ConditionalExpression results for indefinite integrals. Those, also known as antiderivatives, are unconditionally correct. Branch cut locations might depend on parameter conditions, but that does not affect correctness of the antiderivatives. $\endgroup$ Jan 2 '16 at 23:43
  • 2
    $\begingroup$ Since $t$ is an "even positive integer", I would start with using the binomial theorem and integrate the relevant sum termwise. $\endgroup$
    – J. M.'s torpor
    Oct 3 '18 at 13:49

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.