Integrand size = 19, antiderivative size = 60 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=-\frac {a \text {arctanh}(\cos (c+d x))}{2 d}+\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {b \csc (c+d x)}{d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d} \] Output:
-1/2*a*arctanh(cos(d*x+c))/d+b*arctanh(sin(d*x+c))/d-b*csc(d*x+c)/d-1/2*a* cot(d*x+c)*csc(d*x+c)/d
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.05 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.78 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {b \csc (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\sin ^2(c+d x)\right )}{d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \] Input:
Integrate[Csc[c + d*x]^3*(a + b*Tan[c + d*x]),x]
Output:
-1/8*(a*Csc[(c + d*x)/2]^2)/d - (b*Csc[c + d*x]*Hypergeometric2F1[-1/2, 1, 1/2, Sin[c + d*x]^2])/d - (a*Log[Cos[(c + d*x)/2]])/(2*d) + (a*Log[Sin[(c + d*x)/2]])/(2*d) + (a*Sec[(c + d*x)/2]^2)/(8*d)
Time = 0.27 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 4000, 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+b \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \tan (c+d x)}{\sin (c+d x)^3}dx\) |
\(\Big \downarrow \) 4000 |
\(\displaystyle \int \left (a \csc ^3(c+d x)+b \csc ^2(c+d x) \sec (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \text {arctanh}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}+\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {b \csc (c+d x)}{d}\) |
Input:
Int[Csc[c + d*x]^3*(a + b*Tan[c + d*x]),x]
Output:
-1/2*(a*ArcTanh[Cos[c + d*x]])/d + (b*ArcTanh[Sin[c + d*x]])/d - (b*Csc[c + d*x])/d - (a*Cot[c + d*x]*Csc[c + d*x])/(2*d)
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _.), x_Symbol] :> Int[Expand[Sin[e + f*x]^m*(a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Time = 2.13 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.13
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (-\frac {\cot \left (d x +c \right ) \csc \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}\) | \(68\) |
default | \(\frac {b \left (-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a \left (-\frac {\cot \left (d x +c \right ) \csc \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}\) | \(68\) |
risch | \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a -2 b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) | \(142\) |
Input:
int(csc(d*x+c)^3*(a+b*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(b*(-1/sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+a*(-1/2*cot(d*x+c)*csc(d* x+c)+1/2*ln(csc(d*x+c)-cot(d*x+c))))
Leaf count of result is larger than twice the leaf count of optimal. 142 vs. \(2 (56) = 112\).
Time = 0.11 (sec) , antiderivative size = 142, normalized size of antiderivative = 2.37 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=\frac {2 \, a \cos \left (d x + c\right ) - {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, b \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \] Input:
integrate(csc(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="fricas")
Output:
1/4*(2*a*cos(d*x + c) - (a*cos(d*x + c)^2 - a)*log(1/2*cos(d*x + c) + 1/2) + (a*cos(d*x + c)^2 - a)*log(-1/2*cos(d*x + c) + 1/2) + 2*(b*cos(d*x + c) ^2 - b)*log(sin(d*x + c) + 1) - 2*(b*cos(d*x + c)^2 - b)*log(-sin(d*x + c) + 1) + 4*b*sin(d*x + c))/(d*cos(d*x + c)^2 - d)
\[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right ) \csc ^{3}{\left (c + d x \right )}\, dx \] Input:
integrate(csc(d*x+c)**3*(a+b*tan(d*x+c)),x)
Output:
Integral((a + b*tan(c + d*x))*csc(c + d*x)**3, x)
Time = 0.03 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.38 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 2 \, b {\left (\frac {2}{\sin \left (d x + c\right )} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \] Input:
integrate(csc(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="maxima")
Output:
1/4*(a*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - log(cos(d*x + c) + 1) + log( cos(d*x + c) - 1)) - 2*b*(2/sin(d*x + c) - log(sin(d*x + c) + 1) + log(sin (d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 118 vs. \(2 (56) = 112\).
Time = 0.18 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.97 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 8 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 4 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 4 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \] Input:
integrate(csc(d*x+c)^3*(a+b*tan(d*x+c)),x, algorithm="giac")
Output:
1/8*(a*tan(1/2*d*x + 1/2*c)^2 + 8*b*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 8 *b*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 4*a*log(abs(tan(1/2*d*x + 1/2*c))) - 4*b*tan(1/2*d*x + 1/2*c) - (6*a*tan(1/2*d*x + 1/2*c)^2 + 4*b*tan(1/2*d* x + 1/2*c) + a)/tan(1/2*d*x + 1/2*c)^2)/d
Time = 0.88 (sec) , antiderivative size = 149, normalized size of antiderivative = 2.48 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {\frac {a}{2}+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {2\,b\,\mathrm {atanh}\left (\frac {4\,b^2}{2\,a\,b-4\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,b-4\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d} \] Input:
int((a + b*tan(c + d*x))/sin(c + d*x)^3,x)
Output:
(a*tan(c/2 + (d*x)/2)^2)/(8*d) - (a/2 + 2*b*tan(c/2 + (d*x)/2))/(4*d*tan(c /2 + (d*x)/2)^2) - (b*tan(c/2 + (d*x)/2))/(2*d) - (2*b*atanh((4*b^2)/(2*a* b - 4*b^2*tan(c/2 + (d*x)/2)) - (2*a*b*tan(c/2 + (d*x)/2))/(2*a*b - 4*b^2* tan(c/2 + (d*x)/2))))/d + (a*log(tan(c/2 + (d*x)/2)))/(2*d)
Time = 0.15 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.63 \[ \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx=\frac {-\cos \left (d x +c \right ) a -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b +2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a -2 \sin \left (d x +c \right ) b}{2 \sin \left (d x +c \right )^{2} d} \] Input:
int(csc(d*x+c)^3*(a+b*tan(d*x+c)),x)
Output:
( - cos(c + d*x)*a - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b + 2*log (tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b + log(tan((c + d*x)/2))*sin(c + d *x)**2*a - 2*sin(c + d*x)*b)/(2*sin(c + d*x)**2*d)