Integrand size = 21, antiderivative size = 116 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=a^2 x+\frac {3 a b \text {arctanh}(\sin (c+d x))}{4 d}-\frac {a^2 \tan (c+d x)}{d}-\frac {3 a b \sec (c+d x) \tan (c+d x)}{4 d}+\frac {a^2 \tan ^3(c+d x)}{3 d}+\frac {a b \sec (c+d x) \tan ^3(c+d x)}{2 d}+\frac {b^2 \tan ^5(c+d x)}{5 d} \] Output:
a^2*x+3/4*a*b*arctanh(sin(d*x+c))/d-a^2*tan(d*x+c)/d-3/4*a*b*sec(d*x+c)*ta n(d*x+c)/d+1/3*a^2*tan(d*x+c)^3/d+1/2*a*b*sec(d*x+c)*tan(d*x+c)^3/d+1/5*b^ 2*tan(d*x+c)^5/d
Time = 0.58 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.92 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\frac {60 a^2 \arctan (\tan (c+d x))+45 a b \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (-90 a b \sec ^3(c+d x)+15 a b \sec (c+d x) \left (3+8 \tan ^2(c+d x)\right )+4 \left (-15 a^2+5 a^2 \tan ^2(c+d x)+3 b^2 \tan ^4(c+d x)\right )\right )}{60 d} \] Input:
Integrate[(a + b*Sec[c + d*x])^2*Tan[c + d*x]^4,x]
Output:
(60*a^2*ArcTan[Tan[c + d*x]] + 45*a*b*ArcTanh[Sin[c + d*x]] + Tan[c + d*x] *(-90*a*b*Sec[c + d*x]^3 + 15*a*b*Sec[c + d*x]*(3 + 8*Tan[c + d*x]^2) + 4* (-15*a^2 + 5*a^2*Tan[c + d*x]^2 + 3*b^2*Tan[c + d*x]^4)))/(60*d)
Time = 0.35 (sec) , antiderivative size = 116, 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.143, Rules used = {3042, 4374, 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 \tan ^4(c+d x) (a+b \sec (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2dx\) |
\(\Big \downarrow \) 4374 |
\(\displaystyle \int \left (a^2 \tan ^4(c+d x)+2 a b \tan ^4(c+d x) \sec (c+d x)+b^2 \tan ^4(c+d x) \sec ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \tan ^3(c+d x)}{3 d}-\frac {a^2 \tan (c+d x)}{d}+a^2 x+\frac {3 a b \text {arctanh}(\sin (c+d x))}{4 d}+\frac {a b \tan ^3(c+d x) \sec (c+d x)}{2 d}-\frac {3 a b \tan (c+d x) \sec (c+d x)}{4 d}+\frac {b^2 \tan ^5(c+d x)}{5 d}\) |
Input:
Int[(a + b*Sec[c + d*x])^2*Tan[c + d*x]^4,x]
Output:
a^2*x + (3*a*b*ArcTanh[Sin[c + d*x]])/(4*d) - (a^2*Tan[c + d*x])/d - (3*a* b*Sec[c + d*x]*Tan[c + d*x])/(4*d) + (a^2*Tan[c + d*x]^3)/(3*d) + (a*b*Sec [c + d*x]*Tan[c + d*x]^3)/(2*d) + (b^2*Tan[c + d*x]^5)/(5*d)
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Int[ExpandIntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[ c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]
Time = 1.00 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.11
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )+2 a b \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {b^{2} \sin \left (d x +c \right )^{5}}{5 \cos \left (d x +c \right )^{5}}}{d}\) | \(129\) |
default | \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )+2 a b \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {b^{2} \sin \left (d x +c \right )^{5}}{5 \cos \left (d x +c \right )^{5}}}{d}\) | \(129\) |
parts | \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {b^{2} \tan \left (d x +c \right )^{5}}{5 d}+\frac {2 a b \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(129\) |
risch | \(a^{2} x +\frac {i \left (75 a b \,{\mathrm e}^{9 i \left (d x +c \right )}-120 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+60 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+30 a b \,{\mathrm e}^{7 i \left (d x +c \right )}-360 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-440 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+120 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-30 a b \,{\mathrm e}^{3 i \left (d x +c \right )}-280 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-75 a b \,{\mathrm e}^{i \left (d x +c \right )}-80 a^{2}+12 b^{2}\right )}{30 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {3 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{4 d}+\frac {3 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{4 d}\) | \(213\) |
Input:
int((a+b*sec(d*x+c))^2*tan(d*x+c)^4,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(1/3*tan(d*x+c)^3-tan(d*x+c)+d*x+c)+2*a*b*(1/4*sin(d*x+c)^5/cos(d *x+c)^4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*x+c)^3-3/8*sin(d*x+c)+3/8* ln(sec(d*x+c)+tan(d*x+c)))+1/5*b^2*sin(d*x+c)^5/cos(d*x+c)^5)
Time = 0.12 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.30 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\frac {120 \, a^{2} d x \cos \left (d x + c\right )^{5} + 45 \, a b \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 45 \, a b \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (75 \, a b \cos \left (d x + c\right )^{3} + 4 \, {\left (20 \, a^{2} - 3 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 30 \, a b \cos \left (d x + c\right ) - 4 \, {\left (5 \, a^{2} - 6 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 12 \, b^{2}\right )} \sin \left (d x + c\right )}{120 \, d \cos \left (d x + c\right )^{5}} \] Input:
integrate((a+b*sec(d*x+c))^2*tan(d*x+c)^4,x, algorithm="fricas")
Output:
1/120*(120*a^2*d*x*cos(d*x + c)^5 + 45*a*b*cos(d*x + c)^5*log(sin(d*x + c) + 1) - 45*a*b*cos(d*x + c)^5*log(-sin(d*x + c) + 1) - 2*(75*a*b*cos(d*x + c)^3 + 4*(20*a^2 - 3*b^2)*cos(d*x + c)^4 - 30*a*b*cos(d*x + c) - 4*(5*a^2 - 6*b^2)*cos(d*x + c)^2 - 12*b^2)*sin(d*x + c))/(d*cos(d*x + c)^5)
\[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \tan ^{4}{\left (c + d x \right )}\, dx \] Input:
integrate((a+b*sec(d*x+c))**2*tan(d*x+c)**4,x)
Output:
Integral((a + b*sec(c + d*x))**2*tan(c + d*x)**4, x)
Time = 0.11 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.02 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\frac {24 \, b^{2} \tan \left (d x + c\right )^{5} + 40 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{2} + 15 \, a b {\left (\frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{120 \, d} \] Input:
integrate((a+b*sec(d*x+c))^2*tan(d*x+c)^4,x, algorithm="maxima")
Output:
1/120*(24*b^2*tan(d*x + c)^5 + 40*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d* x + c))*a^2 + 15*a*b*(2*(5*sin(d*x + c)^3 - 3*sin(d*x + c))/(sin(d*x + c)^ 4 - 2*sin(d*x + c)^2 + 1) + 3*log(sin(d*x + c) + 1) - 3*log(sin(d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 220 vs. \(2 (106) = 212\).
Time = 0.47 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.90 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\frac {60 \, {\left (d x + c\right )} a^{2} + 45 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 45 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (60 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 45 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 320 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 210 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 520 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 192 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 320 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 210 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 60 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 45 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{60 \, d} \] Input:
integrate((a+b*sec(d*x+c))^2*tan(d*x+c)^4,x, algorithm="giac")
Output:
1/60*(60*(d*x + c)*a^2 + 45*a*b*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 45*a* b*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(60*a^2*tan(1/2*d*x + 1/2*c)^9 - 45*a*b*tan(1/2*d*x + 1/2*c)^9 - 320*a^2*tan(1/2*d*x + 1/2*c)^7 + 210*a*b*t an(1/2*d*x + 1/2*c)^7 + 520*a^2*tan(1/2*d*x + 1/2*c)^5 - 192*b^2*tan(1/2*d *x + 1/2*c)^5 - 320*a^2*tan(1/2*d*x + 1/2*c)^3 - 210*a*b*tan(1/2*d*x + 1/2 *c)^3 + 60*a^2*tan(1/2*d*x + 1/2*c) + 45*a*b*tan(1/2*d*x + 1/2*c))/(tan(1/ 2*d*x + 1/2*c)^2 - 1)^5)/d
Time = 11.24 (sec) , antiderivative size = 332, normalized size of antiderivative = 2.86 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\frac {\left (2\,a^2-\frac {3\,a\,b}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (7\,a\,b-\frac {32\,a^2}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {52\,a^2}{3}-\frac {32\,b^2}{5}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {32\,a^2}{3}-7\,b\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a^2+\frac {3\,b\,a}{2}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}+\frac {2\,a^2\,\mathrm {atan}\left (\frac {64\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^6+36\,a^4\,b^2}+\frac {36\,a^4\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^6+36\,a^4\,b^2}\right )}{d}+\frac {3\,a\,b\,\mathrm {atanh}\left (\frac {48\,a^5\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{48\,a^5\,b+27\,a^3\,b^3}+\frac {27\,a^3\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{48\,a^5\,b+27\,a^3\,b^3}\right )}{2\,d} \] Input:
int(tan(c + d*x)^4*(a + b/cos(c + d*x))^2,x)
Output:
(tan(c/2 + (d*x)/2)^5*((52*a^2)/3 - (32*b^2)/5) - tan(c/2 + (d*x)/2)^9*((3 *a*b)/2 - 2*a^2) - tan(c/2 + (d*x)/2)^3*(7*a*b + (32*a^2)/3) + tan(c/2 + ( d*x)/2)^7*(7*a*b - (32*a^2)/3) + tan(c/2 + (d*x)/2)*((3*a*b)/2 + 2*a^2))/( d*(5*tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2 )^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1)) + (2*a^2*atan(( 64*a^6*tan(c/2 + (d*x)/2))/(64*a^6 + 36*a^4*b^2) + (36*a^4*b^2*tan(c/2 + ( d*x)/2))/(64*a^6 + 36*a^4*b^2)))/d + (3*a*b*atanh((48*a^5*b*tan(c/2 + (d*x )/2))/(48*a^5*b + 27*a^3*b^3) + (27*a^3*b^3*tan(c/2 + (d*x)/2))/(48*a^5*b + 27*a^3*b^3)))/(2*d)
Time = 0.16 (sec) , antiderivative size = 442, normalized size of antiderivative = 3.81 \[ \int (a+b \sec (c+d x))^2 \tan ^4(c+d x) \, dx=\frac {-45 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4} a b +90 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a b -45 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a b +45 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4} a b -90 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a b +45 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a b +20 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} \tan \left (d x +c \right )^{3} a^{2}-60 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} \tan \left (d x +c \right ) a^{2}+60 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a^{2} d x +75 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b -40 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} \tan \left (d x +c \right )^{3} a^{2}+120 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} \tan \left (d x +c \right ) a^{2}-120 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2} d x -45 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b +20 \cos \left (d x +c \right ) \tan \left (d x +c \right )^{3} a^{2}-60 \cos \left (d x +c \right ) \tan \left (d x +c \right ) a^{2}+60 \cos \left (d x +c \right ) a^{2} d x +12 \sin \left (d x +c \right )^{5} b^{2}}{60 \cos \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{4}-2 \sin \left (d x +c \right )^{2}+1\right )} \] Input:
int((a+b*sec(d*x+c))^2*tan(d*x+c)^4,x)
Output:
( - 45*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4*a*b + 90*cos (c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a*b - 45*cos(c + d*x)* log(tan((c + d*x)/2) - 1)*a*b + 45*cos(c + d*x)*log(tan((c + d*x)/2) + 1)* sin(c + d*x)**4*a*b - 90*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*sin(c + d* x)**2*a*b + 45*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*a*b + 20*cos(c + d*x )*sin(c + d*x)**4*tan(c + d*x)**3*a**2 - 60*cos(c + d*x)*sin(c + d*x)**4*t an(c + d*x)*a**2 + 60*cos(c + d*x)*sin(c + d*x)**4*a**2*d*x + 75*cos(c + d *x)*sin(c + d*x)**3*a*b - 40*cos(c + d*x)*sin(c + d*x)**2*tan(c + d*x)**3* a**2 + 120*cos(c + d*x)*sin(c + d*x)**2*tan(c + d*x)*a**2 - 120*cos(c + d* x)*sin(c + d*x)**2*a**2*d*x - 45*cos(c + d*x)*sin(c + d*x)*a*b + 20*cos(c + d*x)*tan(c + d*x)**3*a**2 - 60*cos(c + d*x)*tan(c + d*x)*a**2 + 60*cos(c + d*x)*a**2*d*x + 12*sin(c + d*x)**5*b**2)/(60*cos(c + d*x)*d*(sin(c + d* x)**4 - 2*sin(c + d*x)**2 + 1))