\(\int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx\) [43]

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

Optimal result

Integrand size = 19, antiderivative size = 67 \[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {4 a^3 \log (1-\cos (c+d x))}{d}-\frac {4 a^3 \log (\cos (c+d x))}{d}+\frac {3 a^3 \sec (c+d x)}{d}+\frac {a^3 \sec ^2(c+d x)}{2 d} \] Output:

4*a^3*ln(1-cos(d*x+c))/d-4*a^3*ln(cos(d*x+c))/d+3*a^3*sec(d*x+c)/d+1/2*a^3 
*sec(d*x+c)^2/d
 

Mathematica [A] (verified)

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

Integrate[Csc[c + d*x]*(a + a*Sec[c + d*x])^3,x]
 

Output:

(a^3*(1 + 6*Cos[c + d*x] - 4*Log[Cos[c + d*x]] - 4*Cos[2*(c + d*x)]*(Log[C 
os[c + d*x]] - 2*Log[Sin[(c + d*x)/2]]) + 8*Log[Sin[(c + d*x)/2]])*Sec[c + 
 d*x]^2)/(2*d)
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.99, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.579, Rules used = {3042, 4360, 25, 25, 3042, 25, 3315, 25, 27, 99, 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 \csc (c+d x) (a \sec (c+d x)+a)^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a-a \csc \left (c+d x-\frac {\pi }{2}\right )\right )^3}{\cos \left (c+d x-\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 4360

\(\displaystyle \int \csc (c+d x) \sec ^3(c+d x) \left (-(a (-\cos (c+d x))-a)^3\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int -(\cos (c+d x) a+a)^3 \csc (c+d x) \sec ^3(c+d x)dx\)

\(\Big \downarrow \) 25

\(\displaystyle \int \csc (c+d x) \sec ^3(c+d x) (a \cos (c+d x)+a)^3dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\left (a-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )^3}{\sin \left (c+d x-\frac {\pi }{2}\right )^3 \cos \left (c+d x-\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\left (a-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )^3}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right ) \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}dx\)

\(\Big \downarrow \) 3315

\(\displaystyle \frac {a \int -\frac {(\cos (c+d x) a+a)^2 \sec ^3(c+d x)}{a-a \cos (c+d x)}d(a \cos (c+d x))}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {a \int \frac {(\cos (c+d x) a+a)^2 \sec ^3(c+d x)}{a-a \cos (c+d x)}d(a \cos (c+d x))}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^4 \int \frac {(\cos (c+d x) a+a)^2 \sec ^3(c+d x)}{a^3 (a-a \cos (c+d x))}d(a \cos (c+d x))}{d}\)

\(\Big \downarrow \) 99

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {a^4 \left (-\frac {\sec ^2(c+d x)}{2 a}-\frac {3 \sec (c+d x)}{a}+\frac {4 \log (a \cos (c+d x))}{a}-\frac {4 \log (a-a \cos (c+d x))}{a}\right )}{d}\)

Input:

Int[Csc[c + d*x]*(a + a*Sec[c + d*x])^3,x]
 

Output:

-((a^4*((4*Log[a*Cos[c + d*x]])/a - (4*Log[a - a*Cos[c + d*x]])/a - (3*Sec 
[c + d*x])/a - Sec[c + d*x]^2/(2*a)))/d)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

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

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

rule 3315
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, 
 x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege 
rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
 

rule 4360
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si 
n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
 
Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.34

