Integrand size = 18, antiderivative size = 126 \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\cos \left (a-b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \] Output:
cos(a-b*c^(1/2))*Ci(b*(c^(1/2)+(d*x+c)^(1/2)))+cos(a+b*c^(1/2))*Ci(b*c^(1/ 2)-b*(d*x+c)^(1/2))-sin(a-b*c^(1/2))*Si(b*(c^(1/2)+(d*x+c)^(1/2)))+sin(a+b *c^(1/2))*Si(b*c^(1/2)-b*(d*x+c)^(1/2))
Result contains complex when optimal does not.
Time = 1.37 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.15 \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\frac {1}{2} e^{-i \left (a+b \sqrt {c}\right )} \left (\operatorname {ExpIntegralEi}\left (-i b \left (-\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i \left (a+b \sqrt {c}\right )} \operatorname {ExpIntegralEi}\left (i b \left (-\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i b \sqrt {c}} \operatorname {ExpIntegralEi}\left (-i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i a} \operatorname {ExpIntegralEi}\left (i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )\right ) \] Input:
Integrate[Cos[a + b*Sqrt[c + d*x]]/x,x]
Output:
(ExpIntegralEi[(-I)*b*(-Sqrt[c] + Sqrt[c + d*x])] + E^((2*I)*(a + b*Sqrt[c ]))*ExpIntegralEi[I*b*(-Sqrt[c] + Sqrt[c + d*x])] + E^((2*I)*b*Sqrt[c])*Ex pIntegralEi[(-I)*b*(Sqrt[c] + Sqrt[c + d*x])] + E^((2*I)*a)*ExpIntegralEi[ I*b*(Sqrt[c] + Sqrt[c + d*x])])/(2*E^(I*(a + b*Sqrt[c])))
Time = 0.42 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.19, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3913, 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 \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx\) |
\(\Big \downarrow \) 3913 |
\(\displaystyle \frac {2 \int \left (\frac {d \cos \left (a+b \sqrt {c+d x}\right )}{2 \left (\sqrt {c}+\sqrt {c+d x}\right )}-\frac {d \cos \left (a+b \sqrt {c+d x}\right )}{2 \left (\sqrt {c}-\sqrt {c+d x}\right )}\right )d\sqrt {c+d x}}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 \left (\frac {1}{2} d \cos \left (a+b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )+\frac {1}{2} d \cos \left (a-b \sqrt {c}\right ) \operatorname {CosIntegral}\left (\sqrt {c} b+\sqrt {c+d x} b\right )+\frac {1}{2} d \sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\frac {1}{2} d \sin \left (a-b \sqrt {c}\right ) \text {Si}\left (\sqrt {c} b+\sqrt {c+d x} b\right )\right )}{d}\) |
Input:
Int[Cos[a + b*Sqrt[c + d*x]]/x,x]
Output:
(2*((d*Cos[a + b*Sqrt[c]]*CosIntegral[b*Sqrt[c] - b*Sqrt[c + d*x]])/2 + (d *Cos[a - b*Sqrt[c]]*CosIntegral[b*Sqrt[c] + b*Sqrt[c + d*x]])/2 + (d*Sin[a + b*Sqrt[c]]*SinIntegral[b*Sqrt[c] - b*Sqrt[c + d*x]])/2 - (d*Sin[a - b*S qrt[c]]*SinIntegral[b*Sqrt[c] + b*Sqrt[c + d*x]])/2))/d
Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_ .) + (h_.)*(x_))^(m_.), x_Symbol] :> Simp[1/(n*f) Subst[Int[ExpandIntegra nd[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m, x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p , 0] && IntegerQ[1/n]
Leaf count of result is larger than twice the leaf count of optimal. \(270\) vs. \(2(102)=204\).
Time = 1.08 (sec) , antiderivative size = 271, normalized size of antiderivative = 2.15
method | result | size |
derivativedivides | \(\frac {\frac {b \left (a +b \sqrt {c}\right ) \left (\sin \left (a +b \sqrt {c}\right ) \operatorname {Si}\left (b \sqrt {c}-\sqrt {d x +c}\, b \right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b -b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{\sqrt {c}}-\frac {b \left (a -b \sqrt {c}\right ) \left (-\operatorname {Si}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{\sqrt {c}}-2 a \,b^{2} \left (\frac {\sin \left (a +b \sqrt {c}\right ) \operatorname {Si}\left (b \sqrt {c}-\sqrt {d x +c}\, b \right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b -b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{2 b \sqrt {c}}-\frac {-\operatorname {Si}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{2 b \sqrt {c}}\right )}{b^{2}}\) | \(271\) |
default | \(\frac {\frac {b \left (a +b \sqrt {c}\right ) \left (\sin \left (a +b \sqrt {c}\right ) \operatorname {Si}\left (b \sqrt {c}-\sqrt {d x +c}\, b \right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b -b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{\sqrt {c}}-\frac {b \left (a -b \sqrt {c}\right ) \left (-\operatorname {Si}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{\sqrt {c}}-2 a \,b^{2} \left (\frac {\sin \left (a +b \sqrt {c}\right ) \operatorname {Si}\left (b \sqrt {c}-\sqrt {d x +c}\, b \right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b -b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{2 b \sqrt {c}}-\frac {-\operatorname {Si}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (\sqrt {d x +c}\, b +b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{2 b \sqrt {c}}\right )}{b^{2}}\) | \(271\) |
Input:
int(cos(a+(d*x+c)^(1/2)*b)/x,x,method=_RETURNVERBOSE)
Output:
2/b^2*(1/2*b*(a+b*c^(1/2))/c^(1/2)*(sin(a+b*c^(1/2))*Si(b*c^(1/2)-(d*x+c)^ (1/2)*b)+Ci((d*x+c)^(1/2)*b-b*c^(1/2))*cos(a+b*c^(1/2)))-1/2*b*(a-b*c^(1/2 ))/c^(1/2)*(-Si((d*x+c)^(1/2)*b+b*c^(1/2))*sin(a-b*c^(1/2))+Ci((d*x+c)^(1/ 2)*b+b*c^(1/2))*cos(a-b*c^(1/2)))-a*b^2*(1/2/b/c^(1/2)*(sin(a+b*c^(1/2))*S i(b*c^(1/2)-(d*x+c)^(1/2)*b)+Ci((d*x+c)^(1/2)*b-b*c^(1/2))*cos(a+b*c^(1/2) ))-1/2/b/c^(1/2)*(-Si((d*x+c)^(1/2)*b+b*c^(1/2))*sin(a-b*c^(1/2))+Ci((d*x+ c)^(1/2)*b+b*c^(1/2))*cos(a-b*c^(1/2)))))
Result contains complex when optimal does not.
Time = 0.09 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.18 \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\frac {1}{2} \, {\rm Ei}\left (i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (i \, a + \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (i \, a - \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (-i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (-i \, a + \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (-i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (-i \, a - \sqrt {-b^{2} c}\right )} \] Input:
integrate(cos(a+b*(d*x+c)^(1/2))/x,x, algorithm="fricas")
Output:
1/2*Ei(I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^(I*a + sqrt(-b^2*c)) + 1/2*Ei(I *sqrt(d*x + c)*b + sqrt(-b^2*c))*e^(I*a - sqrt(-b^2*c)) + 1/2*Ei(-I*sqrt(d *x + c)*b - sqrt(-b^2*c))*e^(-I*a + sqrt(-b^2*c)) + 1/2*Ei(-I*sqrt(d*x + c )*b + sqrt(-b^2*c))*e^(-I*a - sqrt(-b^2*c))
\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int \frac {\cos {\left (a + b \sqrt {c + d x} \right )}}{x}\, dx \] Input:
integrate(cos(a+b*(d*x+c)**(1/2))/x,x)
Output:
Integral(cos(a + b*sqrt(c + d*x))/x, x)
\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int { \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x} \,d x } \] Input:
integrate(cos(a+b*(d*x+c)^(1/2))/x,x, algorithm="maxima")
Output:
integrate(cos(sqrt(d*x + c)*b + a)/x, x)
\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int { \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x} \,d x } \] Input:
integrate(cos(a+b*(d*x+c)^(1/2))/x,x, algorithm="giac")
Output:
integrate(cos(sqrt(d*x + c)*b + a)/x, x)
Timed out. \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int \frac {\cos \left (a+b\,\sqrt {c+d\,x}\right )}{x} \,d x \] Input:
int(cos(a + b*(c + d*x)^(1/2))/x,x)
Output:
int(cos(a + b*(c + d*x)^(1/2))/x, x)
\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int \frac {\cos \left (\sqrt {d x +c}\, b +a \right )}{x}d x \] Input:
int(cos(a+b*(d*x+c)^(1/2))/x,x)
Output:
int(cos(sqrt(c + d*x)*b + a)/x,x)