Optimal. Leaf size=157 \[ \frac {4 b \left (15 a^2+4 b^2\right ) \sin (d+e x)}{3 e}-\frac {4 a \left (15 a^2+4 b^2\right ) \cos (d+e x)}{3 e}+4 a x \left (5 a^2+3 b^2\right )-\frac {20 \left (a^2 \cos (d+e x)-a b \sin (d+e x)\right ) (a \sin (d+e x)+a+b \cos (d+e x))}{3 e}-\frac {8 (a \cos (d+e x)-b \sin (d+e x)) (a \sin (d+e x)+a+b \cos (d+e x))^2}{3 e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3120, 3146, 2637, 2638} \[ \frac {4 b \left (15 a^2+4 b^2\right ) \sin (d+e x)}{3 e}-\frac {4 a \left (15 a^2+4 b^2\right ) \cos (d+e x)}{3 e}+4 a x \left (5 a^2+3 b^2\right )-\frac {20 \left (a^2 \cos (d+e x)-a b \sin (d+e x)\right ) (a \sin (d+e x)+a+b \cos (d+e x))}{3 e}-\frac {8 (a \cos (d+e x)-b \sin (d+e x)) (a \sin (d+e x)+a+b \cos (d+e x))^2}{3 e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 2638
Rule 3120
Rule 3146
Rubi steps
\begin {align*} \int (2 a+2 b \cos (d+e x)+2 a \sin (d+e x))^3 \, dx &=-\frac {8 (a+b \cos (d+e x)+a \sin (d+e x))^2 (a \cos (d+e x)-b \sin (d+e x))}{3 e}+\frac {1}{3} \int (2 a+2 b \cos (d+e x)+2 a \sin (d+e x)) \left (4 \left (5 a^2+2 b^2\right )+20 a b \cos (d+e x)+20 a^2 \sin (d+e x)\right ) \, dx\\ &=-\frac {8 (a+b \cos (d+e x)+a \sin (d+e x))^2 (a \cos (d+e x)-b \sin (d+e x))}{3 e}-\frac {20 (a+b \cos (d+e x)+a \sin (d+e x)) \left (a^2 \cos (d+e x)-a b \sin (d+e x)\right )}{3 e}+\frac {\int \left (48 a^2 \left (5 a^2+3 b^2\right )+16 a b \left (15 a^2+4 b^2\right ) \cos (d+e x)+16 a^2 \left (15 a^2+4 b^2\right ) \sin (d+e x)\right ) \, dx}{12 a}\\ &=4 a \left (5 a^2+3 b^2\right ) x-\frac {8 (a+b \cos (d+e x)+a \sin (d+e x))^2 (a \cos (d+e x)-b \sin (d+e x))}{3 e}-\frac {20 (a+b \cos (d+e x)+a \sin (d+e x)) \left (a^2 \cos (d+e x)-a b \sin (d+e x)\right )}{3 e}+\frac {1}{3} \left (4 a \left (15 a^2+4 b^2\right )\right ) \int \sin (d+e x) \, dx+\frac {1}{3} \left (4 b \left (15 a^2+4 b^2\right )\right ) \int \cos (d+e x) \, dx\\ &=4 a \left (5 a^2+3 b^2\right ) x-\frac {4 a \left (15 a^2+4 b^2\right ) \cos (d+e x)}{3 e}+\frac {4 b \left (15 a^2+4 b^2\right ) \sin (d+e x)}{3 e}-\frac {8 (a+b \cos (d+e x)+a \sin (d+e x))^2 (a \cos (d+e x)-b \sin (d+e x))}{3 e}-\frac {20 (a+b \cos (d+e x)+a \sin (d+e x)) \left (a^2 \cos (d+e x)-a b \sin (d+e x)\right )}{3 e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.44, size = 135, normalized size = 0.86 \[ \frac {2 \left (6 a \left (5 a^2+3 b^2\right ) (d+e x)-9 a \left (a^2-b^2\right ) \sin (2 (d+e x))+9 b \left (5 a^2+b^2\right ) \sin (d+e x)+b \left (b^2-3 a^2\right ) \sin (3 (d+e x))-9 a \left (5 a^2+b^2\right ) \cos (d+e x)+a \left (a^2-3 b^2\right ) \cos (3 (d+e x))-18 a^2 b \cos (2 (d+e x))\right )}{3 e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.77, size = 127, normalized size = 0.81 \[ -\frac {4 \, {\left (18 \, a^{2} b \cos \left (e x + d\right )^{2} + 24 \, a^{3} \cos \left (e x + d\right ) - 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (e x + d\right )^{3} - 3 \, {\left (5 \, a^{3} + 3 \, a b^{2}\right )} e x - {\left (24 \, a^{2} b + 4 \, b^{3} - 2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (e x + d\right )^{2} - 9 \, {\left (a^{3} - a b^{2}\right )} \cos \left (e x + d\right )\right )} \sin \left (e x + d\right )\right )}}{3 \, e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 151, normalized size = 0.96 \[ -12 \, a^{2} b \cos \left (2 \, x e + 2 \, d\right ) e^{\left (-1\right )} + \frac {2}{3} \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (3 \, x e + 3 \, d\right ) e^{\left (-1\right )} - 6 \, {\left (5 \, a^{3} + a b^{2}\right )} \cos \left (x e + d\right ) e^{\left (-1\right )} - \frac {2}{3} \, {\left (3 \, a^{2} b - b^{3}\right )} e^{\left (-1\right )} \sin \left (3 \, x e + 3 \, d\right ) - 6 \, {\left (a^{3} - a b^{2}\right )} e^{\left (-1\right )} \sin \left (2 \, x e + 2 \, d\right ) + 6 \, {\left (5 \, a^{2} b + b^{3}\right )} e^{\left (-1\right )} \sin \left (x e + d\right ) + 4 \, {\left (5 \, a^{3} + 3 \, a b^{2}\right )} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 177, normalized size = 1.13 \[ \frac {8 a^{3} \left (e x +d \right )+24 \sin \left (e x +d \right ) a^{2} b -24 a^{3} \cos \left (e x +d \right )+24 a \,b^{2} \left (\frac {\sin \left (e x +d \right ) \cos \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-24 \left (\cos ^{2}\left (e x +d \right )\right ) a^{2} b +24 a^{3} \left (-\frac {\sin \left (e x +d \right ) \cos \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )+\frac {8 b^{3} \left (2+\cos ^{2}\left (e x +d \right )\right ) \sin \left (e x +d \right )}{3}-8 a \,b^{2} \left (\cos ^{3}\left (e x +d \right )\right )+8 a^{2} b \left (\sin ^{3}\left (e x +d \right )\right )-\frac {8 a^{3} \left (2+\sin ^{2}\left (e x +d \right )\right ) \cos \left (e x +d \right )}{3}}{e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 191, normalized size = 1.22 \[ -\frac {8 \, a b^{2} \cos \left (e x + d\right )^{3}}{e} + \frac {8 \, a^{2} b \sin \left (e x + d\right )^{3}}{e} + 8 \, a^{3} x + \frac {8 \, {\left (\cos \left (e x + d\right )^{3} - 3 \, \cos \left (e x + d\right )\right )} a^{3}}{3 \, e} - \frac {8 \, {\left (\sin \left (e x + d\right )^{3} - 3 \, \sin \left (e x + d\right )\right )} b^{3}}{3 \, e} - 24 \, a^{2} {\left (\frac {a \cos \left (e x + d\right )}{e} - \frac {b \sin \left (e x + d\right )}{e}\right )} - 6 \, {\left (\frac {4 \, a b \cos \left (e x + d\right )^{2}}{e} - \frac {{\left (2 \, e x + 2 \, d - \sin \left (2 \, e x + 2 \, d\right )\right )} a^{2}}{e} - \frac {{\left (2 \, e x + 2 \, d + \sin \left (2 \, e x + 2 \, d\right )\right )} b^{2}}{e}\right )} a \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.60, size = 292, normalized size = 1.86 \[ \frac {{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^5\,\left (24\,a^3+48\,a^2\,b-24\,a\,b^2+16\,b^3\right )-{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^4\,\left (48\,a^3-96\,a^2\,b+48\,a\,b^2\right )-16\,a\,b^2+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2\,\left (96\,a^2\,b-128\,a^3\right )+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^3\,\left (160\,a^2\,b+\frac {32\,b^3}{3}\right )-\frac {176\,a^3}{3}+\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\,\left (-24\,a^3+48\,a^2\,b+24\,a\,b^2+16\,b^3\right )}{e\,\left ({\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2+1\right )}+\frac {8\,a\,\mathrm {atan}\left (\frac {8\,a\,\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\,\left (5\,a^2+3\,b^2\right )}{40\,a^3+24\,a\,b^2}\right )\,\left (5\,a^2+3\,b^2\right )}{e}-\frac {8\,a\,\left (5\,a^2+3\,b^2\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\right )-\frac {e\,x}{2}\right )}{e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.75, size = 291, normalized size = 1.85 \[ \begin {cases} 12 a^{3} x \sin ^{2}{\left (d + e x \right )} + 12 a^{3} x \cos ^{2}{\left (d + e x \right )} + 8 a^{3} x - \frac {8 a^{3} \sin ^{2}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {12 a^{3} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {16 a^{3} \cos ^{3}{\left (d + e x \right )}}{3 e} - \frac {24 a^{3} \cos {\left (d + e x \right )}}{e} + \frac {8 a^{2} b \sin ^{3}{\left (d + e x \right )}}{e} + \frac {24 a^{2} b \sin {\left (d + e x \right )}}{e} - \frac {24 a^{2} b \cos ^{2}{\left (d + e x \right )}}{e} + 12 a b^{2} x \sin ^{2}{\left (d + e x \right )} + 12 a b^{2} x \cos ^{2}{\left (d + e x \right )} + \frac {12 a b^{2} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {8 a b^{2} \cos ^{3}{\left (d + e x \right )}}{e} + \frac {16 b^{3} \sin ^{3}{\left (d + e x \right )}}{3 e} + \frac {8 b^{3} \sin {\left (d + e x \right )} \cos ^{2}{\left (d + e x \right )}}{e} & \text {for}\: e \neq 0 \\x \left (2 a \sin {\relax (d )} + 2 a + 2 b \cos {\relax (d )}\right )^{3} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________