Optimal. Leaf size=70 \[ -\frac {\tan ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}-\frac {\sec (c+d x)}{a d}-\frac {x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2839, 2606, 3473, 8} \[ -\frac {\tan ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}-\frac {\sec (c+d x)}{a d}-\frac {x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2606
Rule 2839
Rule 3473
Rubi steps
\begin {align*} \int \frac {\sin (c+d x) \tan ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \sec (c+d x) \tan ^3(c+d x) \, dx}{a}-\frac {\int \tan ^4(c+d x) \, dx}{a}\\ &=-\frac {\tan ^3(c+d x)}{3 a d}+\frac {\int \tan ^2(c+d x) \, dx}{a}+\frac {\operatorname {Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{a d}\\ &=-\frac {\sec (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}-\frac {\tan ^3(c+d x)}{3 a d}-\frac {\int 1 \, dx}{a}\\ &=-\frac {x}{a}-\frac {\sec (c+d x)}{a d}+\frac {\sec ^3(c+d x)}{3 a d}+\frac {\tan (c+d x)}{a d}-\frac {\tan ^3(c+d x)}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.36, size = 111, normalized size = 1.59 \[ \frac {-2 \sin (c+d x)+4 \cos (2 (c+d x))+(6 c+6 d x-5) (\sin (c+d x)+1) \cos (c+d x)}{6 a d (\sin (c+d x)+1) \left (\sin \left (\frac {1}{2} (c+d x)\right )-\cos \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 70, normalized size = 1.00 \[ -\frac {3 \, d x \cos \left (d x + c\right ) + 4 \, \cos \left (d x + c\right )^{2} + {\left (3 \, d x \cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right ) - 2}{3 \, {\left (a d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 77, normalized size = 1.10 \[ -\frac {\frac {6 \, {\left (d x + c\right )}}{a} + \frac {3}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} + \frac {9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 11}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.36, size = 104, normalized size = 1.49 \[ -\frac {1}{2 a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {2}{3 a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{2 a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 154, normalized size = 2.20 \[ -\frac {2 \, {\left (\frac {\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {6 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + 2}{a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {3 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}\right )}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.18, size = 79, normalized size = 1.13 \[ \frac {-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {4}{3}}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^3}-\frac {x}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________