1
$\begingroup$

I am trying to actually compute $\int \sqrt{\cosh{y}-\cos{x}}e^{inx} dx$ in mathematica. As an example i tried computing $\int \sqrt{1-\cos{x}}e^{inx} dx$ and got a result. But when i try $\int \sqrt{2-\cos{x}}e^{inx} dx$ i do not get any result. Note that $n\in \mathbb{Z}$. Any fixes please.

The code i used was:

Integrate $\bigg[\sqrt{2-Cos[x]} Exp[i*n*x],x\bigg]$

Integrate[Sqrt[2-Cos[x]]Exp[I n x],x]
$\endgroup$
7
  • $\begingroup$ What is the code you used to do those integrals? (no screenshot please; just plaintext code) $\endgroup$
    – QuantumDot
    Jun 23, 2016 at 15:41
  • $\begingroup$ Integrate [\sqrt{(2-Cos[x]} Exp[inx], x]..i actually used square root symbol that is ctrl+2 in mathematica $\endgroup$
    – user69312
    Jun 23, 2016 at 15:43
  • $\begingroup$ @user69312 Would you add the code (properly formatted) in your original post? You can edit your post using the "edit" link right under it on the left. Here are some guidelines for posting fancy-formatted code so that it remains readable in this site: meta.mathematica.stackexchange.com/q/1584/27951 $\endgroup$
    – MarcoB
    Jun 23, 2016 at 15:44
  • $\begingroup$ i have updated the post with the code..thanks $\endgroup$
    – user69312
    Jun 23, 2016 at 15:53
  • 2
    $\begingroup$ Do you have reason to believe that this integral can be computed analytically? If not, then use NIntegrate. What are the conditions on n? $\endgroup$
    – march
    Jun 23, 2016 at 16:16

1 Answer 1

1
$\begingroup$

The function cannot be integrated with unknown n, because its form changes with different values for n:

Table[Integrate[Sqrt[2 - Cos[x]] Exp[I n x], x], {n, 0, 3}]

1:

2 EllipticE[x/2, -2], 1/3 (-4 EllipticE[x/2, -2] + 6 EllipticF[x/2, -2] - I Sqrt[2 - Cos[x]] (-5 + 2 Cos[x/2]^2 + Cos[x] + 2 I Sin[x]))

2:

2/15 (I + Cot[x]) (13 Sqrt[3] Sqrt[-1 + Cos[x]] Sqrt[1 + Cos[x]] EllipticE[ArcSin[Sqrt[2 - Cos[x]]], 1/3] (Cos[x] - I Sin[x]) - 5 Sqrt[3] Sqrt[-1 + Cos[x]] Sqrt[1 + Cos[x]] EllipticF[ArcSin[Sqrt[2 - Cos[x]]], 1/3] (Cos[x] - I Sin[x]) + Sqrt[2 - Cos[x]] (8 - 8 Cos[2 x] + 4 I Sin[x] + 5 I Sin[2 x]))

3:

1/35 Csc[x] (Cos[(3 x)/2] + I Sin[(3 x)/2]) (132 Sqrt[3] Sqrt[-1 + Cos[x]] Sqrt[1 + Cos[x]] EllipticE[ArcSin[Sqrt[2 - Cos[x]]], 1/ 3] (Cos[(3 x)/2] - I Sin[(3 x)/2]) - 50 Sqrt[3] Sqrt[-1 + Cos[x]] Sqrt[1 + Cos[x]] EllipticF[ArcSin[Sqrt[2 - Cos[x]]], 1/ 3] (Cos[(3 x)/2] - I Sin[(3 x)/2]) + Sqrt[2 - Cos[x]] (85 Cos[x/2] - 14 Cos[(3 x)/2] - 71 Cos[(5 x)/2] - 39 I Sin[x/2] + 22 I Sin[(3 x)/2] + 61 I Sin[(5 x)/2]))

$\endgroup$
8
  • $\begingroup$ Nevertheless I suspect that one can derive a recurrence relation for these elliptic integrals... (assuming integer $n$) $\endgroup$ Jun 23, 2016 at 17:53
  • $\begingroup$ @J.M. Sure, there are definitely patterns in the solutions, but then he should at least define $n\in\mathbb{Z}$, and even then, is that something you could easily get from Mathematica in this case? $\endgroup$
    – Feyre
    Jun 23, 2016 at 18:00
  • $\begingroup$ @J.M. , Assumptions -> n \[Element] Integers does nothing. $\endgroup$
    – Feyre
    Jun 23, 2016 at 18:02
  • $\begingroup$ Not really; my experience with elliptic integrals in Mathematica is not very rosy. The expressions returned tend to be more complicated than they have to be, so I fall back on semi-manual derivation (using Mathematica only for tedious algebra), with the guidance of Byrd/Friedman. $\endgroup$ Jun 23, 2016 at 18:13
  • $\begingroup$ Thank u all for your insights and yes n ∈ Z..I agree it gets tedious with elliptic functions. $\endgroup$
    – user69312
    Jun 23, 2016 at 18:47

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.