Optimal. Leaf size=177 \[ -\frac {b \left (a^2+3 b^2\right )}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))}+\frac {4 a b^3 \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )^3}-\frac {(a+3 b) \log (1-\sin (c+d x))}{4 d (a+b)^3}+\frac {(a-3 b) \log (\sin (c+d x)+1)}{4 d (a-b)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2668, 741, 801} \[ -\frac {b \left (a^2+3 b^2\right )}{2 d \left (a^2-b^2\right )^2 (a+b \sin (c+d x))}+\frac {4 a b^3 \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )^3}-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 d \left (a^2-b^2\right ) (a+b \sin (c+d x))}-\frac {(a+3 b) \log (1-\sin (c+d x))}{4 d (a+b)^3}+\frac {(a-3 b) \log (\sin (c+d x)+1)}{4 d (a-b)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 741
Rule 801
Rule 2668
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x)}{(a+b \sin (c+d x))^2} \, dx &=\frac {b^3 \operatorname {Subst}\left (\int \frac {1}{(a+x)^2 \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac {b \operatorname {Subst}\left (\int \frac {a^2-3 b^2+2 a x}{(a+x)^2 \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{2 \left (a^2-b^2\right ) d}\\ &=-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}+\frac {b \operatorname {Subst}\left (\int \left (\frac {(a-b) (a+3 b)}{2 b (a+b)^2 (b-x)}+\frac {a^2+3 b^2}{(a-b) (a+b) (a+x)^2}+\frac {8 a b^2}{(a-b)^2 (a+b)^2 (a+x)}+\frac {(a-3 b) (a+b)}{2 (a-b)^2 b (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{2 \left (a^2-b^2\right ) d}\\ &=-\frac {(a+3 b) \log (1-\sin (c+d x))}{4 (a+b)^3 d}+\frac {(a-3 b) \log (1+\sin (c+d x))}{4 (a-b)^3 d}+\frac {4 a b^3 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}-\frac {b \left (a^2+3 b^2\right )}{2 \left (a^2-b^2\right )^2 d (a+b \sin (c+d x))}-\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{2 \left (a^2-b^2\right ) d (a+b \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.75, size = 222, normalized size = 1.25 \[ \frac {-b \left (-a^2-3 b^2\right ) \left (\frac {1}{\left (a^2-b^2\right ) (a+b \sin (c+d x))}-\frac {\log (1-\sin (c+d x))}{2 b (a+b)^2}+\frac {\log (\sin (c+d x)+1)}{2 b (a-b)^2}-\frac {2 a \log (a+b \sin (c+d x))}{(a-b)^2 (a+b)^2}\right )+\frac {a ((a-b) \log (1-\sin (c+d x))-(a+b) \log (\sin (c+d x)+1)+2 b \log (a+b \sin (c+d x)))}{(a-b) (a+b)}+\frac {\sec ^2(c+d x) (b-a \sin (c+d x))}{a+b \sin (c+d x)}}{2 d \left (b^2-a^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.58, size = 381, normalized size = 2.15 \[ -\frac {2 \, a^{4} b - 4 \, a^{2} b^{3} + 2 \, b^{5} + 2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2} - 16 \, {\left (a b^{4} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + a^{2} b^{3} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - {\left ({\left (a^{4} b - 6 \, a^{2} b^{3} - 8 \, a b^{4} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} - 6 \, a^{3} b^{2} - 8 \, a^{2} b^{3} - 3 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left ({\left (a^{4} b - 6 \, a^{2} b^{3} + 8 \, a b^{4} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{5} - 6 \, a^{3} b^{2} + 8 \, a^{2} b^{3} - 3 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (d x + c\right )}{4 \, {\left ({\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right ) + {\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} d \cos \left (d x + c\right )^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.99, size = 244, normalized size = 1.38 \[ \frac {\frac {16 \, a b^{4} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} + \frac {{\left (a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (a + 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (a^{2} b \sin \left (d x + c\right )^{2} + 3 \, b^{3} \sin \left (d x + c\right )^{2} + a^{3} \sin \left (d x + c\right ) - a b^{2} \sin \left (d x + c\right ) - 2 \, a^{2} b - 2 \, b^{3}\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (b \sin \left (d x + c\right )^{3} + a \sin \left (d x + c\right )^{2} - b \sin \left (d x + c\right ) - a\right )}}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.32, size = 192, normalized size = 1.08 \[ -\frac {1}{4 d \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}-\frac {\ln \left (\sin \left (d x +c \right )-1\right ) a}{4 d \left (a +b \right )^{3}}-\frac {3 \ln \left (\sin \left (d x +c \right )-1\right ) b}{4 d \left (a +b \right )^{3}}-\frac {b^{3}}{d \left (a +b \right )^{2} \left (a -b \right )^{2} \left (a +b \sin \left (d x +c \right )\right )}+\frac {4 b^{3} a \ln \left (a +b \sin \left (d x +c \right )\right )}{d \left (a +b \right )^{3} \left (a -b \right )^{3}}-\frac {1}{4 d \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {\ln \left (1+\sin \left (d x +c \right )\right ) a}{4 d \left (a -b \right )^{3}}-\frac {3 \ln \left (1+\sin \left (d x +c \right )\right ) b}{4 d \left (a -b \right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 275, normalized size = 1.55 \[ \frac {\frac {16 \, a b^{3} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} + \frac {{\left (a - 3 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (a + 3 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (2 \, a^{2} b + 2 \, b^{3} - {\left (a^{2} b + 3 \, b^{3}\right )} \sin \left (d x + c\right )^{2} - {\left (a^{3} - a b^{2}\right )} \sin \left (d x + c\right )\right )}}{a^{5} - 2 \, a^{3} b^{2} + a b^{4} - {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )^{3} - {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (d x + c\right )^{2} + {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \sin \left (d x + c\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.47, size = 227, normalized size = 1.28 \[ \frac {\frac {{\sin \left (c+d\,x\right )}^2\,\left (a^2\,b+3\,b^3\right )}{2\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {a^2\,b+b^3}{{\left (a^2-b^2\right )}^2}+\frac {a\,\sin \left (c+d\,x\right )}{2\,\left (a^2-b^2\right )}}{d\,\left (-b\,{\sin \left (c+d\,x\right )}^3-a\,{\sin \left (c+d\,x\right )}^2+b\,\sin \left (c+d\,x\right )+a\right )}-\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (\frac {b}{2\,{\left (a+b\right )}^3}+\frac {1}{4\,{\left (a+b\right )}^2}\right )}{d}+\frac {\ln \left (\sin \left (c+d\,x\right )+1\right )\,\left (a-3\,b\right )}{4\,d\,{\left (a-b\right )}^3}+\frac {4\,a\,b^3\,\ln \left (a+b\,\sin \left (c+d\,x\right )\right )}{d\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\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 {\sec ^{3}{\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________