Integrand size = 24, antiderivative size = 81 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=2 \left (3 a^2+c^2\right ) x-\frac {6 a c \cos (d+e x)}{e}-\frac {6 a^2 \sin (d+e x)}{e}-\frac {2 (c \cos (d+e x)+a \sin (d+e x)) (a-a \cos (d+e x)+c \sin (d+e x))}{e} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3199, 2717, 2718} \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=2 x \left (3 a^2+c^2\right )-\frac {6 a^2 \sin (d+e x)}{e}-\frac {6 a c \cos (d+e x)}{e}-\frac {2 (a \sin (d+e x)+c \cos (d+e x)) (a (-\cos (d+e x))+a+c \sin (d+e x))}{e} \]
[In]
[Out]
Rule 2717
Rule 2718
Rule 3199
Rubi steps \begin{align*} \text {integral}& = -\frac {2 (c \cos (d+e x)+a \sin (d+e x)) (a-a \cos (d+e x)+c \sin (d+e x))}{e}+\frac {1}{2} \int \left (4 \left (3 a^2+c^2\right )-12 a^2 \cos (d+e x)+12 a c \sin (d+e x)\right ) \, dx \\ & = 2 \left (3 a^2+c^2\right ) x-\frac {2 (c \cos (d+e x)+a \sin (d+e x)) (a-a \cos (d+e x)+c \sin (d+e x))}{e}-\left (6 a^2\right ) \int \cos (d+e x) \, dx+(6 a c) \int \sin (d+e x) \, dx \\ & = 2 \left (3 a^2+c^2\right ) x-\frac {6 a c \cos (d+e x)}{e}-\frac {6 a^2 \sin (d+e x)}{e}-\frac {2 (c \cos (d+e x)+a \sin (d+e x)) (a-a \cos (d+e x)+c \sin (d+e x))}{e} \\ \end{align*}
Time = 0.77 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.14 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=4 \left (\frac {\left (3 a^2+c^2\right ) (d+e x)}{2 e}-\frac {2 a c \cos (d+e x)}{e}+\frac {a c \cos (2 (d+e x))}{2 e}-\frac {2 a^2 \sin (d+e x)}{e}+\frac {\left (a^2-c^2\right ) \sin (2 (d+e x))}{4 e}\right ) \]
[In]
[Out]
Time = 0.85 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.95
method | result | size |
parallelrisch | \(\frac {\left (a^{2}-c^{2}\right ) \sin \left (2 e x +2 d \right )+6 a^{2} e x +2 c^{2} e x -8 a^{2} \sin \left (e x +d \right )-8 a c \cos \left (e x +d \right )+2 a c \cos \left (2 e x +2 d \right )-10 a c}{e}\) | \(77\) |
risch | \(6 a^{2} x +2 x \,c^{2}-\frac {8 a c \cos \left (e x +d \right )}{e}-\frac {8 a^{2} \sin \left (e x +d \right )}{e}+\frac {2 a c \cos \left (2 e x +2 d \right )}{e}+\frac {\sin \left (2 e x +2 d \right ) a^{2}}{e}-\frac {\sin \left (2 e x +2 d \right ) c^{2}}{e}\) | \(90\) |
derivativedivides | \(\frac {4 a^{2} \left (\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )+4 a c \cos \left (e x +d \right )^{2}-8 a^{2} \sin \left (e x +d \right )+4 c^{2} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-8 a c \cos \left (e x +d \right )+4 a^{2} \left (e x +d \right )}{e}\) | \(100\) |
default | \(\frac {4 a^{2} \left (\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )+4 a c \cos \left (e x +d \right )^{2}-8 a^{2} \sin \left (e x +d \right )+4 c^{2} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-8 a c \cos \left (e x +d \right )+4 a^{2} \left (e x +d \right )}{e}\) | \(100\) |
parts | \(-\frac {8 a \left (\frac {\sin \left (e x +d \right )^{2} c}{2}+a \sin \left (e x +d \right )\right )}{e}+4 a^{2} x +\frac {4 a^{2} \left (\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )}{e}+\frac {4 c^{2} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )}{e}-\frac {8 a c \cos \left (e x +d \right )}{e}\) | \(107\) |
norman | \(\frac {\left (6 a^{2}+2 c^{2}\right ) x +\left (6 a^{2}+2 c^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{4}+\left (12 a^{2}+4 c^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}+\frac {16 a c \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{4}}{e}-\frac {4 \left (3 a^{2}+c^{2}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )}{e}-\frac {4 \left (5 a^{2}-c^{2}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{3}}{e}}{\left (1+\tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}\right )^{2}}\) | \(147\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.88 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=\frac {2 \, {\left (2 \, a c \cos \left (e x + d\right )^{2} + {\left (3 \, a^{2} + c^{2}\right )} e x - 4 \, a c \cos \left (e x + d\right ) - {\left (4 \, a^{2} - {\left (a^{2} - c^{2}\right )} \cos \left (e x + d\right )\right )} \sin \left (e x + d\right )\right )}}{e} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 170 vs. \(2 (78) = 156\).
Time = 0.10 (sec) , antiderivative size = 170, normalized size of antiderivative = 2.10 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=\begin {cases} 2 a^{2} x \sin ^{2}{\left (d + e x \right )} + 2 a^{2} x \cos ^{2}{\left (d + e x \right )} + 4 a^{2} x + \frac {2 a^{2} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {8 a^{2} \sin {\left (d + e x \right )}}{e} - \frac {4 a c \sin ^{2}{\left (d + e x \right )}}{e} - \frac {8 a c \cos {\left (d + e x \right )}}{e} + 2 c^{2} x \sin ^{2}{\left (d + e x \right )} + 2 c^{2} x \cos ^{2}{\left (d + e x \right )} - \frac {2 c^{2} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} & \text {for}\: e \neq 0 \\x \left (- 2 a \cos {\left (d \right )} + 2 a + 2 c \sin {\left (d \right )}\right )^{2} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.21 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=4 \, a^{2} x + \frac {4 \, a 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 )} a^{2}}{e} + \frac {{\left (2 \, e x + 2 \, d - \sin \left (2 \, e x + 2 \, d\right )\right )} c^{2}}{e} - 8 \, a {\left (\frac {c \cos \left (e x + d\right )}{e} + \frac {a \sin \left (e x + d\right )}{e}\right )} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.96 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=2 \, {\left (3 \, a^{2} + c^{2}\right )} x + \frac {2 \, a c \cos \left (2 \, e x + 2 \, d\right )}{e} - \frac {8 \, a c \cos \left (e x + d\right )}{e} - \frac {8 \, a^{2} \sin \left (e x + d\right )}{e} + \frac {{\left (a^{2} - c^{2}\right )} \sin \left (2 \, e x + 2 \, d\right )}{e} \]
[In]
[Out]
Time = 26.00 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.04 \[ \int (2 a-2 a \cos (d+e x)+2 c \sin (d+e x))^2 \, dx=\frac {a^2\,\sin \left (2\,d+2\,e\,x\right )-8\,a^2\,\sin \left (d+e\,x\right )-c^2\,\sin \left (2\,d+2\,e\,x\right )+16\,a\,c\,{\sin \left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2-4\,a\,c\,{\sin \left (d+e\,x\right )}^2+6\,a^2\,e\,x+2\,c^2\,e\,x}{e} \]
[In]
[Out]