method result size
derivativedivides \(\frac {a^{3} \left (\frac {1}{2 \cos \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+3 a^{3} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+3 a^{3} \ln \left (\tan \left (d x +c \right )\right )+a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}\) \(90\)
default \(\frac {a^{3} \left (\frac {1}{2 \cos \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+3 a^{3} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+3 a^{3} \ln \left (\tan \left (d x +c \right )\right )+a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}\) \(90\)
risch \(\frac {2 a^{3} \left (3 \,{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {8 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {4 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(95\)
norman \(\frac {\frac {6 a^{3}}{d}-\frac {4 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}+\frac {8 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {4 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(104\)
parallelrisch \(\frac {-8 a^{3} \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\left (-16 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (2 d x +2 c \right )+8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (2 d x +2 c \right )-12 \cos \left (d x +c \right )-5 \cos \left (2 d x +2 c \right )-16 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-7\right ) a^{3}}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) \(144\)

Input:

int(csc(d*x+c)*(a+a*sec(d*x+c))^3,x,method=_RETURNVERBOSE)
 

Output:

1/d*(a^3*(1/2/cos(d*x+c)^2+ln(tan(d*x+c)))+3*a^3*(1/cos(d*x+c)+ln(csc(d*x+ 
c)-cot(d*x+c)))+3*a^3*ln(tan(d*x+c))+a^3*ln(csc(d*x+c)-cot(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.13 \[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=-\frac {8 \, a^{3} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) - 8 \, a^{3} \cos \left (d x + c\right )^{2} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 6 \, a^{3} \cos \left (d x + c\right ) - a^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \] Input:

integrate(csc(d*x+c)*(a+a*sec(d*x+c))^3,x, algorithm="fricas")
 

Output:

-1/2*(8*a^3*cos(d*x + c)^2*log(-cos(d*x + c)) - 8*a^3*cos(d*x + c)^2*log(- 
1/2*cos(d*x + c) + 1/2) - 6*a^3*cos(d*x + c) - a^3)/(d*cos(d*x + c)^2)
 

Sympy [F]

\[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=a^{3} \left (\int 3 \csc {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \csc {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \csc {\left (c + d x \right )}\, dx\right ) \] Input:

integrate(csc(d*x+c)*(a+a*sec(d*x+c))**3,x)
 

Output:

a**3*(Integral(3*csc(c + d*x)*sec(c + d*x), x) + Integral(3*csc(c + d*x)*s 
ec(c + d*x)**2, x) + Integral(csc(c + d*x)*sec(c + d*x)**3, x) + Integral( 
csc(c + d*x), x))
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.84 \[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {8 \, a^{3} \log \left (\cos \left (d x + c\right ) - 1\right ) - 8 \, a^{3} \log \left (\cos \left (d x + c\right )\right ) + \frac {6 \, a^{3} \cos \left (d x + c\right ) + a^{3}}{\cos \left (d x + c\right )^{2}}}{2 \, d} \] Input:

integrate(csc(d*x+c)*(a+a*sec(d*x+c))^3,x, algorithm="maxima")
 

Output:

1/2*(8*a^3*log(cos(d*x + c) - 1) - 8*a^3*log(cos(d*x + c)) + (6*a^3*cos(d* 
x + c) + a^3)/cos(d*x + c)^2)/d
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.94 \[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {4 \, a^{3} \log \left ({\left | \cos \left (d x + c\right ) - 1 \right |}\right )}{d} - \frac {4 \, a^{3} \log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{d} + \frac {6 \, a^{3} \cos \left (d x + c\right ) + a^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \] Input:

integrate(csc(d*x+c)*(a+a*sec(d*x+c))^3,x, algorithm="giac")
 

Output:

4*a^3*log(abs(cos(d*x + c) - 1))/d - 4*a^3*log(abs(cos(d*x + c)))/d + 1/2* 
(6*a^3*cos(d*x + c) + a^3)/(d*cos(d*x + c)^2)
 

Mupad [B] (verification not implemented)

Time = 10.37 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.73 \[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {3\,a^3\,\cos \left (c+d\,x\right )+\frac {a^3}{2}}{d\,{\cos \left (c+d\,x\right )}^2}-\frac {8\,a^3\,\mathrm {atanh}\left (2\,\cos \left (c+d\,x\right )-1\right )}{d} \] Input:

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

Output:

(3*a^3*cos(c + d*x) + a^3/2)/(d*cos(c + d*x)^2) - (8*a^3*atanh(2*cos(c + d 
*x) - 1))/d
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 144, normalized size of antiderivative = 2.15 \[ \int \csc (c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {a^{3} \left (-6 \cos \left (d x +c \right )-8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2}+8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2}+8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+16 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2}-16 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7 \sin \left (d x +c \right )^{2}+6\right )}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:

int(csc(d*x+c)*(a+a*sec(d*x+c))^3,x)
 

Output:

(a**3*( - 6*cos(c + d*x) - 8*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2 + 8 
*log(tan((c + d*x)/2) - 1) - 8*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2 + 
 8*log(tan((c + d*x)/2) + 1) + 16*log(tan((c + d*x)/2))*sin(c + d*x)**2 - 
16*log(tan((c + d*x)/2)) - 7*sin(c + d*x)**2 + 6))/(2*d*(sin(c + d*x)**2 - 
 1))