Optimal. Leaf size=74 \[ \frac {a^2-b^2}{a b^2 d (a+b \sec (c+d x))}+\frac {\left (a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^2 d}+\frac {\log (\cos (c+d x))}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3885, 894} \[ \frac {a^2-b^2}{a b^2 d (a+b \sec (c+d x))}+\frac {\left (a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^2 d}+\frac {\log (\cos (c+d x))}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 894
Rule 3885
Rubi steps
\begin {align*} \int \frac {\tan ^3(c+d x)}{(a+b \sec (c+d x))^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {b^2-x^2}{x (a+x)^2} \, dx,x,b \sec (c+d x)\right )}{b^2 d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{a^2 x}+\frac {a^2-b^2}{a (a+x)^2}+\frac {-a^2-b^2}{a^2 (a+x)}\right ) \, dx,x,b \sec (c+d x)\right )}{b^2 d}\\ &=\frac {\log (\cos (c+d x))}{a^2 d}+\frac {\left (a^2+b^2\right ) \log (a+b \sec (c+d x))}{a^2 b^2 d}+\frac {a^2-b^2}{a b^2 d (a+b \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 62, normalized size = 0.84 \[ -\frac {\frac {b-\frac {b^3}{a^2}}{a \cos (c+d x)+b}-\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b)}{a^2}+\log (\cos (c+d x))}{b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 102, normalized size = 1.38 \[ -\frac {a^{2} b - b^{3} - {\left (a^{2} b + b^{3} + {\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )\right )} \log \left (a \cos \left (d x + c\right ) + b\right ) + {\left (a^{3} \cos \left (d x + c\right ) + a^{2} b\right )} \log \left (-\cos \left (d x + c\right )\right )}{a^{3} b^{2} d \cos \left (d x + c\right ) + a^{2} b^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.03, size = 313, normalized size = 4.23 \[ \frac {\frac {{\left (a^{3} - a^{2} b + a b^{2} - b^{3}\right )} \log \left ({\left | a + b + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} \right |}\right )}{a^{3} b^{2} - a^{2} b^{3}} - \frac {\log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{a^{2}} - \frac {\log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{b^{2}} - \frac {a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3} + \frac {a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{{\left (a + b + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} a^{2} b^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.53, size = 93, normalized size = 1.26 \[ -\frac {1}{d b \left (b +a \cos \left (d x +c \right )\right )}+\frac {b}{d \,a^{2} \left (b +a \cos \left (d x +c \right )\right )}+\frac {\ln \left (b +a \cos \left (d x +c \right )\right )}{d \,b^{2}}+\frac {\ln \left (b +a \cos \left (d x +c \right )\right )}{d \,a^{2}}-\frac {\ln \left (\cos \left (d x +c \right )\right )}{d \,b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.39, size = 74, normalized size = 1.00 \[ -\frac {\frac {a^{2} - b^{2}}{a^{3} b \cos \left (d x + c\right ) + a^{2} b^{2}} + \frac {\log \left (\cos \left (d x + c\right )\right )}{b^{2}} - \frac {{\left (a^{2} + b^{2}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2} b^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.65, size = 124, normalized size = 1.68 \[ \frac {\ln \left (a+b-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )\,\left (\frac {1}{a^2}+\frac {1}{b^2}\right )}{d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a^2\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}{b^2\,d}-\frac {2\,\left (a+b\right )}{a\,b\,d\,\left (\left (b-a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a+b\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^{3}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________