Optimal. Leaf size=25 \[ a^2 x+2 a b e^x+\frac{1}{2} b^2 e^{2 x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0143958, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2282, 43} \[ a^2 x+2 a b e^x+\frac{1}{2} b^2 e^{2 x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 43
Rubi steps
\begin{align*} \int \left (a+b e^x\right )^2 \, dx &=\operatorname{Subst}\left (\int \frac{(a+b x)^2}{x} \, dx,x,e^x\right )\\ &=\operatorname{Subst}\left (\int \left (2 a b+\frac{a^2}{x}+b^2 x\right ) \, dx,x,e^x\right )\\ &=2 a b e^x+\frac{1}{2} b^2 e^{2 x}+a^2 x\\ \end{align*}
Mathematica [A] time = 0.0094567, size = 25, normalized size = 1. \[ a^2 x+2 a b e^x+\frac{1}{2} b^2 e^{2 x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 24, normalized size = 1. \begin{align*}{\frac{ \left ({{\rm e}^{x}} \right ) ^{2}{b}^{2}}{2}}+2\,ab{{\rm e}^{x}}+{a}^{2}\ln \left ({{\rm e}^{x}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.968326, size = 28, normalized size = 1.12 \begin{align*} a^{2} x + \frac{1}{2} \, b^{2} e^{\left (2 \, x\right )} + 2 \, a b e^{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.831677, size = 50, normalized size = 2. \begin{align*} a^{2} x + \frac{1}{2} \, b^{2} e^{\left (2 \, x\right )} + 2 \, a b e^{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.118013, size = 22, normalized size = 0.88 \begin{align*} a^{2} x + 2 a b e^{x} + \frac{b^{2} e^{2 x}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30014, size = 28, normalized size = 1.12 \begin{align*} a^{2} x + \frac{1}{2} \, b^{2} e^{\left (2 \, x\right )} + 2 \, a b e^{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]