Integrand size = 21, antiderivative size = 65 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^2 \log (\cos (c+d x))}{d}-\frac {2 a^2 \sec (c+d x)}{d}+\frac {2 a^2 \sec ^3(c+d x)}{3 d}+\frac {a^2 \sec ^4(c+d x)}{4 d} \] Output:
a^2*ln(cos(d*x+c))/d-2*a^2*sec(d*x+c)/d+2/3*a^2*sec(d*x+c)^3/d+1/4*a^2*sec (d*x+c)^4/d
Time = 0.13 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.28 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^2 (-20 \cos (c+d x)+3 (2-4 \cos (3 (c+d x))+3 \log (\cos (c+d x))+4 \cos (2 (c+d x)) \log (\cos (c+d x))+\cos (4 (c+d x)) \log (\cos (c+d x)))) \sec ^4(c+d x)}{24 d} \] Input:
Integrate[(a + a*Sec[c + d*x])^2*Tan[c + d*x]^3,x]
Output:
(a^2*(-20*Cos[c + d*x] + 3*(2 - 4*Cos[3*(c + d*x)] + 3*Log[Cos[c + d*x]] + 4*Cos[2*(c + d*x)]*Log[Cos[c + d*x]] + Cos[4*(c + d*x)]*Log[Cos[c + d*x]] ))*Sec[c + d*x]^4)/(24*d)
Time = 0.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.77, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 25, 4367, 27, 84, 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 ^3(c+d x) (a \sec (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\cot \left (c+d x+\frac {\pi }{2}\right )^3 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^3 \left (\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a\right )^2dx\) |
\(\Big \downarrow \) 4367 |
\(\displaystyle -\frac {\int a^4 (1-\cos (c+d x)) (\cos (c+d x)+1)^3 \sec ^5(c+d x)d\cos (c+d x)}{a^2 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \int (1-\cos (c+d x)) (\cos (c+d x)+1)^3 \sec ^5(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 84 |
\(\displaystyle -\frac {a^2 \int \left (\sec ^5(c+d x)+2 \sec ^4(c+d x)-2 \sec ^2(c+d x)-\sec (c+d x)\right )d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \left (-\frac {1}{4} \sec ^4(c+d x)-\frac {2}{3} \sec ^3(c+d x)+2 \sec (c+d x)-\log (\cos (c+d x))\right )}{d}\) |
Input:
Int[(a + a*Sec[c + d*x])^2*Tan[c + d*x]^3,x]
Output:
-((a^2*(-Log[Cos[c + d*x]] + 2*Sec[c + d*x] - (2*Sec[c + d*x]^3)/3 - Sec[c + d*x]^4/4))/d)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_] : > Int[ExpandIntegrand[(a + b*x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] && !(ILtQ[n + p + 2, 0 ] && GtQ[n + 2*p, 0])
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[1/(a^(m - n - 1)*b^n*d) Subst[Int[(a - b*x)^((m - 1)/2)*((a + b*x)^((m - 1)/2 + n)/x^(m + n)), x], x, Sin[c + d*x]], x] /; Fr eeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && Integer Q[n]
Time = 0.20 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.71
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\sec \left (d x +c \right )^{4}}{4}+\frac {2 \sec \left (d x +c \right )^{3}}{3}-2 \sec \left (d x +c \right )-\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(46\) |
default | \(\frac {a^{2} \left (\frac {\sec \left (d x +c \right )^{4}}{4}+\frac {2 \sec \left (d x +c \right )^{3}}{3}-2 \sec \left (d x +c \right )-\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(46\) |
parts | \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {a^{2} \tan \left (d x +c \right )^{4}}{4 d}+\frac {2 a^{2} \left (\frac {\sec \left (d x +c \right )^{3}}{3}-\sec \left (d x +c \right )\right )}{d}\) | \(76\) |
risch | \(-i a^{2} x -\frac {2 i a^{2} c}{d}-\frac {4 a^{2} \left (3 \,{\mathrm e}^{7 i \left (d x +c \right )}+5 \,{\mathrm e}^{5 i \left (d x +c \right )}-3 \,{\mathrm e}^{4 i \left (d x +c \right )}+5 \,{\mathrm e}^{3 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(115\) |
Input:
int((a+a*sec(d*x+c))^2*tan(d*x+c)^3,x,method=_RETURNVERBOSE)
Output:
a^2/d*(1/4*sec(d*x+c)^4+2/3*sec(d*x+c)^3-2*sec(d*x+c)-ln(sec(d*x+c)))
Time = 0.09 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.00 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {12 \, a^{2} \cos \left (d x + c\right )^{4} \log \left (-\cos \left (d x + c\right )\right ) - 24 \, a^{2} \cos \left (d x + c\right )^{3} + 8 \, a^{2} \cos \left (d x + c\right ) + 3 \, a^{2}}{12 \, d \cos \left (d x + c\right )^{4}} \] Input:
integrate((a+a*sec(d*x+c))^2*tan(d*x+c)^3,x, algorithm="fricas")
Output:
1/12*(12*a^2*cos(d*x + c)^4*log(-cos(d*x + c)) - 24*a^2*cos(d*x + c)^3 + 8 *a^2*cos(d*x + c) + 3*a^2)/(d*cos(d*x + c)^4)
Leaf count of result is larger than twice the leaf count of optimal. 126 vs. \(2 (58) = 116\).
Time = 0.29 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.94 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\begin {cases} - \frac {a^{2} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a^{2} \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{4 d} + \frac {2 a^{2} \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{3 d} + \frac {a^{2} \tan ^{2}{\left (c + d x \right )}}{2 d} - \frac {a^{2} \sec ^{2}{\left (c + d x \right )}}{4 d} - \frac {4 a^{2} \sec {\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \sec {\left (c \right )} + a\right )^{2} \tan ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sec(d*x+c))**2*tan(d*x+c)**3,x)
Output:
Piecewise((-a**2*log(tan(c + d*x)**2 + 1)/(2*d) + a**2*tan(c + d*x)**2*sec (c + d*x)**2/(4*d) + 2*a**2*tan(c + d*x)**2*sec(c + d*x)/(3*d) + a**2*tan( c + d*x)**2/(2*d) - a**2*sec(c + d*x)**2/(4*d) - 4*a**2*sec(c + d*x)/(3*d) , Ne(d, 0)), (x*(a*sec(c) + a)**2*tan(c)**3, True))
Time = 0.03 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.89 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {12 \, a^{2} \log \left (\cos \left (d x + c\right )\right ) - \frac {24 \, a^{2} \cos \left (d x + c\right )^{3} - 8 \, a^{2} \cos \left (d x + c\right ) - 3 \, a^{2}}{\cos \left (d x + c\right )^{4}}}{12 \, d} \] Input:
integrate((a+a*sec(d*x+c))^2*tan(d*x+c)^3,x, algorithm="maxima")
Output:
1/12*(12*a^2*log(cos(d*x + c)) - (24*a^2*cos(d*x + c)^3 - 8*a^2*cos(d*x + c) - 3*a^2)/cos(d*x + c)^4)/d
Time = 0.23 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.91 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {12 \, a^{2} \log \left ({\left | \cos \left (d x + c\right ) \right |}\right ) - \frac {24 \, a^{2} \cos \left (d x + c\right )^{3} - 8 \, a^{2} \cos \left (d x + c\right ) - 3 \, a^{2}}{\cos \left (d x + c\right )^{4}}}{12 \, d} \] Input:
integrate((a+a*sec(d*x+c))^2*tan(d*x+c)^3,x, algorithm="giac")
Output:
1/12*(12*a^2*log(abs(cos(d*x + c))) - (24*a^2*cos(d*x + c)^3 - 8*a^2*cos(d *x + c) - 3*a^2)/cos(d*x + c)^4)/d
Time = 15.08 (sec) , antiderivative size = 133, normalized size of antiderivative = 2.05 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {38\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}-\frac {8\,a^2}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {2\,a^2\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d} \] Input:
int(tan(c + d*x)^3*(a + a/cos(c + d*x))^2,x)
Output:
((38*a^2*tan(c/2 + (d*x)/2)^2)/3 - 8*a^2*tan(c/2 + (d*x)/2)^4 + 2*a^2*tan( c/2 + (d*x)/2)^6 - (8*a^2)/3)/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d* x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) - (2*a^2*ata nh(tan(c/2 + (d*x)/2)^2))/d
Time = 0.17 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.29 \[ \int (a+a \sec (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^{2} \left (-6 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )+3 \sec \left (d x +c \right )^{2} \tan \left (d x +c \right )^{2}-3 \sec \left (d x +c \right )^{2}+8 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{2}-16 \sec \left (d x +c \right )+6 \tan \left (d x +c \right )^{2}\right )}{12 d} \] Input:
int((a+a*sec(d*x+c))^2*tan(d*x+c)^3,x)
Output:
(a**2*( - 6*log(tan(c + d*x)**2 + 1) + 3*sec(c + d*x)**2*tan(c + d*x)**2 - 3*sec(c + d*x)**2 + 8*sec(c + d*x)*tan(c + d*x)**2 - 16*sec(c + d*x) + 6* tan(c + d*x)**2))/(12*d)