Optimal. Leaf size=86 \[ \frac {\frac {1}{a^2}-\frac {1}{b^2}}{d (a \cot (c+d x)+b)}-\frac {\frac {b}{a^2}+\frac {1}{b}}{2 d (a \cot (c+d x)+b)^2}+\frac {\log (a \cot (c+d x)+b)}{b^3 d}+\frac {\log (\tan (c+d x))}{b^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3088, 894} \[ \frac {\frac {1}{a^2}-\frac {1}{b^2}}{d (a \cot (c+d x)+b)}-\frac {\frac {b}{a^2}+\frac {1}{b}}{2 d (a \cot (c+d x)+b)^2}+\frac {\log (a \cot (c+d x)+b)}{b^3 d}+\frac {\log (\tan (c+d x))}{b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 894
Rule 3088
Rubi steps
\begin {align*} \int \frac {\sec (c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^3} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {1+x^2}{x (b+a x)^3} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {1}{b^3 x}+\frac {-a^2-b^2}{a b (b+a x)^3}+\frac {-a^2+b^2}{a b^2 (b+a x)^2}-\frac {a}{b^3 (b+a x)}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\frac {1}{b}+\frac {b}{a^2}}{2 d (b+a \cot (c+d x))^2}+\frac {\frac {1}{a^2}-\frac {1}{b^2}}{d (b+a \cot (c+d x))}+\frac {\log (b+a \cot (c+d x))}{b^3 d}+\frac {\log (\tan (c+d x))}{b^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.52, size = 57, normalized size = 0.66 \[ \frac {-\frac {a^2+b^2}{2 (a+b \tan (c+d x))^2}+\frac {2 a}{a+b \tan (c+d x)}+\log (a+b \tan (c+d x))}{b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.60, size = 284, normalized size = 3.30 \[ \frac {4 \, a^{2} b^{2} \cos \left (d x + c\right )^{2} - 3 \, a^{2} b^{2} - b^{4} - 2 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} b^{2} + b^{4} + {\left (a^{4} - b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} b^{2} + b^{4} + {\left (a^{4} - b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right )}{2 \, {\left ({\left (a^{4} b^{3} - b^{7}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b^{4} + a b^{6}\right )} d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} b^{5} + b^{7}\right )} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.83, size = 62, normalized size = 0.72 \[ \frac {\frac {2 \, \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}} - \frac {3 \, b \tan \left (d x + c\right )^{2} + 2 \, a \tan \left (d x + c\right ) + b}{{\left (b \tan \left (d x + c\right ) + a\right )}^{2} b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.39, size = 84, normalized size = 0.98 \[ \frac {\ln \left (a +b \tan \left (d x +c \right )\right )}{d \,b^{3}}+\frac {2 a}{d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {a^{2}}{2 d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {1}{2 b d \left (a +b \tan \left (d x +c \right )\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 315, normalized size = 3.66 \[ -\frac {\frac {2 \, {\left (\frac {{\left (a^{3} - a b^{2}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {{\left (3 \, a^{2} b - b^{3}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {{\left (a^{3} - a b^{2}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{4} b^{2} + \frac {4 \, a^{3} b^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {4 \, a^{3} b^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {a^{4} b^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {2 \, {\left (a^{4} b^{2} - 2 \, a^{2} b^{4}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} - \frac {\log \left (-a - \frac {2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{3}} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.59, size = 396, normalized size = 4.60 \[ \frac {2\,\mathrm {atanh}\left (\frac {16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{16\,a+\frac {32\,a^3}{b^2}-16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {32\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}+\frac {32\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}-\frac {16\,a}{16\,a+\frac {32\,a^3}{b^2}-16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {32\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}+\frac {32\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}+\frac {32\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,a\,b+\frac {32\,a^3}{b}+32\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {32\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b}-16\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{b^3\,d}-\frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (3\,a^2-b^2\right )}{a^2\,b}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (a^2-b^2\right )}{a\,b^2}+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^2-b^2\right )}{a\,b^2}}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2-4\,b^2\right )+a^2-4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\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 {\left (c + d x \right )}}{\left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________