Optimal. Leaf size=72 \[ -\frac{b \left (a^2+b^2\right ) \log (\cos (d+e x))}{e}-a x \left (a^2+b^2\right )+\frac{a^2 (a+b \tan (d+e x))^2}{2 b e}+\frac{2 a b^2 \tan (d+e x)}{e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0755105, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 37, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.081, Rules used = {3630, 3525, 3475} \[ -\frac{b \left (a^2+b^2\right ) \log (\cos (d+e x))}{e}-a x \left (a^2+b^2\right )+\frac{a^2 (a+b \tan (d+e x))^2}{2 b e}+\frac{2 a b^2 \tan (d+e x)}{e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3630
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int (a+b \tan (d+e x)) \left (b^2+2 a b \tan (d+e x)+a^2 \tan ^2(d+e x)\right ) \, dx &=\frac{a^2 (a+b \tan (d+e x))^2}{2 b e}+\int (a+b \tan (d+e x)) \left (-a^2+b^2+2 a b \tan (d+e x)\right ) \, dx\\ &=-a \left (a^2+b^2\right ) x+\frac{2 a b^2 \tan (d+e x)}{e}+\frac{a^2 (a+b \tan (d+e x))^2}{2 b e}+\left (b \left (a^2+b^2\right )\right ) \int \tan (d+e x) \, dx\\ &=-a \left (a^2+b^2\right ) x-\frac{b \left (a^2+b^2\right ) \log (\cos (d+e x))}{e}+\frac{2 a b^2 \tan (d+e x)}{e}+\frac{a^2 (a+b \tan (d+e x))^2}{2 b e}\\ \end{align*}
Mathematica [C] time = 0.333865, size = 88, normalized size = 1.22 \[ \frac{2 a \left (a^2+2 b^2\right ) \tan (d+e x)+\left (a^2+b^2\right ) ((b+i a) \log (-\tan (d+e x)+i)+(b-i a) \log (\tan (d+e x)+i))+a^2 b \tan ^2(d+e x)}{2 e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 117, normalized size = 1.6 \begin{align*}{\frac{{a}^{2}b \left ( \tan \left ( ex+d \right ) \right ) ^{2}}{2\,e}}+{\frac{{a}^{3}\tan \left ( ex+d \right ) }{e}}+2\,{\frac{a{b}^{2}\tan \left ( ex+d \right ) }{e}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( ex+d \right ) \right ) ^{2} \right ){a}^{2}b}{2\,e}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( ex+d \right ) \right ) ^{2} \right ){b}^{3}}{2\,e}}-{\frac{\arctan \left ( \tan \left ( ex+d \right ) \right ){a}^{3}}{e}}-{\frac{\arctan \left ( \tan \left ( ex+d \right ) \right ) a{b}^{2}}{e}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.50719, size = 100, normalized size = 1.39 \begin{align*} \frac{a^{2} b \tan \left (e x + d\right )^{2} - 2 \,{\left (a^{3} + a b^{2}\right )}{\left (e x + d\right )} +{\left (a^{2} b + b^{3}\right )} \log \left (\tan \left (e x + d\right )^{2} + 1\right ) + 2 \,{\left (a^{3} + 2 \, a b^{2}\right )} \tan \left (e x + d\right )}{2 \, e} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.79282, size = 174, normalized size = 2.42 \begin{align*} \frac{a^{2} b \tan \left (e x + d\right )^{2} - 2 \,{\left (a^{3} + a b^{2}\right )} e x -{\left (a^{2} b + b^{3}\right )} \log \left (\frac{1}{\tan \left (e x + d\right )^{2} + 1}\right ) + 2 \,{\left (a^{3} + 2 \, a b^{2}\right )} \tan \left (e x + d\right )}{2 \, e} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.325562, size = 122, normalized size = 1.69 \begin{align*} \begin{cases} - a^{3} x + \frac{a^{3} \tan{\left (d + e x \right )}}{e} + \frac{a^{2} b \log{\left (\tan ^{2}{\left (d + e x \right )} + 1 \right )}}{2 e} + \frac{a^{2} b \tan ^{2}{\left (d + e x \right )}}{2 e} - a b^{2} x + \frac{2 a b^{2} \tan{\left (d + e x \right )}}{e} + \frac{b^{3} \log{\left (\tan ^{2}{\left (d + e x \right )} + 1 \right )}}{2 e} & \text{for}\: e \neq 0 \\x \left (a + b \tan{\left (d \right )}\right ) \left (a^{2} \tan ^{2}{\left (d \right )} + 2 a b \tan{\left (d \right )} + b^{2}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.07487, size = 957, normalized size = 13.29 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]