Optimal. Leaf size=78 \[ -\frac {(b c-a d)^3 \log (c+d \tan (x))}{d^4}+\frac {b \tan (x) (b c-a d)^2}{d^3}-\frac {(b c-a d) (a+b \tan (x))^2}{2 d^2}+\frac {(a+b \tan (x))^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 78, 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 = {4342, 43} \[ \frac {b \tan (x) (b c-a d)^2}{d^3}-\frac {(b c-a d) (a+b \tan (x))^2}{2 d^2}-\frac {(b c-a d)^3 \log (c+d \tan (x))}{d^4}+\frac {(a+b \tan (x))^3}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 4342
Rubi steps
\begin {align*} \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx &=\operatorname {Subst}\left (\int \frac {(a+b x)^3}{c+d x} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {b (b c-a d)^2}{d^3}-\frac {b (b c-a d) (a+b x)}{d^2}+\frac {b (a+b x)^2}{d}+\frac {(-b c+a d)^3}{d^3 (c+d x)}\right ) \, dx,x,\tan (x)\right )\\ &=-\frac {(b c-a d)^3 \log (c+d \tan (x))}{d^4}+\frac {b (b c-a d)^2 \tan (x)}{d^3}-\frac {(b c-a d) (a+b \tan (x))^2}{2 d^2}+\frac {(a+b \tan (x))^3}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.96, size = 133, normalized size = 1.71 \[ \frac {(a+b \tan (x))^3 (c \cos (x)+d \sin (x)) \left (b d^2 (9 a \sin (2 x) (a d-b c)+b (9 a d-3 b c+2 b d \tan (x)))+6 \cos ^2(x) (b c-a d)^3 (\log (\cos (x))-\log (c \cos (x)+d \sin (x)))+b^3 (-d) \left (d^2-3 c^2\right ) \sin (2 x)\right )}{6 d^4 (c+d \tan (x)) (a \cos (x)+b \sin (x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.11, size = 201, normalized size = 2.58 \[ -\frac {3 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \cos \relax (x)^{3} \log \left (2 \, c d \cos \relax (x) \sin \relax (x) + {\left (c^{2} - d^{2}\right )} \cos \relax (x)^{2} + d^{2}\right ) - 3 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \cos \relax (x)^{3} \log \left (\cos \relax (x)^{2}\right ) + 3 \, {\left (b^{3} c d^{2} - 3 \, a b^{2} d^{3}\right )} \cos \relax (x) - 2 \, {\left (b^{3} d^{3} + {\left (3 \, b^{3} c^{2} d - 9 \, a b^{2} c d^{2} + {\left (9 \, a^{2} b - b^{3}\right )} d^{3}\right )} \cos \relax (x)^{2}\right )} \sin \relax (x)}{6 \, d^{4} \cos \relax (x)^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 123, normalized size = 1.58 \[ \frac {2 \, b^{3} d^{2} \tan \relax (x)^{3} - 3 \, b^{3} c d \tan \relax (x)^{2} + 9 \, a b^{2} d^{2} \tan \relax (x)^{2} + 6 \, b^{3} c^{2} \tan \relax (x) - 18 \, a b^{2} c d \tan \relax (x) + 18 \, a^{2} b d^{2} \tan \relax (x)}{6 \, d^{3}} - \frac {{\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left ({\left | d \tan \relax (x) + c \right |}\right )}{d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 143, normalized size = 1.83 \[ \frac {b^{3} \left (\tan ^{3}\relax (x )\right )}{3 d}+\frac {3 b^{2} \left (\tan ^{2}\relax (x )\right ) a}{2 d}-\frac {b^{3} \left (\tan ^{2}\relax (x )\right ) c}{2 d^{2}}+\frac {3 b \,a^{2} \tan \relax (x )}{d}-\frac {3 b^{2} a c \tan \relax (x )}{d^{2}}+\frac {b^{3} c^{2} \tan \relax (x )}{d^{3}}+\frac {\ln \left (c +d \tan \relax (x )\right ) a^{3}}{d}-\frac {3 \ln \left (c +d \tan \relax (x )\right ) a^{2} b c}{d^{2}}+\frac {3 \ln \left (c +d \tan \relax (x )\right ) a \,b^{2} c^{2}}{d^{3}}-\frac {\ln \left (c +d \tan \relax (x )\right ) b^{3} c^{3}}{d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.52, size = 118, normalized size = 1.51 \[ \frac {2 \, b^{3} d^{2} \tan \relax (x)^{3} - 3 \, {\left (b^{3} c d - 3 \, a b^{2} d^{2}\right )} \tan \relax (x)^{2} + 6 \, {\left (b^{3} c^{2} - 3 \, a b^{2} c d + 3 \, a^{2} b d^{2}\right )} \tan \relax (x)}{6 \, d^{3}} - \frac {{\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (d \tan \relax (x) + c\right )}{d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.96, size = 122, normalized size = 1.56 \[ \mathrm {tan}\relax (x)\,\left (\frac {3\,a^2\,b}{d}-\frac {c\,\left (\frac {3\,a\,b^2}{d}-\frac {b^3\,c}{d^2}\right )}{d}\right )+{\mathrm {tan}\relax (x)}^2\,\left (\frac {3\,a\,b^2}{2\,d}-\frac {b^3\,c}{2\,d^2}\right )+\frac {b^3\,{\mathrm {tan}\relax (x)}^3}{3\,d}+\frac {\ln \left (c+d\,\mathrm {tan}\relax (x)\right )\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}{d^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 10.57, size = 95, normalized size = 1.22 \[ \frac {b^{3} \tan ^{3}{\relax (x )}}{3 d} + \frac {\left (3 a b^{2} d - b^{3} c\right ) \tan ^{2}{\relax (x )}}{2 d^{2}} + \frac {\left (a d - b c\right )^{3} \left (\begin {cases} \frac {\tan {\relax (x )}}{c} & \text {for}\: d = 0 \\\frac {\log {\left (c + d \tan {\relax (x )} \right )}}{d} & \text {otherwise} \end {cases}\right )}{d^{3}} + \frac {\left (3 a^{2} b d^{2} - 3 a b^{2} c d + b^{3} c^{2}\right ) \tan {\relax (x )}}{d^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________