Optimal. Leaf size=170 \[ \frac {b \left (11 a^2+4 \left (b^2+c^2\right )\right ) \sin (d+e x)}{6 e}-\frac {c \left (11 a^2+4 \left (b^2+c^2\right )\right ) \cos (d+e x)}{6 e}+\frac {1}{2} a x \left (2 a^2+3 \left (b^2+c^2\right )\right )-\frac {(c \cos (d+e x)-b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))^2}{3 e}-\frac {5 (a c \cos (d+e x)-a b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))}{6 e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 170, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3120, 3146, 2637, 2638} \[ \frac {b \left (11 a^2+4 \left (b^2+c^2\right )\right ) \sin (d+e x)}{6 e}-\frac {c \left (11 a^2+4 \left (b^2+c^2\right )\right ) \cos (d+e x)}{6 e}+\frac {1}{2} a x \left (2 a^2+3 \left (b^2+c^2\right )\right )-\frac {(c \cos (d+e x)-b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))^2}{3 e}-\frac {5 (a c \cos (d+e x)-a b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))}{6 e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 2638
Rule 3120
Rule 3146
Rubi steps
\begin {align*} \int (a+b \cos (d+e x)+c \sin (d+e x))^3 \, dx &=-\frac {(c \cos (d+e x)-b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))^2}{3 e}+\frac {1}{3} \int (a+b \cos (d+e x)+c \sin (d+e x)) \left (3 a^2+2 \left (b^2+c^2\right )+5 a b \cos (d+e x)+5 a c \sin (d+e x)\right ) \, dx\\ &=-\frac {5 (a c \cos (d+e x)-a b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))}{6 e}-\frac {(c \cos (d+e x)-b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))^2}{3 e}+\frac {\int \left (3 a^2 \left (2 a^2+3 \left (b^2+c^2\right )\right )+a b \left (11 a^2+4 \left (b^2+c^2\right )\right ) \cos (d+e x)+a c \left (11 a^2+4 \left (b^2+c^2\right )\right ) \sin (d+e x)\right ) \, dx}{6 a}\\ &=\frac {1}{2} a \left (2 a^2+3 \left (b^2+c^2\right )\right ) x-\frac {5 (a c \cos (d+e x)-a b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))}{6 e}-\frac {(c \cos (d+e x)-b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))^2}{3 e}+\frac {1}{6} \left (b \left (11 a^2+4 \left (b^2+c^2\right )\right )\right ) \int \cos (d+e x) \, dx+\frac {1}{6} \left (c \left (11 a^2+4 \left (b^2+c^2\right )\right )\right ) \int \sin (d+e x) \, dx\\ &=\frac {1}{2} a \left (2 a^2+3 \left (b^2+c^2\right )\right ) x-\frac {c \left (11 a^2+4 \left (b^2+c^2\right )\right ) \cos (d+e x)}{6 e}+\frac {b \left (11 a^2+4 \left (b^2+c^2\right )\right ) \sin (d+e x)}{6 e}-\frac {5 (a c \cos (d+e x)-a b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))}{6 e}-\frac {(c \cos (d+e x)-b \sin (d+e x)) (a+b \cos (d+e x)+c \sin (d+e x))^2}{3 e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.43, size = 144, normalized size = 0.85 \[ \frac {6 a \left (2 a^2+3 \left (b^2+c^2\right )\right ) (d+e x)+9 b \left (4 a^2+b^2+c^2\right ) \sin (d+e x)-9 c \left (4 a^2+b^2+c^2\right ) \cos (d+e x)+9 a \left (b^2-c^2\right ) \sin (2 (d+e x))-18 a b c \cos (2 (d+e x))+b \left (b^2-3 c^2\right ) \sin (3 (d+e x))+c \left (c^2-3 b^2\right ) \cos (3 (d+e x))}{12 e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.94, size = 147, normalized size = 0.86 \[ -\frac {18 \, a b c \cos \left (e x + d\right )^{2} + 2 \, {\left (3 \, b^{2} c - c^{3}\right )} \cos \left (e x + d\right )^{3} - 3 \, {\left (2 \, a^{3} + 3 \, a b^{2} + 3 \, a c^{2}\right )} e x + 6 \, {\left (3 \, a^{2} c + c^{3}\right )} \cos \left (e x + d\right ) - {\left (18 \, a^{2} b + 4 \, b^{3} + 6 \, b c^{2} + 2 \, {\left (b^{3} - 3 \, b c^{2}\right )} \cos \left (e x + d\right )^{2} + 9 \, {\left (a b^{2} - a c^{2}\right )} \cos \left (e x + d\right )\right )} \sin \left (e x + d\right )}{6 \, e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 167, normalized size = 0.98 \[ -\frac {3}{2} \, a b c \cos \left (2 \, x e + 2 \, d\right ) e^{\left (-1\right )} - \frac {1}{12} \, {\left (3 \, b^{2} c - c^{3}\right )} \cos \left (3 \, x e + 3 \, d\right ) e^{\left (-1\right )} - \frac {3}{4} \, {\left (4 \, a^{2} c + b^{2} c + c^{3}\right )} \cos \left (x e + d\right ) e^{\left (-1\right )} + \frac {1}{12} \, {\left (b^{3} - 3 \, b c^{2}\right )} e^{\left (-1\right )} \sin \left (3 \, x e + 3 \, d\right ) + \frac {3}{4} \, {\left (a b^{2} - a c^{2}\right )} e^{\left (-1\right )} \sin \left (2 \, x e + 2 \, d\right ) + \frac {3}{4} \, {\left (4 \, a^{2} b + b^{3} + b c^{2}\right )} e^{\left (-1\right )} \sin \left (x e + d\right ) + \frac {1}{2} \, {\left (2 \, a^{3} + 3 \, a b^{2} + 3 \, a c^{2}\right )} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 177, normalized size = 1.04 \[ \frac {a^{3} \left (e x +d \right )+3 \sin \left (e x +d \right ) a^{2} b -3 a^{2} c \cos \left (e x +d \right )+3 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 )-3 a b c \left (\cos ^{2}\left (e x +d \right )\right )+3 a \,c^{2} \left (-\frac {\sin \left (e x +d \right ) \cos \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )+\frac {b^{3} \left (2+\cos ^{2}\left (e x +d \right )\right ) \sin \left (e x +d \right )}{3}-\left (\cos ^{3}\left (e x +d \right )\right ) b^{2} c +c^{2} b \left (\sin ^{3}\left (e x +d \right )\right )-\frac {c^{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 = 189, normalized size = 1.11 \[ -\frac {b^{2} c \cos \left (e x + d\right )^{3}}{e} + \frac {b c^{2} \sin \left (e x + d\right )^{3}}{e} + a^{3} x - \frac {{\left (\sin \left (e x + d\right )^{3} - 3 \, \sin \left (e x + d\right )\right )} b^{3}}{3 \, e} + \frac {{\left (\cos \left (e x + d\right )^{3} - 3 \, \cos \left (e x + d\right )\right )} c^{3}}{3 \, e} - 3 \, a^{2} {\left (\frac {c \cos \left (e x + d\right )}{e} - \frac {b \sin \left (e x + d\right )}{e}\right )} - \frac {3}{4} \, {\left (\frac {4 \, 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}}{e} - \frac {{\left (2 \, e x + 2 \, d - \sin \left (2 \, e x + 2 \, d\right )\right )} c^{2}}{e}\right )} a \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.70, size = 333, normalized size = 1.96 \[ \frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\,\left (2\,a^2+3\,b^2+3\,c^2\right )}{2\,a^3+3\,a\,b^2+3\,a\,c^2}\right )\,\left (2\,a^2+3\,b^2+3\,c^2\right )}{e}-\frac {a\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\right )-\frac {e\,x}{2}\right )\,\left (2\,a^2+3\,b^2+3\,c^2\right )}{e}-\frac {{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2\,\left (12\,a^2\,c-12\,b\,a\,c+4\,c^3\right )-{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^3\,\left (12\,a^2\,b+\frac {4\,b^3}{3}+8\,b\,c^2\right )-\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\,\left (6\,a^2\,b+3\,a\,b^2-3\,a\,c^2+2\,b^3\right )+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^4\,\left (6\,c\,a^2-12\,c\,a\,b+6\,c\,b^2\right )+6\,a^2\,c+2\,b^2\,c-{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^5\,\left (6\,a^2\,b-3\,a\,b^2+3\,a\,c^2+2\,b^3\right )+\frac {4\,c^3}{3}}{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 )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.76, size = 294, normalized size = 1.73 \[ \begin {cases} a^{3} x + \frac {3 a^{2} b \sin {\left (d + e x \right )}}{e} - \frac {3 a^{2} c \cos {\left (d + e x \right )}}{e} + \frac {3 a b^{2} x \sin ^{2}{\left (d + e x \right )}}{2} + \frac {3 a b^{2} x \cos ^{2}{\left (d + e x \right )}}{2} + \frac {3 a b^{2} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{2 e} - \frac {3 a b c \cos ^{2}{\left (d + e x \right )}}{e} + \frac {3 a c^{2} x \sin ^{2}{\left (d + e x \right )}}{2} + \frac {3 a c^{2} x \cos ^{2}{\left (d + e x \right )}}{2} - \frac {3 a c^{2} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{2 e} + \frac {2 b^{3} \sin ^{3}{\left (d + e x \right )}}{3 e} + \frac {b^{3} \sin {\left (d + e x \right )} \cos ^{2}{\left (d + e x \right )}}{e} - \frac {b^{2} c \cos ^{3}{\left (d + e x \right )}}{e} + \frac {b c^{2} \sin ^{3}{\left (d + e x \right )}}{e} - \frac {c^{3} \sin ^{2}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {2 c^{3} \cos ^{3}{\left (d + e x \right )}}{3 e} & \text {for}\: e \neq 0 \\x \left (a + b \cos {\relax (d )} + c \sin {\relax (d )}\right )^{3} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________