\(\int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx\) [776]

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 = 27, antiderivative size = 79 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{a d}+\frac {\sec (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}-\frac {\tan (c+d x)}{a d}-\frac {\tan ^3(c+d x)}{3 a d} \] Output:

-arctanh(cos(d*x+c))/a/d+sec(d*x+c)/a/d+1/3*sec(d*x+c)^3/a/d-tan(d*x+c)/a/ 
d-1/3*tan(d*x+c)^3/a/d
 

Mathematica [A] (verified)

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

Integrate[(Csc[c + d*x]*Sec[c + d*x]^2)/(a + a*Sin[c + d*x]),x]
 

Output:

(-6*Log[Cos[(c + d*x)/2]] + 6*Log[Sin[(c + d*x)/2]] + (Cos[(c + d*x)/2] + 
Sin[(c + d*x)/2])^(-2) + Sin[(c + d*x)/2]*(3/(Cos[(c + d*x)/2] - Sin[(c + 
d*x)/2]) - 2/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3 - 11/(Cos[(c + d*x)/2 
] + Sin[(c + d*x)/2])))/(6*a*d)
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.81, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3318, 3042, 3102, 25, 254, 2009, 4254, 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 {\csc (c+d x) \sec ^2(c+d x)}{a \sin (c+d x)+a} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3318

\(\displaystyle \frac {\int \csc (c+d x) \sec ^4(c+d x)dx}{a}-\frac {\int \sec ^4(c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3102

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 254

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\text {arctanh}(\sec (c+d x))+\frac {1}{3} \sec ^3(c+d x)+\sec (c+d x)}{a d}-\frac {\int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx}{a}\)

\(\Big \downarrow \) 4254

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\text {arctanh}(\sec (c+d x))+\frac {1}{3} \sec ^3(c+d x)+\sec (c+d x)}{a d}+\frac {-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)}{a d}\)

Input:

Int[(Csc[c + d*x]*Sec[c + d*x]^2)/(a + a*Sin[c + d*x]),x]
 

Output:

(-ArcTanh[Sec[c + d*x]] + Sec[c + d*x] + Sec[c + d*x]^3/3)/(a*d) + (-Tan[c 
 + d*x] - Tan[c + d*x]^3/3)/(a*d)
 

Defintions of rubi rules used

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

rule 254
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, 
 a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
 

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 3102
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_S 
ymbol] :> Simp[1/(f*a^n)   Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/ 
2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1 
)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
 

rule 3318
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( 
n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g^2/a   Int 
[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Simp[g^2/(b*d)   Int 
[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, 
d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0]
 

rule 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 
Maple [A] (verified)

Time = 0.45 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00

method result size
derivativedivides \(\frac {\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) \(79\)
default \(\frac {\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) \(79\)
norman \(\frac {-\frac {8}{3 a d}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d a}-\frac {10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) \(91\)
parallelrisch \(\frac {3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8}{3 d a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}\) \(97\)
risch \(\frac {4 i {\mathrm e}^{2 i \left (d x +c \right )}+2 \,{\mathrm e}^{3 i \left (d x +c \right )}+\frac {4 i}{3}+\frac {2 \,{\mathrm e}^{i \left (d x +c \right )}}{3}}{\left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}\) \(112\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [F]

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

integrate(csc(d*x+c)*sec(d*x+c)**2/(a+a*sin(d*x+c)),x)
 

Output:

Integral(csc(c + d*x)*sec(c + d*x)**2/(sin(c + d*x) + 1), x)/a
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.05 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {6 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {3}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} + \frac {15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 13}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \] Input:

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

Output:

1/6*(6*log(abs(tan(1/2*d*x + 1/2*c)))/a - 3/(a*(tan(1/2*d*x + 1/2*c) - 1)) 
 + (15*tan(1/2*d*x + 1/2*c)^2 + 24*tan(1/2*d*x + 1/2*c) + 13)/(a*(tan(1/2* 
d*x + 1/2*c) + 1)^3))/d
 

Mupad [B] (verification not implemented)

Time = 32.40 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.16 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {10\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {8}{3}}{d\,\left (-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )} \] Input:

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

Output:

log(tan(c/2 + (d*x)/2))/(a*d) + ((10*tan(c/2 + (d*x)/2))/3 - 2*tan(c/2 + ( 
d*x)/2)^3 + 8/3)/(d*(a + 2*a*tan(c/2 + (d*x)/2) - 2*a*tan(c/2 + (d*x)/2)^3 
 - a*tan(c/2 + (d*x)/2)^4))
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.33 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {3 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )+3 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\cos \left (d x +c \right ) \sin \left (d x +c \right )+\cos \left (d x +c \right )-2 \sin \left (d x +c \right )^{2}+\sin \left (d x +c \right )+4}{3 \cos \left (d x +c \right ) a d \left (\sin \left (d x +c \right )+1\right )} \] Input:

int(csc(d*x+c)*sec(d*x+c)^2/(a+a*sin(d*x+c)),x)
 

Output:

(3*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x) + 3*cos(c + d*x)*log(ta 
n((c + d*x)/2)) + cos(c + d*x)*sin(c + d*x) + cos(c + d*x) - 2*sin(c + d*x 
)**2 + sin(c + d*x) + 4)/(3*cos(c + d*x)*a*d*(sin(c + d*x) + 1))