Integrand size = 13, antiderivative size = 27 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\frac {1}{2} x \cos (a-c)+\frac {\sin (a+c+2 b x)}{4 b} \]
[Out]
Time = 0.02 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4666, 2717} \[ \int \cos (a+b x) \cos (c+b x) \, dx=\frac {\sin (a+2 b x+c)}{4 b}+\frac {1}{2} x \cos (a-c) \]
[In]
[Out]
Rule 2717
Rule 4666
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{2} \cos (a-c)+\frac {1}{2} \cos (a+c+2 b x)\right ) \, dx \\ & = \frac {1}{2} x \cos (a-c)+\frac {1}{2} \int \cos (a+c+2 b x) \, dx \\ & = \frac {1}{2} x \cos (a-c)+\frac {\sin (a+c+2 b x)}{4 b} \\ \end{align*}
Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\frac {2 b x \cos (a-c)+\sin (a+c+2 b x)}{4 b} \]
[In]
[Out]
Time = 0.40 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89
method | result | size |
default | \(\frac {x \cos \left (a -c \right )}{2}+\frac {\sin \left (2 x b +a +c \right )}{4 b}\) | \(24\) |
risch | \(\frac {x \cos \left (a -c \right )}{2}+\frac {\sin \left (2 x b +a +c \right )}{4 b}\) | \(24\) |
parallelrisch | \(\frac {b x \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )-1\right ) \left (\tan \left (\frac {a}{2}+\frac {x b}{2}\right )+1\right ) \tan \left (\frac {x b}{2}+\frac {c}{2}\right )^{2}+\left (4 \tan \left (\frac {a}{2}+\frac {x b}{2}\right ) x b -2 \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}+2\right ) \tan \left (\frac {x b}{2}+\frac {c}{2}\right )-\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2} x b +x b}{2 b \left (1+\tan \left (\frac {x b}{2}+\frac {c}{2}\right )^{2}\right ) \left (1+\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right )}\) | \(129\) |
norman | \(\frac {\frac {\tan \left (\frac {a}{2}+\frac {x b}{2}\right )}{b}+\frac {x}{2}-\frac {x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}}{2}-\frac {x \tan \left (\frac {x b}{2}+\frac {c}{2}\right )^{2}}{2}+2 x \tan \left (\frac {a}{2}+\frac {x b}{2}\right ) \tan \left (\frac {x b}{2}+\frac {c}{2}\right )+\frac {x \tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2} \tan \left (\frac {x b}{2}+\frac {c}{2}\right )^{2}}{2}-\frac {\tan \left (\frac {a}{2}+\frac {x b}{2}\right ) \tan \left (\frac {x b}{2}+\frac {c}{2}\right )^{2}}{b}}{\left (1+\tan \left (\frac {a}{2}+\frac {x b}{2}\right )^{2}\right ) \left (1+\tan \left (\frac {x b}{2}+\frac {c}{2}\right )^{2}\right )}\) | \(148\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (23) = 46\).
Time = 0.25 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.85 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\frac {b x \cos \left (-a + c\right ) + \cos \left (b x + c\right ) \cos \left (-a + c\right ) \sin \left (b x + c\right ) - \cos \left (b x + c\right )^{2} \sin \left (-a + c\right )}{2 \, b} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (20) = 40\).
Time = 0.16 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.15 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\begin {cases} \frac {x \sin {\left (a + b x \right )} \sin {\left (b x + c \right )}}{2} + \frac {x \cos {\left (a + b x \right )} \cos {\left (b x + c \right )}}{2} + \frac {\sin {\left (b x + c \right )} \cos {\left (a + b x \right )}}{2 b} & \text {for}\: b \neq 0 \\x \cos {\left (a \right )} \cos {\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\frac {1}{2} \, x \cos \left (-a + c\right ) + \frac {\sin \left (2 \, b x + a + c\right )}{4 \, b} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\frac {1}{2} \, x \cos \left (a - c\right ) + \frac {\sin \left (2 \, b x + a + c\right )}{4 \, b} \]
[In]
[Out]
Time = 27.38 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.33 \[ \int \cos (a+b x) \cos (c+b x) \, dx=\left \{\begin {array}{cl} x\,\cos \left (a\right )\,\cos \left (c\right ) & \text {\ if\ \ }b=0\\ \frac {x\,\cos \left (a-c\right )}{2}+\frac {\sin \left (a+c+2\,b\,x\right )}{4\,b} & \text {\ if\ \ }b\neq 0 \end {array}\right . \]
[In]
[Out]