Optimal. Leaf size=49 \[ \frac {a b \cos (c+d x)}{d}+\frac {\sec (c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{d}+b^2 (-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 49, 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 = {2691, 2638} \[ \frac {a b \cos (c+d x)}{d}+\frac {\sec (c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{d}+b^2 (-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2638
Rule 2691
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d}-\int \left (b^2+a b \sin (c+d x)\right ) \, dx\\ &=-b^2 x+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d}-(a b) \int \sin (c+d x) \, dx\\ &=-b^2 x+\frac {a b \cos (c+d x)}{d}+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 55, normalized size = 1.12 \[ \frac {a^2 \tan (c+d x)}{d}+\frac {2 a b \sec (c+d x)}{d}-\frac {b^2 \tan ^{-1}(\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 45, normalized size = 0.92 \[ -\frac {b^{2} d x \cos \left (d x + c\right ) - 2 \, a b - {\left (a^{2} + b^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.78, size = 63, normalized size = 1.29 \[ -\frac {{\left (d x + c\right )} b^{2} + \frac {2 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, a b\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 46, normalized size = 0.94 \[ \frac {a^{2} \tan \left (d x +c \right )+\frac {2 a b}{\cos \left (d x +c \right )}+b^{2} \left (\tan \left (d x +c \right )-d x -c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 46, normalized size = 0.94 \[ -\frac {{\left (d x + c - \tan \left (d x + c\right )\right )} b^{2} - a^{2} \tan \left (d x + c\right ) - \frac {2 \, a b}{\cos \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.21, size = 53, normalized size = 1.08 \[ -b^2\,x-\frac {4\,a\,b+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2+2\,b^2\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\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 \left (a + b \sin {\left (c + d x \right )}\right )^{2} \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________