Integrand size = 21, antiderivative size = 69 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^3}{d (a-a \cos (c+d x))}+\frac {2 a^2 \log (1-\cos (c+d x))}{d}-\frac {2 a^2 \log (\cos (c+d x))}{d}+\frac {a^2 \sec (c+d x)}{d} \] Output:
-a^3/d/(a-a*cos(d*x+c))+2*a^2*ln(1-cos(d*x+c))/d-2*a^2*ln(cos(d*x+c))/d+a^ 2*sec(d*x+c)/d
Time = 0.37 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.09 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^2 (1+\cos (c+d x))^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \left (\csc ^2\left (\frac {1}{2} (c+d x)\right )+4 \log (\cos (c+d x))-8 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 \sec (c+d x)\right )}{8 d} \] Input:
Integrate[Csc[c + d*x]^3*(a + a*Sec[c + d*x])^2,x]
Output:
-1/8*(a^2*(1 + Cos[c + d*x])^2*Sec[(c + d*x)/2]^4*(Csc[(c + d*x)/2]^2 + 4* Log[Cos[c + d*x]] - 8*Log[Sin[(c + d*x)/2]] - 2*Sec[c + d*x]))/d
Time = 0.40 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.99, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4360, 3042, 3315, 27, 54, 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 ^3(c+d x) (a \sec (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a-a \csc \left (c+d x-\frac {\pi }{2}\right )\right )^2}{\cos \left (c+d x-\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int \csc ^3(c+d x) \sec ^2(c+d x) (a (-\cos (c+d x))-a)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \sin \left (c+d x-\frac {\pi }{2}\right )-a\right )^2}{\sin \left (c+d x-\frac {\pi }{2}\right )^2 \cos \left (c+d x-\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {a^3 \int \frac {\sec ^2(c+d x)}{(a-a \cos (c+d x))^2}d(-a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a^5 \int \frac {\sec ^2(c+d x)}{a^2 (a-a \cos (c+d x))^2}d(-a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle \frac {a^5 \int \left (\frac {\sec ^2(c+d x)}{a^4}+\frac {2 \sec (c+d x)}{a^4}+\frac {2}{a^3 (a-a \cos (c+d x))}+\frac {1}{a^2 (a-a \cos (c+d x))^2}\right )d(-a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^5 \left (\frac {\sec (c+d x)}{a^3}-\frac {2 \log (-a \cos (c+d x))}{a^3}+\frac {2 \log (a-a \cos (c+d x))}{a^3}-\frac {1}{a^2 (a-a \cos (c+d x))}\right )}{d}\) |
Input:
Int[Csc[c + d*x]^3*(a + a*Sec[c + d*x])^2,x]
Output:
(a^5*(-(1/(a^2*(a - a*Cos[c + d*x]))) - (2*Log[-(a*Cos[c + d*x])])/a^3 + ( 2*Log[a - a*Cos[c + d*x]])/a^3 + Sec[c + d*x]/a^3))/d
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
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]
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]
Time = 0.23 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.38
method | result | size |
parallelrisch | \(-\frac {2 a^{2} \left (\cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-2 \cos \left (d x +c \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {3 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\cos \left (d x +c \right )-\frac {2}{3}\right )}{4}\right )}{d \cos \left (d x +c \right )}\) | \(95\) |
risch | \(\frac {4 a^{2} \left ({\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {4 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {2 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(106\) |
norman | \(\frac {\frac {a^{2}}{2 d}-\frac {5 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}+\frac {4 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(115\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+2 a^{2} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(117\) |
default | \(\frac {a^{2} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+2 a^{2} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(117\) |
Input:
int(csc(d*x+c)^3*(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
-2*a^2*(cos(d*x+c)*ln(tan(1/2*d*x+1/2*c)-1)+cos(d*x+c)*ln(tan(1/2*d*x+1/2* c)+1)-2*cos(d*x+c)*ln(tan(1/2*d*x+1/2*c))+3/4*cot(1/2*d*x+1/2*c)^2*(cos(d* x+c)-2/3))/d/cos(d*x+c)
Time = 0.08 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.62 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 \, a^{2} \cos \left (d x + c\right ) - a^{2} - 2 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (-\cos \left (d x + c\right )\right ) + 2 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right )} \] Input:
integrate(csc(d*x+c)^3*(a+a*sec(d*x+c))^2,x, algorithm="fricas")
Output:
(2*a^2*cos(d*x + c) - a^2 - 2*(a^2*cos(d*x + c)^2 - a^2*cos(d*x + c))*log( -cos(d*x + c)) + 2*(a^2*cos(d*x + c)^2 - a^2*cos(d*x + c))*log(-1/2*cos(d* x + c) + 1/2))/(d*cos(d*x + c)^2 - d*cos(d*x + c))
\[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int 2 \csc ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \csc ^{3}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(csc(d*x+c)**3*(a+a*sec(d*x+c))**2,x)
Output:
a**2*(Integral(2*csc(c + d*x)**3*sec(c + d*x), x) + Integral(csc(c + d*x)* *3*sec(c + d*x)**2, x) + Integral(csc(c + d*x)**3, x))
Time = 0.03 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.99 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - 2 \, a^{2} \log \left (\cos \left (d x + c\right )\right ) + \frac {2 \, a^{2} \cos \left (d x + c\right ) - a^{2}}{\cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )}}{d} \] Input:
integrate(csc(d*x+c)^3*(a+a*sec(d*x+c))^2,x, algorithm="maxima")
Output:
(2*a^2*log(cos(d*x + c) - 1) - 2*a^2*log(cos(d*x + c)) + (2*a^2*cos(d*x + c) - a^2)/(cos(d*x + c)^2 - cos(d*x + c)))/d
Time = 0.12 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.96 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} {\left (\frac {2 \, \log \left ({\left | \cos \left (d x + c\right ) - 1 \right |}\right )}{d} - \frac {2 \, \log \left ({\left | \cos \left (d x + c\right ) \right |}\right )}{d} + \frac {2 \, \cos \left (d x + c\right ) - 1}{{\left (\cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )\right )} d}\right )} \] Input:
integrate(csc(d*x+c)^3*(a+a*sec(d*x+c))^2,x, algorithm="giac")
Output:
a^2*(2*log(abs(cos(d*x + c) - 1))/d - 2*log(abs(cos(d*x + c)))/d + (2*cos( d*x + c) - 1)/((cos(d*x + c)^2 - cos(d*x + c))*d))
Time = 10.22 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.88 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {2\,a^2\,\cos \left (c+d\,x\right )-a^2}{d\,\left (\cos \left (c+d\,x\right )-{\cos \left (c+d\,x\right )}^2\right )}-\frac {4\,a^2\,\mathrm {atanh}\left (2\,\cos \left (c+d\,x\right )-1\right )}{d} \] Input:
int((a + a/cos(c + d*x))^2/sin(c + d*x)^3,x)
Output:
- (2*a^2*cos(c + d*x) - a^2)/(d*(cos(c + d*x) - cos(c + d*x)^2)) - (4*a^2* atanh(2*cos(c + d*x) - 1))/d
Time = 0.16 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.83 \[ \int \csc ^3(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^{2} \left (-4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-8 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+1\right )}{2 \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 )} \] Input:
int(csc(d*x+c)^3*(a+a*sec(d*x+c))^2,x)
Output:
(a**2*( - 4*log(tan((c + d*x)/2) - 1)*tan((c + d*x)/2)**4 + 4*log(tan((c + d*x)/2) - 1)*tan((c + d*x)/2)**2 - 4*log(tan((c + d*x)/2) + 1)*tan((c + d *x)/2)**4 + 4*log(tan((c + d*x)/2) + 1)*tan((c + d*x)/2)**2 + 8*log(tan((c + d*x)/2))*tan((c + d*x)/2)**4 - 8*log(tan((c + d*x)/2))*tan((c + d*x)/2) **2 - 5*tan((c + d*x)/2)**4 + 1))/(2*tan((c + d*x)/2)**2*d*(tan((c + d*x)/ 2)**2 - 1))