Optimal. Leaf size=370 \[ -\frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b-d)}{d}+x (b-d)\right )}{2 b^2}+\frac{\cos (a+b x) \text{CosIntegral}(c+d x)}{b^2}-\frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b+d)}{d}+x (b+d)\right )}{2 b^2}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b-d)+\frac{c (b-d)}{d}\right )}{2 b^2}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b+d)+\frac{c (b+d)}{d}\right )}{2 b^2}+\frac{c \sin \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b-d)}{d}+x (b-d)\right )}{2 b d}+\frac{c \sin \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b+d)}{d}+x (b+d)\right )}{2 b d}+\frac{x \sin (a+b x) \text{CosIntegral}(c+d x)}{b}+\frac{c \cos \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b-d)+\frac{c (b-d)}{d}\right )}{2 b d}+\frac{c \cos \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b+d)+\frac{c (b+d)}{d}\right )}{2 b d}+\frac{\cos (a+x (b-d)-c)}{2 b (b-d)}+\frac{\cos (a+x (b+d)+c)}{2 b (b+d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.801469, antiderivative size = 370, normalized size of antiderivative = 1., number of steps used = 24, number of rules used = 10, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.714, Rules used = {6514, 6742, 4574, 2638, 4430, 3303, 3299, 3302, 6518, 4429} \[ -\frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b-d)}{d}+x (b-d)\right )}{2 b^2}+\frac{\cos (a+b x) \text{CosIntegral}(c+d x)}{b^2}-\frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b+d)}{d}+x (b+d)\right )}{2 b^2}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b-d)+\frac{c (b-d)}{d}\right )}{2 b^2}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b+d)+\frac{c (b+d)}{d}\right )}{2 b^2}+\frac{c \sin \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b-d)}{d}+x (b-d)\right )}{2 b d}+\frac{c \sin \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{c (b+d)}{d}+x (b+d)\right )}{2 b d}+\frac{x \sin (a+b x) \text{CosIntegral}(c+d x)}{b}+\frac{c \cos \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b-d)+\frac{c (b-d)}{d}\right )}{2 b d}+\frac{c \cos \left (a-\frac{b c}{d}\right ) \text{Si}\left (x (b+d)+\frac{c (b+d)}{d}\right )}{2 b d}+\frac{\cos (a+x (b-d)-c)}{2 b (b-d)}+\frac{\cos (a+x (b+d)+c)}{2 b (b+d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6514
Rule 6742
Rule 4574
Rule 2638
Rule 4430
Rule 3303
Rule 3299
Rule 3302
Rule 6518
Rule 4429
Rubi steps
\begin{align*} \int x \cos (a+b x) \text{Ci}(c+d x) \, dx &=\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}-\frac{\int \text{Ci}(c+d x) \sin (a+b x) \, dx}{b}-\frac{d \int \frac{x \cos (c+d x) \sin (a+b x)}{c+d x} \, dx}{b}\\ &=\frac{\cos (a+b x) \text{Ci}(c+d x)}{b^2}+\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}-\frac{d \int \frac{\cos (a+b x) \cos (c+d x)}{c+d x} \, dx}{b^2}-\frac{d \int \left (\frac{\cos (c+d x) \sin (a+b x)}{d}-\frac{c \cos (c+d x) \sin (a+b x)}{d (c+d x)}\right ) \, dx}{b}\\ &=\frac{\cos (a+b x) \text{Ci}(c+d x)}{b^2}+\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}-\frac{\int \cos (c+d x) \sin (a+b x) \, dx}{b}+\frac{c \int \frac{\cos (c+d x) \sin (a+b x)}{c+d x} \, dx}{b}-\frac{d \int \left (\frac{\cos (a-c+(b-d) x)}{2 (c+d x)}+\frac{\cos (a+c+(b+d) x)}{2 (c+d x)}\right ) \, dx}{b^2}\\ &=\frac{\cos (a+b x) \text{Ci}(c+d x)}{b^2}+\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}-\frac{\int \left (\frac{1}{2} \sin (a-c+(b-d) x)+\frac{1}{2} \sin (a+c+(b+d) x)\right ) \, dx}{b}+\frac{c \int \left (\frac{\sin (a-c+(b-d) x)}{2 (c+d x)}+\frac{\sin (a+c+(b+d) x)}{2 (c+d x)}\right ) \, dx}{b}-\frac{d \int \frac{\cos (a-c+(b-d) x)}{c+d x} \, dx}{2 b^2}-\frac{d \int \frac{\cos (a+c+(b+d) x)}{c+d x} \, dx}{2 b^2}\\ &=\frac{\cos (a+b x) \text{Ci}(c+d x)}{b^2}+\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}-\frac{\int \sin (a-c+(b-d) x) \, dx}{2 b}-\frac{\int \sin (a+c+(b+d) x) \, dx}{2 b}+\frac{c \int \frac{\sin (a-c+(b-d) x)}{c+d x} \, dx}{2 b}+\frac{c \int \frac{\sin (a+c+(b+d) x)}{c+d x} \, dx}{2 b}-\frac{\left (d \cos \left (a-\frac{b c}{d}\right )\right ) \int \frac{\cos \left (\frac{c (b-d)}{d}+(b-d) x\right )}{c+d x} \, dx}{2 b^2}-\frac{\left (d \cos \left (a-\frac{b c}{d}\right )\right ) \int \frac{\cos \left (\frac{c (b+d)}{d}+(b+d) x\right )}{c+d x} \, dx}{2 b^2}+\frac{\left (d \sin \left (a-\frac{b c}{d}\right )\right ) \int \frac{\sin \left (\frac{c (b-d)}{d}+(b-d) x\right )}{c+d x} \, dx}{2 b^2}+\frac{\left (d \sin \left (a-\frac{b c}{d}\right )\right ) \int \frac{\sin \left (\frac{c (b+d)}{d}+(b+d) x\right )}{c+d x} \, dx}{2 b^2}\\ &=\frac{\cos (a-c+(b-d) x)}{2 b (b-d)}+\frac{\cos (a+c+(b+d) x)}{2 b (b+d)}-\frac{\cos \left (a-\frac{b c}{d}\right ) \text{Ci}\left (\frac{c (b-d)}{d}+(b-d) x\right )}{2 b^2}+\frac{\cos (a+b x) \text{Ci}(c+d x)}{b^2}-\frac{\cos \left (a-\frac{b c}{d}\right ) \text{Ci}\left (\frac{c (b+d)}{d}+(b+d) x\right )}{2 b^2}+\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{c (b-d)}{d}+(b-d) x\right )}{2 b^2}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{c (b+d)}{d}+(b+d) x\right )}{2 b^2}+\frac{\left (c \cos \left (a-\frac{b c}{d}\right )\right ) \int \frac{\sin \left (\frac{c (b-d)}{d}+(b-d) x\right )}{c+d x} \, dx}{2 b}+\frac{\left (c \cos \left (a-\frac{b c}{d}\right )\right ) \int \frac{\sin \left (\frac{c (b+d)}{d}+(b+d) x\right )}{c+d x} \, dx}{2 b}+\frac{\left (c \sin \left (a-\frac{b c}{d}\right )\right ) \int \frac{\cos \left (\frac{c (b-d)}{d}+(b-d) x\right )}{c+d x} \, dx}{2 b}+\frac{\left (c \sin \left (a-\frac{b c}{d}\right )\right ) \int \frac{\cos \left (\frac{c (b+d)}{d}+(b+d) x\right )}{c+d x} \, dx}{2 b}\\ &=\frac{\cos (a-c+(b-d) x)}{2 b (b-d)}+\frac{\cos (a+c+(b+d) x)}{2 b (b+d)}-\frac{\cos \left (a-\frac{b c}{d}\right ) \text{Ci}\left (\frac{c (b-d)}{d}+(b-d) x\right )}{2 b^2}+\frac{\cos (a+b x) \text{Ci}(c+d x)}{b^2}-\frac{\cos \left (a-\frac{b c}{d}\right ) \text{Ci}\left (\frac{c (b+d)}{d}+(b+d) x\right )}{2 b^2}+\frac{c \text{Ci}\left (\frac{c (b-d)}{d}+(b-d) x\right ) \sin \left (a-\frac{b c}{d}\right )}{2 b d}+\frac{c \text{Ci}\left (\frac{c (b+d)}{d}+(b+d) x\right ) \sin \left (a-\frac{b c}{d}\right )}{2 b d}+\frac{x \text{Ci}(c+d x) \sin (a+b x)}{b}+\frac{c \cos \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{c (b-d)}{d}+(b-d) x\right )}{2 b d}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{c (b-d)}{d}+(b-d) x\right )}{2 b^2}+\frac{c \cos \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{c (b+d)}{d}+(b+d) x\right )}{2 b d}+\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{c (b+d)}{d}+(b+d) x\right )}{2 b^2}\\ \end{align*}
Mathematica [C] time = 4.40565, size = 433, normalized size = 1.17 \[ \frac{-i \exp \left (-\frac{i (d (a+c+d x)+b (c+d x))}{d}\right ) \left (\left (b^2-d^2\right ) (b c-i d) e^{i (2 a+x (b+d)+c)} \text{ExpIntegralEi}\left (\frac{i (b-d) (c+d x)}{d}\right )+e^{\frac{i b c}{d}} \left (i b d \left (d \left (-1+e^{2 i (a+b x)}\right )+b \left (1+e^{2 i (a+b x)}\right )\right )-\left (b^2-d^2\right ) (b c+i d) e^{\frac{i (b+d) (c+d x)}{d}} \text{ExpIntegralEi}\left (-\frac{i (b+d) (c+d x)}{d}\right )\right )\right )-i e^{-\frac{i (d (a-d x)+b (c+d x))}{d}} \left (\left (b^2-d^2\right ) (b c-i d) e^{i (2 a+x (b-d))} \text{ExpIntegralEi}\left (\frac{i (b+d) (c+d x)}{d}\right )+i b d e^{\frac{i c (b+d)}{d}} \left (-d e^{2 i (a+b x)}+b e^{2 i (a+b x)}+b+d\right )-\left (b^2-d^2\right ) (b c+i d) e^{i b \left (\frac{2 c}{d}+x\right )-i d x} \text{ExpIntegralEi}\left (-\frac{i (b-d) (c+d x)}{d}\right )\right )+4 d (b-d) (b+d) \text{CosIntegral}(c+d x) (b x \sin (a+b x)+\cos (a+b x))}{4 b^2 d (b-d) (b+d)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.105, size = 1212, normalized size = 3.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x{\rm Ci}\left (d x + c\right ) \cos \left (b x + a\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (x \cos \left (b x + a\right ) \operatorname{Ci}\left (d x + c\right ), x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \cos{\left (a + b x \right )} \operatorname{Ci}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]