Integrand size = 21, antiderivative size = 78 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=-\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} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4427, 45} \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=-\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} \]
[In]
[Out]
Rule 45
Rule 4427
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {(a+b x)^3}{c+d x} \, dx,x,\tan (x)\right ) \\ & = \text {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*}
Time = 0.46 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.56 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=\frac {(c \cos (x)+d \sin (x)) (a+b \tan (x))^3 \left (-6 (b c-a d)^3 \cos ^2(x) \log (c+d \tan (x))+6 b^3 c^2 d \cos (x) \sin (x)+b d^2 \left (9 a (-b c+a d) \sin (2 x)+b \left (-3 b c+9 a d+2 b d \sin ^2(x) \tan (x)\right )\right )\right )}{6 d^4 (a \cos (x)+b \sin (x))^3 (c+d \tan (x))} \]
[In]
[Out]
Time = 3.90 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.49
method | result | size |
derivativedivides | \(\frac {b \left (\frac {b^{2} \tan \left (x \right )^{3} d^{2}}{3}+\frac {3 a b \,d^{2} \tan \left (x \right )^{2}}{2}-\frac {b^{2} c d \tan \left (x \right )^{2}}{2}+3 \tan \left (x \right ) d^{2} a^{2}-3 \tan \left (x \right ) c d a b +\tan \left (x \right ) b^{2} c^{2}\right )}{d^{3}}+\frac {\left (d^{3} a^{3}-3 c \,d^{2} a^{2} b +3 c^{2} d a \,b^{2}-b^{3} c^{3}\right ) \ln \left (c +d \tan \left (x \right )\right )}{d^{4}}\) | \(116\) |
default | \(\frac {b \left (\frac {b^{2} \tan \left (x \right )^{3} d^{2}}{3}+\frac {3 a b \,d^{2} \tan \left (x \right )^{2}}{2}-\frac {b^{2} c d \tan \left (x \right )^{2}}{2}+3 \tan \left (x \right ) d^{2} a^{2}-3 \tan \left (x \right ) c d a b +\tan \left (x \right ) b^{2} c^{2}\right )}{d^{3}}+\frac {\left (d^{3} a^{3}-3 c \,d^{2} a^{2} b +3 c^{2} d a \,b^{2}-b^{3} c^{3}\right ) \ln \left (c +d \tan \left (x \right )\right )}{d^{4}}\) | \(116\) |
risch | \(\frac {2 i b \left (9 a^{2} d^{2} {\mathrm e}^{4 i x}-9 a b c d \,{\mathrm e}^{4 i x}+3 b^{2} c^{2} {\mathrm e}^{4 i x}-3 b^{2} d^{2} {\mathrm e}^{4 i x}-9 i a b \,d^{2} {\mathrm e}^{4 i x}+3 i b^{2} c d \,{\mathrm e}^{4 i x}+18 a^{2} d^{2} {\mathrm e}^{2 i x}-18 a b c d \,{\mathrm e}^{2 i x}+6 b^{2} c^{2} {\mathrm e}^{2 i x}-9 i a b \,d^{2} {\mathrm e}^{2 i x}+3 i b^{2} c d \,{\mathrm e}^{2 i x}+9 d^{2} a^{2}-9 c d a b +3 b^{2} c^{2}-b^{2} d^{2}\right )}{3 d^{3} \left ({\mathrm e}^{2 i x}+1\right )^{3}}-\frac {\ln \left ({\mathrm e}^{2 i x}+1\right ) a^{3}}{d}+\frac {3 \ln \left ({\mathrm e}^{2 i x}+1\right ) c \,a^{2} b}{d^{2}}-\frac {3 \ln \left ({\mathrm e}^{2 i x}+1\right ) c^{2} a \,b^{2}}{d^{3}}+\frac {\ln \left ({\mathrm e}^{2 i x}+1\right ) b^{3} c^{3}}{d^{4}}+\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {i d +c}{i d -c}\right ) a^{3}}{d}-\frac {3 \ln \left ({\mathrm e}^{2 i x}-\frac {i d +c}{i d -c}\right ) c \,a^{2} b}{d^{2}}+\frac {3 \ln \left ({\mathrm e}^{2 i x}-\frac {i d +c}{i d -c}\right ) c^{2} a \,b^{2}}{d^{3}}-\frac {\ln \left ({\mathrm e}^{2 i x}-\frac {i d +c}{i d -c}\right ) b^{3} c^{3}}{d^{4}}\) | \(400\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (74) = 148\).
Time = 0.30 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.58 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=-\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 \left (x\right )^{3} \log \left (2 \, c d \cos \left (x\right ) \sin \left (x\right ) + {\left (c^{2} - d^{2}\right )} \cos \left (x\right )^{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 \left (x\right )^{3} \log \left (\cos \left (x\right )^{2}\right ) + 3 \, {\left (b^{3} c d^{2} - 3 \, a b^{2} d^{3}\right )} \cos \left (x\right ) - 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 \left (x\right )^{2}\right )} \sin \left (x\right )}{6 \, d^{4} \cos \left (x\right )^{3}} \]
[In]
[Out]
Time = 2.84 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.22 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=\frac {b^{3} \tan ^{3}{\left (x \right )}}{3 d} + \frac {\left (3 a b^{2} d - b^{3} c\right ) \tan ^{2}{\left (x \right )}}{2 d^{2}} + \frac {\left (a d - b c\right )^{3} \left (\begin {cases} \frac {\tan {\left (x \right )}}{c} & \text {for}\: d = 0 \\\frac {\log {\left (c + d \tan {\left (x \right )} \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 {\left (x \right )}}{d^{3}} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.51 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=\frac {2 \, b^{3} d^{2} \tan \left (x\right )^{3} - 3 \, {\left (b^{3} c d - 3 \, a b^{2} d^{2}\right )} \tan \left (x\right )^{2} + 6 \, {\left (b^{3} c^{2} - 3 \, a b^{2} c d + 3 \, a^{2} b d^{2}\right )} \tan \left (x\right )}{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 \left (x\right ) + c\right )}{d^{4}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.58 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=\frac {2 \, b^{3} d^{2} \tan \left (x\right )^{3} - 3 \, b^{3} c d \tan \left (x\right )^{2} + 9 \, a b^{2} d^{2} \tan \left (x\right )^{2} + 6 \, b^{3} c^{2} \tan \left (x\right ) - 18 \, a b^{2} c d \tan \left (x\right ) + 18 \, a^{2} b d^{2} \tan \left (x\right )}{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 \left (x\right ) + c \right |}\right )}{d^{4}} \]
[In]
[Out]
Time = 28.90 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.56 \[ \int \frac {\sec ^2(x) (a+b \tan (x))^3}{c+d \tan (x)} \, dx=\mathrm {tan}\left (x\right )\,\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}\left (x\right )}^2\,\left (\frac {3\,a\,b^2}{2\,d}-\frac {b^3\,c}{2\,d^2}\right )+\frac {b^3\,{\mathrm {tan}\left (x\right )}^3}{3\,d}+\frac {\ln \left (c+d\,\mathrm {tan}\left (x\right )\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} \]
[In]
[Out]