Optimal. Leaf size=116 \[ \frac{3 b \sqrt{b^2+c^2} \sin (d+e x)}{2 e}-\frac{3 c \sqrt{b^2+c^2} \cos (d+e x)}{2 e}-\frac{(c \cos (d+e x)-b \sin (d+e x)) \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )}{2 e}+\frac{3}{2} x \left (b^2+c^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0584102, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3113, 2637, 2638} \[ \frac{3 b \sqrt{b^2+c^2} \sin (d+e x)}{2 e}-\frac{3 c \sqrt{b^2+c^2} \cos (d+e x)}{2 e}-\frac{(c \cos (d+e x)-b \sin (d+e x)) \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )}{2 e}+\frac{3}{2} x \left (b^2+c^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3113
Rule 2637
Rule 2638
Rubi steps
\begin{align*} \int \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )^2 \, dx &=-\frac{(c \cos (d+e x)-b \sin (d+e x)) \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )}{2 e}+\frac{1}{2} \left (3 \sqrt{b^2+c^2}\right ) \int \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right ) \, dx\\ &=\frac{3}{2} \left (b^2+c^2\right ) x-\frac{(c \cos (d+e x)-b \sin (d+e x)) \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )}{2 e}+\frac{1}{2} \left (3 b \sqrt{b^2+c^2}\right ) \int \cos (d+e x) \, dx+\frac{1}{2} \left (3 c \sqrt{b^2+c^2}\right ) \int \sin (d+e x) \, dx\\ &=\frac{3}{2} \left (b^2+c^2\right ) x-\frac{3 c \sqrt{b^2+c^2} \cos (d+e x)}{2 e}+\frac{3 b \sqrt{b^2+c^2} \sin (d+e x)}{2 e}-\frac{(c \cos (d+e x)-b \sin (d+e x)) \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )}{2 e}\\ \end{align*}
Mathematica [A] time = 0.222119, size = 111, normalized size = 0.96 \[ \frac{8 b \sqrt{b^2+c^2} \sin (d+e x)-8 c \sqrt{b^2+c^2} \cos (d+e x)+b^2 \sin (2 (d+e x))+6 b^2 d+6 b^2 e x-2 b c \cos (2 (d+e x))-c^2 \sin (2 (d+e x))+6 c^2 d+6 c^2 e x}{4 e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.061, size = 124, normalized size = 1.1 \begin{align*}{\frac{1}{e} \left ({b}^{2} \left ({\frac{\sin \left ( ex+d \right ) \cos \left ( ex+d \right ) }{2}}+{\frac{ex}{2}}+{\frac{d}{2}} \right ) - \left ( \cos \left ( ex+d \right ) \right ) ^{2}bc+{c}^{2} \left ( -{\frac{\sin \left ( ex+d \right ) \cos \left ( ex+d \right ) }{2}}+{\frac{ex}{2}}+{\frac{d}{2}} \right ) +2\,\sqrt{{b}^{2}+{c}^{2}}b\sin \left ( ex+d \right ) -2\,\sqrt{{b}^{2}+{c}^{2}}c\cos \left ( ex+d \right ) +{b}^{2} \left ( ex+d \right ) +{c}^{2} \left ( ex+d \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.986031, size = 153, normalized size = 1.32 \begin{align*} b^{2} x + c^{2} x - \frac{b c \cos \left (e x + d\right )^{2}}{e} + \frac{{\left (2 \, e x + 2 \, d + \sin \left (2 \, e x + 2 \, d\right )\right )} b^{2}}{4 \, e} + \frac{{\left (2 \, e x + 2 \, d - \sin \left (2 \, e x + 2 \, d\right )\right )} c^{2}}{4 \, e} - 2 \, \sqrt{b^{2} + c^{2}}{\left (\frac{c \cos \left (e x + d\right )}{e} - \frac{b \sin \left (e x + d\right )}{e}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.19603, size = 196, normalized size = 1.69 \begin{align*} -\frac{2 \, b c \cos \left (e x + d\right )^{2} - 3 \,{\left (b^{2} + c^{2}\right )} e x -{\left (b^{2} - c^{2}\right )} \cos \left (e x + d\right ) \sin \left (e x + d\right ) + 4 \, \sqrt{b^{2} + c^{2}}{\left (c \cos \left (e x + d\right ) - b \sin \left (e x + d\right )\right )}}{2 \, e} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.617558, size = 192, normalized size = 1.66 \begin{align*} \begin{cases} \frac{b^{2} x \sin ^{2}{\left (d + e x \right )}}{2} + \frac{b^{2} x \cos ^{2}{\left (d + e x \right )}}{2} + b^{2} x + \frac{b^{2} \sin{\left (d + e x \right )} \cos{\left (d + e x \right )}}{2 e} + \frac{b c \sin ^{2}{\left (d + e x \right )}}{e} + \frac{2 b \sqrt{b^{2} + c^{2}} \sin{\left (d + e x \right )}}{e} + \frac{c^{2} x \sin ^{2}{\left (d + e x \right )}}{2} + \frac{c^{2} x \cos ^{2}{\left (d + e x \right )}}{2} + c^{2} x - \frac{c^{2} \sin{\left (d + e x \right )} \cos{\left (d + e x \right )}}{2 e} - \frac{2 c \sqrt{b^{2} + c^{2}} \cos{\left (d + e x \right )}}{e} & \text{for}\: e \neq 0 \\x \left (b \cos{\left (d \right )} + c \sin{\left (d \right )} + \sqrt{b^{2} + c^{2}}\right )^{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14036, size = 124, normalized size = 1.07 \begin{align*} -\frac{1}{2} \, b c \cos \left (2 \, x e + 2 \, d\right ) e^{\left (-1\right )} - 2 \, \sqrt{b^{2} + c^{2}} c \cos \left (x e + d\right ) e^{\left (-1\right )} + 2 \, \sqrt{b^{2} + c^{2}} b e^{\left (-1\right )} \sin \left (x e + d\right ) + \frac{1}{4} \,{\left (b^{2} - c^{2}\right )} e^{\left (-1\right )} \sin \left (2 \, x e + 2 \, d\right ) + \frac{3}{2} \,{\left (b^{2} + c^{2}\right )} x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]