Optimal. Leaf size=82 \[ -\frac {i d^2 \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \tan (a+b x)}{b}-\frac {i (c+d x)^2}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4184, 3719, 2190, 2279, 2391} \[ \frac {2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac {i d^2 \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {(c+d x)^2 \tan (a+b x)}{b}-\frac {i (c+d x)^2}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3719
Rule 4184
Rubi steps
\begin {align*} \int (c+d x)^2 \sec ^2(a+b x) \, dx &=\frac {(c+d x)^2 \tan (a+b x)}{b}-\frac {(2 d) \int (c+d x) \tan (a+b x) \, dx}{b}\\ &=-\frac {i (c+d x)^2}{b}+\frac {(c+d x)^2 \tan (a+b x)}{b}+\frac {(4 i d) \int \frac {e^{2 i (a+b x)} (c+d x)}{1+e^{2 i (a+b x)}} \, dx}{b}\\ &=-\frac {i (c+d x)^2}{b}+\frac {2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \tan (a+b x)}{b}-\frac {\left (2 d^2\right ) \int \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac {i (c+d x)^2}{b}+\frac {2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}+\frac {(c+d x)^2 \tan (a+b x)}{b}+\frac {\left (i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{b^3}\\ &=-\frac {i (c+d x)^2}{b}+\frac {2 d (c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b^2}-\frac {i d^2 \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3}+\frac {(c+d x)^2 \tan (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 75, normalized size = 0.91 \[ \frac {b (c+d x) \left (b (c+d x) \tan (a+b x)+2 d \log \left (1+e^{2 i (a+b x)}\right )-i b (c+d x)\right )-i d^2 \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.92, size = 450, normalized size = 5.49 \[ \frac {i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d^{2} \cos \left (b x + a\right ) {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \sin \left (b x + a\right )}{b^{3} \cos \left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \sec \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 170, normalized size = 2.07 \[ \frac {2 i \left (d^{2} x^{2}+2 c d x +c^{2}\right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}+\frac {2 d c \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{b^{2}}-\frac {4 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {2 i d^{2} x^{2}}{b}-\frac {4 i d^{2} a x}{b^{2}}-\frac {2 i d^{2} a^{2}}{b^{3}}+\frac {2 d^{2} \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right ) x}{b^{2}}-\frac {i d^{2} \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b^{3}}+\frac {4 d^{2} a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.48, size = 324, normalized size = 3.95 \[ \frac {2 \, b^{2} c^{2} + {\left (2 \, b d^{2} x + 2 \, b c d + 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (2 i \, b d^{2} x + 2 i \, b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\right )} \cos \left (2 \, b x + 2 \, a\right ) - {\left (d^{2} \cos \left (2 \, b x + 2 \, a\right ) + i \, d^{2} \sin \left (2 \, b x + 2 \, a\right ) + d^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + {\left (-i \, b d^{2} x - i \, b c d + {\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b d^{2} x + b c d\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + {\left (-2 i \, b^{2} d^{2} x^{2} - 4 i \, b^{2} c d x\right )} \sin \left (2 \, b x + 2 \, a\right )}{-i \, b^{3} \cos \left (2 \, b x + 2 \, a\right ) + b^{3} \sin \left (2 \, b x + 2 \, a\right ) - i \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (c+d\,x\right )}^2}{{\cos \left (a+b\,x\right )}^2} \,d x \]
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 (c + d x\right )^{2} \sec ^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________