Optimal. Leaf size=371 \[ \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 {CosIntegral}\left (\frac {c (b-d)}{d}+(b-d) x\right )}{2 b^2}+\frac {\cos \left (a-\frac {b c}{d}\right ) \text {CosIntegral}\left (\frac {c (b+d)}{d}+(b+d) x\right )}{2 b^2}+\frac {c \text {CosIntegral}\left (\frac {c (b-d)}{d}+(b-d) x\right ) \sin \left (a-\frac {b c}{d}\right )}{2 b d}-\frac {c \text {CosIntegral}\left (\frac {c (b+d)}{d}+(b+d) x\right ) \sin \left (a-\frac {b c}{d}\right )}{2 b d}+\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 {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.64, antiderivative size = 371, 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 = {6648, 6874,
4670, 2718, 4515, 3384, 3380, 3383, 6652, 4513} \begin {gather*} -\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 \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 (a+b x) \text {Si}(c+d x)}{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 {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 {x \cos (a+b x) \text {Si}(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 {\cos (a+x (b-d)-c)}{2 b (b-d)}-\frac {\cos (a+x (b+d)+c)}{2 b (b+d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3380
Rule 3383
Rule 3384
Rule 4513
Rule 4515
Rule 4670
Rule 6648
Rule 6652
Rule 6874
Rubi steps
\begin {align*} \int x \sin (a+b x) \text {Si}(c+d x) \, dx &=-\frac {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\int \cos (a+b x) \text {Si}(c+d x) \, dx}{b}+\frac {d \int \frac {x \cos (a+b x) \sin (c+d x)}{c+d x} \, dx}{b}\\ &=-\frac {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{b^2}-\frac {d \int \frac {\sin (a+b x) \sin (c+d x)}{c+d x} \, dx}{b^2}+\frac {d \int \left (\frac {\cos (a+b x) \sin (c+d x)}{d}-\frac {c \cos (a+b x) \sin (c+d x)}{d (c+d x)}\right ) \, dx}{b}\\ &=-\frac {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{b^2}+\frac {\int \cos (a+b x) \sin (c+d x) \, dx}{b}-\frac {c \int \frac {\cos (a+b x) \sin (c+d 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 {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{b^2}+\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 {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{b^2}-\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 \left (a-\frac {b c}{d}\right ) \text {Ci}\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 {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{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 \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 {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 {x \cos (a+b x) \text {Si}(c+d x)}{b}+\frac {\sin (a+b x) \text {Si}(c+d x)}{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] Result contains complex when optimal does not.
time = 3.28, size = 345, normalized size = 0.93 \begin {gather*} \frac {e^{-i (a+c)} \left (b d \left (-\frac {e^{-i (b+d) x}}{b+d}+\frac {e^{i (2 a+b x-d x)}}{b-d}\right )-i (b c-i d) e^{\frac {i (-b c+(2 a+c) d)}{d}} \text {Ei}\left (\frac {i (b-d) (c+d x)}{d}\right )+(-i b c+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}+\frac {e^{-i (a-c)} \left (b d \left (\frac {e^{-i (b-d) x}}{b-d}-\frac {e^{i (2 a+(b+d) x)}}{b+d}\right )+i (b c+i d) e^{\frac {i c (b-d)}{d}} \text {Ei}\left (-\frac {i (b-d) (c+d x)}{d}\right )+(i b c+d) e^{-\frac {i (b c-2 a d+c d)}{d}} \text {Ei}\left (\frac {i (b+d) (c+d x)}{d}\right )\right )}{4 b^2 d}-\frac {(b x \cos (a+b x)-\sin (a+b x)) \text {Si}(c+d x)}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1245\) vs.
\(2(351)=702\).
time = 2.03, size = 1246, normalized size = 3.36
method | result | size |
default | \(\text {Expression too large to display}\) | \(1246\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 580, normalized size = 1.56 \begin {gather*} \frac {4 \, b d^{2} \cos \left (b x + a\right ) \cos \left (d x + c\right ) + 4 \, b^{2} d \sin \left (b x + a\right ) \sin \left (d x + c\right ) - 4 \, {\left (b^{3} d - b d^{3}\right )} x \cos \left (b x + a\right ) \operatorname {Si}\left (d x + c\right ) + 4 \, {\left (b^{2} d - d^{3}\right )} \sin \left (b x + a\right ) \operatorname {Si}\left (d x + c\right ) + {\left ({\left (b^{2} d - d^{3}\right )} \operatorname {Ci}\left (\frac {b c + c d + {\left (b d + d^{2}\right )} x}{d}\right ) + {\left (b^{2} d - d^{3}\right )} \operatorname {Ci}\left (-\frac {b c + c d + {\left (b d + d^{2}\right )} x}{d}\right ) - {\left (b^{2} d - d^{3}\right )} \operatorname {Ci}\left (\frac {b c - c d + {\left (b d - d^{2}\right )} x}{d}\right ) - {\left (b^{2} d - d^{3}\right )} \operatorname {Ci}\left (-\frac {b c - c d + {\left (b d - d^{2}\right )} x}{d}\right ) - 2 \, {\left (b^{3} c - b c d^{2}\right )} \operatorname {Si}\left (\frac {b c + c d + {\left (b d + d^{2}\right )} x}{d}\right ) - 2 \, {\left (b^{3} c - b c d^{2}\right )} \operatorname {Si}\left (-\frac {b c - c d + {\left (b d - d^{2}\right )} x}{d}\right )\right )} \cos \left (-\frac {b c - a d}{d}\right ) - {\left ({\left (b^{3} c - b c d^{2}\right )} \operatorname {Ci}\left (\frac {b c + c d + {\left (b d + d^{2}\right )} x}{d}\right ) + {\left (b^{3} c - b c d^{2}\right )} \operatorname {Ci}\left (-\frac {b c + c d + {\left (b d + d^{2}\right )} x}{d}\right ) - {\left (b^{3} c - b c d^{2}\right )} \operatorname {Ci}\left (\frac {b c - c d + {\left (b d - d^{2}\right )} x}{d}\right ) - {\left (b^{3} c - b c d^{2}\right )} \operatorname {Ci}\left (-\frac {b c - c d + {\left (b d - d^{2}\right )} x}{d}\right ) + 2 \, {\left (b^{2} d - d^{3}\right )} \operatorname {Si}\left (\frac {b c + c d + {\left (b d + d^{2}\right )} x}{d}\right ) + 2 \, {\left (b^{2} d - d^{3}\right )} \operatorname {Si}\left (-\frac {b c - c d + {\left (b d - d^{2}\right )} x}{d}\right )\right )} \sin \left (-\frac {b c - a d}{d}\right )}{4 \, {\left (b^{4} d - b^{2} d^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \sin {\left (a + b x \right )} \operatorname {Si}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 3.72, size = 200182, normalized size = 539.57 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int x\,\mathrm {sinint}\left (c+d\,x\right )\,\sin \left (a+b\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________