Integrand size = 14, antiderivative size = 370 \[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\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 ) \operatorname {CosIntegral}\left (\frac {c (b-d)}{d}+(b-d) x\right )}{2 b^2}+\frac {\cos (a+b x) \operatorname {CosIntegral}(c+d x)}{b^2}-\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {c (b+d)}{d}+(b+d) x\right )}{2 b^2}+\frac {c \operatorname {CosIntegral}\left (\frac {c (b-d)}{d}+(b-d) x\right ) \sin \left (a-\frac {b c}{d}\right )}{2 b d}+\frac {c \operatorname {CosIntegral}\left (\frac {c (b+d)}{d}+(b+d) x\right ) \sin \left (a-\frac {b c}{d}\right )}{2 b d}+\frac {x \operatorname {CosIntegral}(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} \]
-1/2*Ci(c*(b-d)/d+(b-d)*x)*cos(a-b*c/d)/b^2-1/2*Ci(c*(b+d)/d+(b+d)*x)*cos( a-b*c/d)/b^2+Ci(d*x+c)*cos(b*x+a)/b^2+1/2*cos(a-c+(b-d)*x)/b/(b-d)+1/2*cos (a+c+(b+d)*x)/b/(b+d)+1/2*c*cos(a-b*c/d)*Si(c*(b-d)/d+(b-d)*x)/b/d+1/2*c*c os(a-b*c/d)*Si(c*(b+d)/d+(b+d)*x)/b/d+1/2*c*Ci(c*(b-d)/d+(b-d)*x)*sin(a-b* c/d)/b/d+1/2*c*Ci(c*(b+d)/d+(b+d)*x)*sin(a-b*c/d)/b/d+1/2*Si(c*(b-d)/d+(b- d)*x)*sin(a-b*c/d)/b^2+1/2*Si(c*(b+d)/d+(b+d)*x)*sin(a-b*c/d)/b^2+x*Ci(d*x +c)*sin(b*x+a)/b
Result contains complex when optimal does not.
Time = 2.04 (sec) , antiderivative size = 393, normalized size of antiderivative = 1.06 \[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\frac {i e^{-i a} \left (-\left ((b c-i d) e^{2 i a-\frac {i b c}{d}} \operatorname {ExpIntegralEi}\left (\frac {i (b-d) (c+d x)}{d}\right )\right )+\frac {e^{-\frac {i (b+d) (c+d x)}{d}} \left (-i b d e^{\frac {i b c}{d}} \left (d \left (-1+e^{2 i (a+b x)}\right )+b \left (1+e^{2 i (a+b x)}\right )\right )+(b c+i d) \left (b^2-d^2\right ) e^{i \left (c+\frac {2 b c}{d}+(b+d) x\right )} \operatorname {ExpIntegralEi}\left (-\frac {i (b+d) (c+d x)}{d}\right )\right )}{(b-d) (b+d)}\right )}{4 b^2 d}+\frac {i e^{-i a} \left (-\frac {i b d e^{i (c+(-b+d) x)} \left (b+d+b e^{2 i (a+b x)}-d e^{2 i (a+b x)}\right )}{(b-d) (b+d)}+(b c+i d) e^{\frac {i b c}{d}} \operatorname {ExpIntegralEi}\left (-\frac {i (b-d) (c+d x)}{d}\right )-(b c-i d) e^{2 i a-\frac {i b c}{d}} \operatorname {ExpIntegralEi}\left (\frac {i (b+d) (c+d x)}{d}\right )\right )}{4 b^2 d}+\frac {\operatorname {CosIntegral}(c+d x) (\cos (a+b x)+b x \sin (a+b x))}{b^2} \]
((I/4)*(-((b*c - I*d)*E^((2*I)*a - (I*b*c)/d)*ExpIntegralEi[(I*(b - d)*(c + d*x))/d]) + ((-I)*b*d*E^((I*b*c)/d)*(d*(-1 + E^((2*I)*(a + b*x))) + b*(1 + E^((2*I)*(a + b*x)))) + (b*c + I*d)*(b^2 - d^2)*E^(I*(c + (2*b*c)/d + ( b + d)*x))*ExpIntegralEi[((-I)*(b + d)*(c + d*x))/d])/((b - d)*(b + d)*E^( (I*(b + d)*(c + d*x))/d))))/(b^2*d*E^(I*a)) + ((I/4)*(((-I)*b*d*E^(I*(c + (-b + d)*x))*(b + d + b*E^((2*I)*(a + b*x)) - d*E^((2*I)*(a + b*x))))/((b - d)*(b + d)) + (b*c + I*d)*E^((I*b*c)/d)*ExpIntegralEi[((-I)*(b - d)*(c + d*x))/d] - (b*c - I*d)*E^((2*I)*a - (I*b*c)/d)*ExpIntegralEi[(I*(b + d)*( c + d*x))/d]))/(b^2*d*E^(I*a)) + (CosIntegral[c + d*x]*(Cos[a + b*x] + b*x *Sin[a + b*x]))/b^2
Time = 1.45 (sec) , antiderivative size = 378, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {7068, 7072, 4929, 2009, 7293, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx\) |
\(\Big \downarrow \) 7068 |
\(\displaystyle -\frac {\int \operatorname {CosIntegral}(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 {x \sin (a+b x) \operatorname {CosIntegral}(c+d x)}{b}\) |
\(\Big \downarrow \) 7072 |
\(\displaystyle -\frac {\frac {d \int \frac {\cos (a+b x) \cos (c+d x)}{c+d x}dx}{b}-\frac {\cos (a+b x) \operatorname {CosIntegral}(c+d x)}{b}}{b}-\frac {d \int \frac {x \cos (c+d x) \sin (a+b x)}{c+d x}dx}{b}+\frac {x \sin (a+b x) \operatorname {CosIntegral}(c+d x)}{b}\) |
\(\Big \downarrow \) 4929 |
\(\displaystyle -\frac {\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}-\frac {\cos (a+b x) \operatorname {CosIntegral}(c+d x)}{b}}{b}-\frac {d \int \frac {x \cos (c+d x) \sin (a+b x)}{c+d x}dx}{b}+\frac {x \sin (a+b x) \operatorname {CosIntegral}(c+d x)}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d \int \frac {x \cos (c+d x) \sin (a+b x)}{c+d x}dx}{b}-\frac {\frac {d \left (\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d}+\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d}\right )}{b}-\frac {\cos (a+b x) \operatorname {CosIntegral}(c+d x)}{b}}{b}+\frac {x \sin (a+b x) \operatorname {CosIntegral}(c+d x)}{b}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle -\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 {\frac {d \left (\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d}+\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d}\right )}{b}-\frac {\cos (a+b x) \operatorname {CosIntegral}(c+d x)}{b}}{b}+\frac {x \sin (a+b x) \operatorname {CosIntegral}(c+d x)}{b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d \left (-\frac {c \sin \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d^2}-\frac {c \sin \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d^2}-\frac {c \cos \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d^2}-\frac {c \cos \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d^2}-\frac {\cos (a+x (b-d)-c)}{2 d (b-d)}-\frac {\cos (a+x (b+d)+c)}{2 d (b+d)}\right )}{b}-\frac {\frac {d \left (\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d}+\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b-d)+\frac {c (b-d)}{d}\right )}{2 d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (x (b+d)+\frac {c (b+d)}{d}\right )}{2 d}\right )}{b}-\frac {\cos (a+b x) \operatorname {CosIntegral}(c+d x)}{b}}{b}+\frac {x \sin (a+b x) \operatorname {CosIntegral}(c+d x)}{b}\) |
(x*CosIntegral[c + d*x]*Sin[a + b*x])/b - (d*(-1/2*Cos[a - c + (b - d)*x]/ ((b - d)*d) - Cos[a + c + (b + d)*x]/(2*d*(b + d)) - (c*CosIntegral[(c*(b - d))/d + (b - d)*x]*Sin[a - (b*c)/d])/(2*d^2) - (c*CosIntegral[(c*(b + d) )/d + (b + d)*x]*Sin[a - (b*c)/d])/(2*d^2) - (c*Cos[a - (b*c)/d]*SinIntegr al[(c*(b - d))/d + (b - d)*x])/(2*d^2) - (c*Cos[a - (b*c)/d]*SinIntegral[( c*(b + d))/d + (b + d)*x])/(2*d^2)))/b - (-((Cos[a + b*x]*CosIntegral[c + d*x])/b) + (d*((Cos[a - (b*c)/d]*CosIntegral[(c*(b - d))/d + (b - d)*x])/( 2*d) + (Cos[a - (b*c)/d]*CosIntegral[(c*(b + d))/d + (b + d)*x])/(2*d) - ( Sin[a - (b*c)/d]*SinIntegral[(c*(b - d))/d + (b - d)*x])/(2*d) - (Sin[a - (b*c)/d]*SinIntegral[(c*(b + d))/d + (b + d)*x])/(2*d)))/b)/b
3.2.34.3.1 Defintions of rubi rules used
Int[Cos[(a_.) + (b_.)*(x_)]^(p_.)*Cos[(c_.) + (d_.)*(x_)]^(q_.)*((e_.) + (f _.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e + f*x)^m, Cos[a + b*x ]^p*Cos[c + d*x]^q, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[p, 0] && IGtQ[q, 0] && IntegerQ[m]
Int[Cos[(a_.) + (b_.)*(x_)]*CosIntegral[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)* (x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^m*Sin[a + b*x]*(CosIntegral[c + d* x]/b), x] + (-Simp[d/b Int[(e + f*x)^m*Sin[a + b*x]*(Cos[c + d*x]/(c + d* x)), x], x] - Simp[f*(m/b) Int[(e + f*x)^(m - 1)*Sin[a + b*x]*CosIntegral [c + d*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0]
Int[CosIntegral[(c_.) + (d_.)*(x_)]*Sin[(a_.) + (b_.)*(x_)], x_Symbol] :> S imp[(-Cos[a + b*x])*(CosIntegral[c + d*x]/b), x] + Simp[d/b Int[Cos[a + b *x]*(Cos[c + d*x]/(c + d*x)), x], x] /; FreeQ[{a, b, c, d}, x]
Leaf count of result is larger than twice the leaf count of optimal. \(1243\) vs. \(2(350)=700\).
Time = 3.24 (sec) , antiderivative size = 1244, normalized size of antiderivative = 3.36
(-Ci(d*x+c)/b*(d/b*a*sin(1/d*b*(d*x+c)+(a*d-b*c)/d)-1/b*d*(cos(1/d*b*(d*x+ c)+(a*d-b*c)/d)+(1/d*b*(d*x+c)+(a*d-b*c)/d)*sin(1/d*b*(d*x+c)+(a*d-b*c)/d) ))+1/b*(1/2*a*d^2/(b-d)*(-Si(-(b-d)/d*(d*x+c)-(a*d-b*c)/d-(-a*d+b*c)/d)*co s((-a*d+b*c)/d)/d-Ci((b-d)/d*(d*x+c)+(a*d-b*c)/d+(-a*d+b*c)/d)*sin((-a*d+b *c)/d)/d)-1/2*d^2*c/(b-d)*(-Si(-(b-d)/d*(d*x+c)-(a*d-b*c)/d-(-a*d+b*c)/d)* cos((-a*d+b*c)/d)/d-Ci((b-d)/d*(d*x+c)+(a*d-b*c)/d+(-a*d+b*c)/d)*sin((-a*d +b*c)/d)/d)-1/2*(a*d-b*c)*d/(b-d)*(-Si(-(b-d)/d*(d*x+c)-(a*d-b*c)/d-(-a*d+ b*c)/d)*cos((-a*d+b*c)/d)/d-Ci((b-d)/d*(d*x+c)+(a*d-b*c)/d+(-a*d+b*c)/d)*s in((-a*d+b*c)/d)/d)+1/2/(b-d)*d*cos((b-d)/d*(d*x+c)+(a*d-b*c)/d)+1/2*a*d^2 /(b+d)*(-Si(-(b+d)/d*(d*x+c)-(a*d-b*c)/d-(-a*d+b*c)/d)*cos((-a*d+b*c)/d)/d -Ci((b+d)/d*(d*x+c)+(a*d-b*c)/d+(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/d)+1/2*d^2 *c/(b+d)*(-Si(-(b+d)/d*(d*x+c)-(a*d-b*c)/d-(-a*d+b*c)/d)*cos((-a*d+b*c)/d) /d-Ci((b+d)/d*(d*x+c)+(a*d-b*c)/d+(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/d)-1/2*( a*d-b*c)*d/(b+d)*(-Si(-(b+d)/d*(d*x+c)-(a*d-b*c)/d-(-a*d+b*c)/d)*cos((-a*d +b*c)/d)/d-Ci((b+d)/d*(d*x+c)+(a*d-b*c)/d+(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/ d)+1/2/(b+d)*d*cos((b+d)/d*(d*x+c)+(a*d-b*c)/d)-1/2/b*d^2*(-Si(-(b-d)/d*(d *x+c)-(a*d-b*c)/d-(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/d+Ci((b-d)/d*(d*x+c)+(a* d-b*c)/d+(-a*d+b*c)/d)*cos((-a*d+b*c)/d)/d)-1/2/b*d^2*(-Si(-(b+d)/d*(d*x+c )-(a*d-b*c)/d-(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/d+Ci((b+d)/d*(d*x+c)+(a*d-b* c)/d+(-a*d+b*c)/d)*cos((-a*d+b*c)/d)/d)))/d
Time = 0.28 (sec) , antiderivative size = 453, normalized size of antiderivative = 1.22 \[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\frac {2 \, \pi b d^{3} x \operatorname {C}\left (d x + c\right ) \sin \left (b x + a\right ) + 2 \, \pi d^{3} \cos \left (b x + a\right ) \operatorname {C}\left (d x + c\right ) - 2 \, b d^{2} \sin \left (\frac {1}{2} \, \pi d^{2} x^{2} + \pi c d x + \frac {1}{2} \, \pi c^{2}\right ) \sin \left (b x + a\right ) - {\left (\pi d^{2} \cos \left (a - \frac {b c}{d} - \frac {b^{2}}{2 \, \pi d^{2}}\right ) - {\left (\pi b c d + b^{2}\right )} \sin \left (a - \frac {b c}{d} - \frac {b^{2}}{2 \, \pi d^{2}}\right )\right )} \sqrt {d^{2}} \operatorname {C}\left (\frac {{\left (\pi d^{2} x + \pi c d + b\right )} \sqrt {d^{2}}}{\pi d^{2}}\right ) - {\left (\pi d^{2} \cos \left (a - \frac {b c}{d} + \frac {b^{2}}{2 \, \pi d^{2}}\right ) - {\left (\pi b c d - b^{2}\right )} \sin \left (a - \frac {b c}{d} + \frac {b^{2}}{2 \, \pi d^{2}}\right )\right )} \sqrt {d^{2}} \operatorname {C}\left (\frac {{\left (\pi d^{2} x + \pi c d - b\right )} \sqrt {d^{2}}}{\pi d^{2}}\right ) + {\left (\pi d^{2} \sin \left (a - \frac {b c}{d} - \frac {b^{2}}{2 \, \pi d^{2}}\right ) + {\left (\pi b c d + b^{2}\right )} \cos \left (a - \frac {b c}{d} - \frac {b^{2}}{2 \, \pi d^{2}}\right )\right )} \sqrt {d^{2}} \operatorname {S}\left (\frac {{\left (\pi d^{2} x + \pi c d + b\right )} \sqrt {d^{2}}}{\pi d^{2}}\right ) - {\left (\pi d^{2} \sin \left (a - \frac {b c}{d} + \frac {b^{2}}{2 \, \pi d^{2}}\right ) + {\left (\pi b c d - b^{2}\right )} \cos \left (a - \frac {b c}{d} + \frac {b^{2}}{2 \, \pi d^{2}}\right )\right )} \sqrt {d^{2}} \operatorname {S}\left (\frac {{\left (\pi d^{2} x + \pi c d - b\right )} \sqrt {d^{2}}}{\pi d^{2}}\right )}{2 \, \pi b^{2} d^{3}} \]
1/2*(2*pi*b*d^3*x*fresnel_cos(d*x + c)*sin(b*x + a) + 2*pi*d^3*cos(b*x + a )*fresnel_cos(d*x + c) - 2*b*d^2*sin(1/2*pi*d^2*x^2 + pi*c*d*x + 1/2*pi*c^ 2)*sin(b*x + a) - (pi*d^2*cos(a - b*c/d - 1/2*b^2/(pi*d^2)) - (pi*b*c*d + b^2)*sin(a - b*c/d - 1/2*b^2/(pi*d^2)))*sqrt(d^2)*fresnel_cos((pi*d^2*x + pi*c*d + b)*sqrt(d^2)/(pi*d^2)) - (pi*d^2*cos(a - b*c/d + 1/2*b^2/(pi*d^2) ) - (pi*b*c*d - b^2)*sin(a - b*c/d + 1/2*b^2/(pi*d^2)))*sqrt(d^2)*fresnel_ cos((pi*d^2*x + pi*c*d - b)*sqrt(d^2)/(pi*d^2)) + (pi*d^2*sin(a - b*c/d - 1/2*b^2/(pi*d^2)) + (pi*b*c*d + b^2)*cos(a - b*c/d - 1/2*b^2/(pi*d^2)))*sq rt(d^2)*fresnel_sin((pi*d^2*x + pi*c*d + b)*sqrt(d^2)/(pi*d^2)) - (pi*d^2* sin(a - b*c/d + 1/2*b^2/(pi*d^2)) + (pi*b*c*d - b^2)*cos(a - b*c/d + 1/2*b ^2/(pi*d^2)))*sqrt(d^2)*fresnel_sin((pi*d^2*x + pi*c*d - b)*sqrt(d^2)/(pi* d^2)))/(pi*b^2*d^3)
\[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\int x \cos {\left (a + b x \right )} \operatorname {Ci}{\left (c + d x \right )}\, dx \]
\[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\int { x \cos \left (b x + a\right ) \operatorname {C}\left (d x + c\right ) \,d x } \]
\[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\int { x \cos \left (b x + a\right ) \operatorname {C}\left (d x + c\right ) \,d x } \]
Timed out. \[ \int x \cos (a+b x) \operatorname {CosIntegral}(c+d x) \, dx=\int x\,\mathrm {cosint}\left (c+d\,x\right )\,\cos \left (a+b\,x\right ) \,d x \]