\(\int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx\) [234]

Optimal result
Mathematica [C] (verified)
Rubi [C] (verified)
Maple [C] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 19, antiderivative size = 58 \[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=-\frac {\arctan (\cos (c+d x)+\sin (c+d x))}{a d}-\frac {\text {arctanh}\left (\frac {\cos (c+d x)-\sin (c+d x)}{\sqrt {3}}\right )}{\sqrt {3} a d} \] Output:

-arctan(cos(d*x+c)+sin(d*x+c))/a/d-1/3*arctanh(1/3*(cos(d*x+c)-sin(d*x+c)) 
*3^(1/2))*3^(1/2)/a/d
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 2.94 (sec) , antiderivative size = 505, normalized size of antiderivative = 8.71 \[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=\frac {\left (\text {RootSum}\left [-1+4 i e^{2 i c} \text {$\#$1}^2+e^{4 i c} \text {$\#$1}^4\&,\frac {-i \sqrt {3} d \sqrt {e^{-2 i c}} x+\sqrt {3} \sqrt {e^{-2 i c}} \log \left (e^{i d x}-\text {$\#$1}\right )-3 d x \text {$\#$1}-3 i \log \left (e^{i d x}-\text {$\#$1}\right ) \text {$\#$1}-\frac {(2-3 i) \sqrt {3} d x \text {$\#$1}^2}{\sqrt {e^{-2 i c}}}-\frac {(3+2 i) \sqrt {3} \log \left (e^{i d x}-\text {$\#$1}\right ) \text {$\#$1}^2}{\sqrt {e^{-2 i c}}}+3 d e^{2 i c} x \text {$\#$1}^3+3 i e^{2 i c} \log \left (e^{i d x}-\text {$\#$1}\right ) \text {$\#$1}^3}{-1+2 i e^{2 i c} \text {$\#$1}^2}\&\right ]-i \text {RootSum}\left [-1+4 i e^{2 i c} \text {$\#$1}^2+e^{4 i c} \text {$\#$1}^4\&,\frac {i \sqrt {3} d \sqrt {e^{-2 i c}} x-\sqrt {3} \sqrt {e^{-2 i c}} \log \left (e^{i d x}-\text {$\#$1}\right )-3 d x \text {$\#$1}-3 i \log \left (e^{i d x}-\text {$\#$1}\right ) \text {$\#$1}+\frac {(2-3 i) \sqrt {3} d x \text {$\#$1}^2}{\sqrt {e^{-2 i c}}}+\frac {(3+2 i) \sqrt {3} \log \left (e^{i d x}-\text {$\#$1}\right ) \text {$\#$1}^2}{\sqrt {e^{-2 i c}}}+3 d e^{2 i c} x \text {$\#$1}^3+3 i e^{2 i c} \log \left (e^{i d x}-\text {$\#$1}\right ) \text {$\#$1}^3}{i+2 e^{2 i c} \text {$\#$1}^2}\&\right ]\right ) (\cos (c)+i \sin (c))}{12 a d} \] Input:

Integrate[(a*Cos[c + d*x] + a*Csc[c + d*x])^(-1),x]
 

Output:

((RootSum[-1 + (4*I)*E^((2*I)*c)*#1^2 + E^((4*I)*c)*#1^4 & , ((-I)*Sqrt[3] 
*d*Sqrt[E^((-2*I)*c)]*x + Sqrt[3]*Sqrt[E^((-2*I)*c)]*Log[E^(I*d*x) - #1] - 
 3*d*x*#1 - (3*I)*Log[E^(I*d*x) - #1]*#1 - ((2 - 3*I)*Sqrt[3]*d*x*#1^2)/Sq 
rt[E^((-2*I)*c)] - ((3 + 2*I)*Sqrt[3]*Log[E^(I*d*x) - #1]*#1^2)/Sqrt[E^((- 
2*I)*c)] + 3*d*E^((2*I)*c)*x*#1^3 + (3*I)*E^((2*I)*c)*Log[E^(I*d*x) - #1]* 
#1^3)/(-1 + (2*I)*E^((2*I)*c)*#1^2) & ] - I*RootSum[-1 + (4*I)*E^((2*I)*c) 
*#1^2 + E^((4*I)*c)*#1^4 & , (I*Sqrt[3]*d*Sqrt[E^((-2*I)*c)]*x - Sqrt[3]*S 
qrt[E^((-2*I)*c)]*Log[E^(I*d*x) - #1] - 3*d*x*#1 - (3*I)*Log[E^(I*d*x) - # 
1]*#1 + ((2 - 3*I)*Sqrt[3]*d*x*#1^2)/Sqrt[E^((-2*I)*c)] + ((3 + 2*I)*Sqrt[ 
3]*Log[E^(I*d*x) - #1]*#1^2)/Sqrt[E^((-2*I)*c)] + 3*d*E^((2*I)*c)*x*#1^3 + 
 (3*I)*E^((2*I)*c)*Log[E^(I*d*x) - #1]*#1^3)/(I + 2*E^((2*I)*c)*#1^2) & ]) 
*(Cos[c] + I*Sin[c]))/(12*a*d)
 

Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 0.44 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.16, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3042, 4902, 27, 2492, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)}dx\)

\(\Big \downarrow \) 4902

\(\displaystyle \frac {2 \int \frac {2 \tan \left (\frac {1}{2} (c+d x)\right )}{a \left (\tan ^4\left (\frac {1}{2} (c+d x)\right )-2 \tan ^3\left (\frac {1}{2} (c+d x)\right )+2 \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 \tan \left (\frac {1}{2} (c+d x)\right )+1\right )}d\tan \left (\frac {1}{2} (c+d x)\right )}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {4 \int \frac {\tan \left (\frac {1}{2} (c+d x)\right )}{\tan ^4\left (\frac {1}{2} (c+d x)\right )-2 \tan ^3\left (\frac {1}{2} (c+d x)\right )+2 \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 \tan \left (\frac {1}{2} (c+d x)\right )+1}d\tan \left (\frac {1}{2} (c+d x)\right )}{a d}\)

\(\Big \downarrow \) 2492

\(\displaystyle \frac {4 \int \left (\frac {1}{2 \sqrt {3} \left (-i \tan ^2\left (\frac {1}{2} (c+d x)\right )+\left (i+\sqrt {3}\right ) \tan \left (\frac {1}{2} (c+d x)\right )+i\right )}-\frac {1}{2 \sqrt {3} \left (-i \tan ^2\left (\frac {1}{2} (c+d x)\right )+\left (i-\sqrt {3}\right ) \tan \left (\frac {1}{2} (c+d x)\right )+i\right )}\right )d\tan \left (\frac {1}{2} (c+d x)\right )}{a d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {4 \left (\frac {1}{12} \left (3+i \sqrt {3}\right ) \arctan \left (\frac {-2 i \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt {3}+i}{\sqrt {2 \left (1-i \sqrt {3}\right )}}\right )-\frac {1}{12} \left (3-i \sqrt {3}\right ) \arctan \left (\frac {-2 i \tan \left (\frac {1}{2} (c+d x)\right )-\sqrt {3}+i}{\sqrt {2 \left (1+i \sqrt {3}\right )}}\right )\right )}{a d}\)

Input:

Int[(a*Cos[c + d*x] + a*Csc[c + d*x])^(-1),x]
 

Output:

(4*(-1/12*((3 - I*Sqrt[3])*ArcTan[(I - Sqrt[3] - (2*I)*Tan[(c + d*x)/2])/S 
qrt[2*(1 + I*Sqrt[3])]]) + ((3 + I*Sqrt[3])*ArcTan[(I + Sqrt[3] - (2*I)*Ta 
n[(c + d*x)/2])/Sqrt[2*(1 - I*Sqrt[3])]])/12))/(a*d)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2492
Int[(Px_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2 + (d_.)*(x_)^3 + (e_.)*(x_)^4) 
^(p_), x_Symbol] :> Simp[e^p   Int[ExpandIntegrand[Px*(b/d + ((d + Sqrt[e*( 
(b^2 - 4*a*c)/a) + 8*a*d*(e/b)])/(2*e))*x + x^2)^p*(b/d + ((d - Sqrt[e*((b^ 
2 - 4*a*c)/a) + 8*a*d*(e/b)])/(2*e))*x + x^2)^p, x], x], x] /; FreeQ[{a, b, 
 c, d, e}, x] && PolyQ[Px, x] && ILtQ[p, 0] && EqQ[a*d^2 - b^2*e, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4902
Int[u_, x_Symbol] :> With[{w = Block[{$ShowSteps = False, $StepCounter = Nu 
ll}, Int[SubstFor[1/(1 + FreeFactors[Tan[FunctionOfTrig[u, x]/2], x]^2*x^2) 
, Tan[FunctionOfTrig[u, x]/2]/FreeFactors[Tan[FunctionOfTrig[u, x]/2], x], 
u, x], x]]}, Module[{v = FunctionOfTrig[u, x], d}, Simp[d = FreeFactors[Tan 
[v/2], x]; 2*(d/Coefficient[v, x, 1])   Subst[Int[SubstFor[1/(1 + d^2*x^2), 
 Tan[v/2]/d, u, x], x], x, Tan[v/2]/d], x]] /; CalculusFreeQ[w, x]] /; Inve 
rseFunctionFreeQ[u, x] &&  !FalseQ[FunctionOfTrig[u, x]]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.57 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.10

method result size
derivativedivides \(\frac {2 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-2 \textit {\_Z}^{3}+2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )}{\sum }\frac {\textit {\_R} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{2 \textit {\_R}^{3}-3 \textit {\_R}^{2}+2 \textit {\_R} +1}\right )}{d a}\) \(64\)
default \(\frac {2 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-2 \textit {\_Z}^{3}+2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )}{\sum }\frac {\textit {\_R} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{2 \textit {\_R}^{3}-3 \textit {\_R}^{2}+2 \textit {\_R} +1}\right )}{d a}\) \(64\)
risch \(\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {1}{2}-\frac {i}{2}+\frac {i \sqrt {3}}{2}-\frac {\sqrt {3}}{2}\right )}{2 d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {1}{2}-\frac {i}{2}+\frac {i \sqrt {3}}{2}-\frac {\sqrt {3}}{2}\right ) \sqrt {3}}{6 d a}+\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {1}{2}-\frac {i}{2}-\frac {i \sqrt {3}}{2}+\frac {\sqrt {3}}{2}\right )}{2 d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {1}{2}-\frac {i}{2}-\frac {i \sqrt {3}}{2}+\frac {\sqrt {3}}{2}\right ) \sqrt {3}}{6 d a}-\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {1}{2}+\frac {i}{2}+\frac {i \sqrt {3}}{2}-\frac {\sqrt {3}}{2}\right )}{2 d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {1}{2}+\frac {i}{2}+\frac {i \sqrt {3}}{2}-\frac {\sqrt {3}}{2}\right ) \sqrt {3}}{6 d a}-\frac {i \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {1}{2}+\frac {i}{2}-\frac {i \sqrt {3}}{2}+\frac {\sqrt {3}}{2}\right )}{2 d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {1}{2}+\frac {i}{2}-\frac {i \sqrt {3}}{2}+\frac {\sqrt {3}}{2}\right ) \sqrt {3}}{6 d a}\) \(282\)

