1
$\begingroup$

Can Mathematica solve integral $(1)$?

$$\int \frac{\cot^2\left(\frac12\sec^{-1}(x)\right)}{\sqrt{\tan\left(\frac12\csc^{-1}(x)\right)}} \, dx.\tag{1}$$

This is

Integrate[Cot[1/2 ArcSec[x]]^2 / Sqrt[Tan[1/2 ArcCsc[x]]], x]

Perhaps it is worth clarifying that it is not that I do not know how to solve it. The integral can be mechanically solved using the method described in this blog post. But I have noticed that both Wolfram Alpha and this Integral Calculator are unable to simplify it, let alone solve it (I mean they do not provide the closed form of the integral).

$\endgroup$
5
  • 1
    $\begingroup$ Please post the integral in Mathematica/Wolfram Language code. $\endgroup$
    – Michael E2
    Commented Jun 12 at 15:34
  • $\begingroup$ @MichaelE2: You refer to this: Integrate[Cot[1/2 ArcSec[x]]^2 / Sqrt[Tan[1/2 ArcCsc[x]]], x] ? $\endgroup$ Commented Jun 12 at 15:45
  • 1
    $\begingroup$ Please include all Mathematica code in the original post! That helps us help you by allowing us to copy and paste into our own copies of Mathematica and get right to work. So yes, edit your post with that Mathematica code, please, by clicking the grey edit button below your post. $\endgroup$
    – march
    Commented Jun 12 at 15:52
  • 1
    $\begingroup$ It seems that you don't use Mathematica. Since this is a site for helping people, who know how to use Mathematica at a basic level, with problems they face using it; and since you already have an answer to the mathematical question: I don't feel a lot of motivation for a solving a random difficult integral. Difficult integrals are a dime a dozen. Is there something missing from the statement of the problem that would make it more interesting? $\endgroup$
    – Michael E2
    Commented Jun 12 at 15:55
  • 1
    $\begingroup$ Version 14 integrates this expression without difficulty. $\endgroup$
    – bbgodfrey
    Commented Jun 12 at 18:01

4 Answers 4

4
$\begingroup$

General case:

FullSimplify[
 Integrate[
  FullSimplify[
   TrigToExp[Cot[1/2 ArcSec[x]]^2/Sqrt[Tan[1/2 ArcCsc[x]]]]], x]]

enter image description here

In case x>1 a simpler version exists:

FullSimplify[
 Integrate[
  FullSimplify[
   TrigToExp[Cot[1/2 ArcSec[x]]^2/Sqrt[Tan[1/2 ArcCsc[x]]]], 
   Assumptions -> x > 1], x], Assumptions -> x > 1]

-(2/3) (-6 - 2 x + Sqrt[-1 + x^2]) Sqrt[x + Sqrt[-1 + x^2]] - 
 8 ArcTanh[Sqrt[x - Sqrt[-1 + x^2]]]
FullSimplify[%% == %, Assumptions -> x > 1]

enter image description here

$\endgroup$
3
$\begingroup$

What I get:

Integrate[Cot[1/2  ArcSec[x]]^2/Sqrt[Tan[1/2  ArcCsc[x]]], x]

(* Out[40]= (4 (-1 + 
     x) (-7 + (12 - 5 Sqrt[1 - 1/x^2]) x + (59 - 
        29 Sqrt[1 - 1/x^2]) x^2 + (4 + 8 Sqrt[1 - 1/x^2]) x^3 + 
     60 (-1 + Sqrt[1 - 1/x^2]) x^4 + 24 (-1 + Sqrt[1 - 1/x^2]) x^5 - 
     12 Sqrt[x - 
       Sqrt[1 - 1/x^2]
         x] (-1 + (3 - Sqrt[1 - 1/x^2]) x + (8 - 
           4 Sqrt[1 - 1/x^2]) x^2 + (-4 + 
           4 Sqrt[1 - 1/x^2]) x^3 + (-8 + 
           8 Sqrt[1 - 1/x^2]) x^4) ArcTanh[Sqrt[
       x - Sqrt[1 - 1/x^2] x]]))/(3 (-1 + Sqrt[
     1 - 1/x^2])^2 x^2 (-1 + (-1 + Sqrt[1 - 1/x^2]) x) (1 + (-1 + 
        Sqrt[1 - 1/x^2]) x)^2 Sqrt[x - Sqrt[1 - 1/x^2] x]) *)

In[41]:= FullSimplify[%]

(* Out[41]= 
2/3 Sqrt[
  x - Sqrt[1 - 1/x^2]
     x] (1 + ((6 + x) (x^2 + Sqrt[x^2] Sqrt[-1 + x^2]))/x) - 
 8 ArcTanh[Sqrt[x - Sqrt[1 - 1/x^2] x]] *)
$\endgroup$
2
$\begingroup$

We can also use FunctionExpand to rewrite the integrand:

integrand = Cot[1/2  ArcSec[x]]^2/Sqrt[Tan[1/2  ArcCsc[x]]];
newIntegrand = integrand // FunctionExpand // FullSimplify

enter image description here

result = Integrate[newIntegrand, x] // FullSimplify

enter image description here

And verify result is the integral of integrand:

(D[result, x] == integrand) // FunctionExpand // FullSimplify

(*True*)

For x > 0 (I need x to be positive because PowerExpand assumes positive real numbers), We can also do FullSimplify , PowerExpand, and FullSimplify again to get a result with a slightly smaller LeafCount but I feel like this is a very ugly thing to do:

Integrate[newIntegrand, x] // FullSimplify // PowerExpand // FullSimplify

enter image description here

$\endgroup$
1
$\begingroup$

This does the job in 14 on Windows 10.

Integrate[ FullSimplify[ TrigExpand[Cot[1/2*ArcSec[x]]^2/
Sqrt[Tan[1/2*ArcCsc[x]]]]], x]
LeafCount[%]

7693

Addition. Sorry for the bad copy&paste. My code is

Integrate[TrigExpand[Cot[1/2*ArcSec[x]]^2/
Sqrt[Tan[1/2*ArcCsc[x]]]],   x];
LeafCount[%]

560

FullSimplify[%%]

-((2 (Sqrt[ x - Sqrt[1 - 1/x^2] x] (6 + (4 - Sqrt[1 - 1/x^2]) x + 12 (-1 + Sqrt[1 - 1/x^2]) x^2 + 6 (-1 + Sqrt[1 - 1/x^2]) x^3) + 12 x (-3 + Sqrt[ 1 - 1/x^2] + (4 - 4 Sqrt[1 - 1/x^2]) x^2) ArcTanh[Sqrt[ x - Sqrt[1 - 1/x^2] x]]))/(3 x (-3 + Sqrt[1 - 1/x^2] + 4 x^2 - 4 Sqrt[x^2] Sqrt[-1 + x^2])))

$\endgroup$
2
  • 2
    $\begingroup$ FullSimplify[ TrigExpand[...]] returns the original integrand. It's a red herring. $\endgroup$
    – Michael E2
    Commented Jun 12 at 16:01
  • 1
    $\begingroup$ I'm out of MMA at the moment so I'll try to response later. $\endgroup$
    – user64494
    Commented Jun 12 at 16:14

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.