Optimal. Leaf size=370 \[ -\frac {\cos \left (a-\frac {b c}{d}\right ) \text {Ci}\left (x (b-d)+\frac {c (b-d)}{d}\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 (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 {\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 {Ci}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 b d}+\frac {c \sin \left (a-\frac {b c}{d}\right ) \text {Ci}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 b d}+\frac {x \sin (a+b x) \text {Ci}(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.80, antiderivative size = 370, normalized size of antiderivative = 1.00, 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 2638
Rule 3299
Rule 3302
Rule 3303
Rule 4429
Rule 4430
Rule 4574
Rule 6514
Rule 6518
Rule 6742
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 = 3.56, size = 394, normalized size = 1.06 \[ \frac {\text {Ci}(c+d x) (b x \sin (a+b x)+\cos (a+b x))}{b^2}+\frac {i \exp \left (-\frac {i (d (a+c+d x)+b (c+d x))}{d}\right ) \left (e^{\frac {i b c}{d}} \left (\left (b^2-d^2\right ) (b c+i d) e^{\frac {i (b+d) (c+d x)}{d}} \text {Ei}\left (-\frac {i (b+d) (c+d x)}{d}\right )-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 )\right )-\left (b^2-d^2\right ) (b c-i d) e^{i (2 a+x (b+d)+c)} \text {Ei}\left (\frac {i (b-d) (c+d x)}{d}\right )\right )}{4 b^2 d (b-d) (b+d)}+\frac {i e^{-i (a-c)} \left ((-b c+i d) e^{2 i a-\frac {i c (b+d)}{d}} \text {Ei}\left (\frac {i (b+d) (c+d x)}{d}\right )-i b d \left (\frac {e^{i (2 a+x (b+d))}}{b+d}+\frac {e^{-i x (b-d)}}{b-d}\right )+(b c+i d) e^{\frac {i c (b-d)}{d}} \text {Ei}\left (-\frac {i (b-d) (c+d x)}{d}\right )\right )}{4 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.76, size = 0, normalized size = 0.00 \[ {\rm integral}\left (x \cos \left (b x + a\right ) \operatorname {Ci}\left (d x + c\right ), x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 1212, normalized size = 3.28 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x {\rm Ci}\left (d x + c\right ) \cos \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int x\,\mathrm {cosint}\left (c+d\,x\right )\,\cos \left (a+b\,x\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \cos {\left (a + b x \right )} \operatorname {Ci}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________