Input:

int(1/(cos(d*x+c)*a+a*csc(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

2/d/a*sum(_R/(2*_R^3-3*_R^2+2*_R+1)*ln(tan(1/2*d*x+1/2*c)-_R),_R=RootOf(_Z 
^4-2*_Z^3+2*_Z^2+2*_Z+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (55) = 110\).

Time = 0.09 (sec) , antiderivative size = 254, normalized size of antiderivative = 4.38 \[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=-\frac {\sqrt {\frac {1}{3}} a d \sqrt {\frac {1}{a^{2} d^{2}}} \log \left (-\frac {3}{2} \, \sqrt {\frac {1}{3}} {\left (a d \cos \left (d x + c\right ) - a d \sin \left (d x + c\right )\right )} \sqrt {\frac {1}{a^{2} d^{2}}} + \frac {1}{2} \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 1\right ) - \sqrt {\frac {1}{3}} a d \sqrt {\frac {1}{a^{2} d^{2}}} \log \left (-\frac {3}{2} \, \sqrt {\frac {1}{3}} {\left (a d \cos \left (d x + c\right ) - a d \sin \left (d x + c\right )\right )} \sqrt {\frac {1}{a^{2} d^{2}}} - \frac {1}{2} \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 1\right ) - 2 \, \arctan \left (-\frac {3 \, \sqrt {\frac {1}{3}} {\left (a d \cos \left (d x + c\right ) - a d \sin \left (d x + c\right )\right )} \sqrt {\frac {1}{a^{2} d^{2}}} + 2}{\cos \left (d x + c\right ) + \sin \left (d x + c\right )}\right ) + 2 \, \arctan \left (-\frac {3 \, \sqrt {\frac {1}{3}} {\left (a d \cos \left (d x + c\right ) - a d \sin \left (d x + c\right )\right )} \sqrt {\frac {1}{a^{2} d^{2}}} - 2}{\cos \left (d x + c\right ) + \sin \left (d x + c\right )}\right )}{4 \, a d} \] Input:

integrate(1/(a*cos(d*x+c)+a*csc(d*x+c)),x, algorithm="fricas")
 

Output:

-1/4*(sqrt(1/3)*a*d*sqrt(1/(a^2*d^2))*log(-3/2*sqrt(1/3)*(a*d*cos(d*x + c) 
 - a*d*sin(d*x + c))*sqrt(1/(a^2*d^2)) + 1/2*cos(d*x + c)*sin(d*x + c) - 1 
) - sqrt(1/3)*a*d*sqrt(1/(a^2*d^2))*log(-3/2*sqrt(1/3)*(a*d*cos(d*x + c) - 
 a*d*sin(d*x + c))*sqrt(1/(a^2*d^2)) - 1/2*cos(d*x + c)*sin(d*x + c) + 1) 
- 2*arctan(-(3*sqrt(1/3)*(a*d*cos(d*x + c) - a*d*sin(d*x + c))*sqrt(1/(a^2 
*d^2)) + 2)/(cos(d*x + c) + sin(d*x + c))) + 2*arctan(-(3*sqrt(1/3)*(a*d*c 
os(d*x + c) - a*d*sin(d*x + c))*sqrt(1/(a^2*d^2)) - 2)/(cos(d*x + c) + sin 
(d*x + c))))/(a*d)
 

Sympy [F]

\[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=\frac {\int \frac {1}{\cos {\left (c + d x \right )} + \csc {\left (c + d x \right )}}\, dx}{a} \] Input:

integrate(1/(a*cos(d*x+c)+a*csc(d*x+c)),x)
 

Output:

Integral(1/(cos(c + d*x) + csc(c + d*x)), x)/a
 

Maxima [F]

\[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=\int { \frac {1}{a \cos \left (d x + c\right ) + a \csc \left (d x + c\right )} \,d x } \] Input:

integrate(1/(a*cos(d*x+c)+a*csc(d*x+c)),x, algorithm="maxima")
 

Output:

integrate(1/(a*cos(d*x + c) + a*csc(d*x + c)), x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (55) = 110\).

Time = 0.12 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.10 \[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=\frac {3 \, \pi + \sqrt {3} \log \left ({\left (\sqrt {3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right ) - \sqrt {3} \log \left ({\left (\sqrt {3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right ) + 6 \, \arctan \left (-{\left (\sqrt {3} + 1\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) + 6 \, \arctan \left ({\left (\sqrt {3} - 1\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{6 \, a d} \] Input:

integrate(1/(a*cos(d*x+c)+a*csc(d*x+c)),x, algorithm="giac")
 

Output:

1/6*(3*pi + sqrt(3)*log((sqrt(3) + tan(1/2*d*x + 1/2*c) - 1)^2 + tan(1/2*d 
*x + 1/2*c)^2) - sqrt(3)*log((sqrt(3) - tan(1/2*d*x + 1/2*c) + 1)^2 + tan( 
1/2*d*x + 1/2*c)^2) + 6*arctan(-(sqrt(3) + 1)*tan(1/2*d*x + 1/2*c) - 1) + 
6*arctan((sqrt(3) - 1)*tan(1/2*d*x + 1/2*c) - 1))/(a*d)
 

Mupad [B] (verification not implemented)

Time = 15.22 (sec) , antiderivative size = 316, normalized size of antiderivative = 5.45 \[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=-\frac {\mathrm {atan}\left (\frac {-3\,a\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {\frac {-1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}+\sqrt {3}\,a\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {\frac {-1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}\,2{}\mathrm {i}+\sqrt {3}\,a\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {\frac {-1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}\,3{}\mathrm {i}}{\sqrt {3}\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,4{}\mathrm {i}}\right )\,\sqrt {\frac {-1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}\,2{}\mathrm {i}}{d}+\frac {\mathrm {atan}\left (\frac {3\,a\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-\frac {1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}+\sqrt {3}\,a\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-\frac {1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}\,2{}\mathrm {i}+\sqrt {3}\,a\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-\frac {1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}\,3{}\mathrm {i}}{-\sqrt {3}\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,4{}\mathrm {i}}\right )\,\sqrt {-\frac {1+\sqrt {3}\,1{}\mathrm {i}}{6\,a^2}}\,2{}\mathrm {i}}{d} \] Input:

int(1/(a*cos(c + d*x) + a/sin(c + d*x)),x)
 

Output:

(atan((3*a*sin(c/2 + (d*x)/2)*(-(3^(1/2)*1i + 1)/(6*a^2))^(1/2) + 3^(1/2)* 
a*cos(c/2 + (d*x)/2)*(-(3^(1/2)*1i + 1)/(6*a^2))^(1/2)*2i + 3^(1/2)*a*sin( 
c/2 + (d*x)/2)*(-(3^(1/2)*1i + 1)/(6*a^2))^(1/2)*3i)/(cos(c/2 + (d*x)/2)*1 
i + sin(c/2 + (d*x)/2)*4i - 3^(1/2)*cos(c/2 + (d*x)/2)))*(-(3^(1/2)*1i + 1 
)/(6*a^2))^(1/2)*2i)/d - (atan((3^(1/2)*a*cos(c/2 + (d*x)/2)*((3^(1/2)*1i 
- 1)/(6*a^2))^(1/2)*2i - 3*a*sin(c/2 + (d*x)/2)*((3^(1/2)*1i - 1)/(6*a^2)) 
^(1/2) + 3^(1/2)*a*sin(c/2 + (d*x)/2)*((3^(1/2)*1i - 1)/(6*a^2))^(1/2)*3i) 
/(cos(c/2 + (d*x)/2)*1i + sin(c/2 + (d*x)/2)*4i + 3^(1/2)*cos(c/2 + (d*x)/ 
2)))*((3^(1/2)*1i - 1)/(6*a^2))^(1/2)*2i)/d
 

Reduce [F]

\[ \int \frac {1}{a \cos (c+d x)+a \csc (c+d x)} \, dx=\frac {\int \frac {1}{\cos \left (d x +c \right )+\csc \left (d x +c \right )}d x}{a} \] Input:

int(1/(a*cos(d*x+c)+a*csc(d*x+c)),x)
 

Output:

int(1/(cos(c + d*x) + csc(c + d*x)),x)/a