\(\int \frac {\cos (a+b x)}{c+d x^2} \, dx\) [48]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [C] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 16, antiderivative size = 213 \[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\frac {\cos \left (a+\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \operatorname {CosIntegral}\left (\frac {b \sqrt {-c}}{\sqrt {d}}-b x\right )}{2 \sqrt {-c} \sqrt {d}}-\frac {\cos \left (a-\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \operatorname {CosIntegral}\left (\frac {b \sqrt {-c}}{\sqrt {d}}+b x\right )}{2 \sqrt {-c} \sqrt {d}}+\frac {\sin \left (a+\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \text {Si}\left (\frac {b \sqrt {-c}}{\sqrt {d}}-b x\right )}{2 \sqrt {-c} \sqrt {d}}+\frac {\sin \left (a-\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \text {Si}\left (\frac {b \sqrt {-c}}{\sqrt {d}}+b x\right )}{2 \sqrt {-c} \sqrt {d}} \] Output:

1/2*cos(a+b*(-c)^(1/2)/d^(1/2))*Ci(b*(-c)^(1/2)/d^(1/2)-b*x)/(-c)^(1/2)/d^ 
(1/2)-1/2*cos(a-b*(-c)^(1/2)/d^(1/2))*Ci(b*(-c)^(1/2)/d^(1/2)+b*x)/(-c)^(1 
/2)/d^(1/2)-1/2*sin(a+b*(-c)^(1/2)/d^(1/2))*Si(-b*(-c)^(1/2)/d^(1/2)+b*x)/ 
(-c)^(1/2)/d^(1/2)+1/2*sin(a-b*(-c)^(1/2)/d^(1/2))*Si(b*(-c)^(1/2)/d^(1/2) 
+b*x)/(-c)^(1/2)/d^(1/2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.52 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.77 \[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\frac {i e^{-i a-\frac {b \sqrt {c}}{\sqrt {d}}} \left (-e^{\frac {2 b \sqrt {c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (-\frac {b \sqrt {c}}{\sqrt {d}}-i b x\right )+\operatorname {ExpIntegralEi}\left (\frac {b \sqrt {c}}{\sqrt {d}}-i b x\right )+e^{2 i a} \left (e^{\frac {2 b \sqrt {c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (-\frac {b \sqrt {c}}{\sqrt {d}}+i b x\right )-\operatorname {ExpIntegralEi}\left (\frac {b \sqrt {c}}{\sqrt {d}}+i b x\right )\right )\right )}{4 \sqrt {c} \sqrt {d}} \] Input:

Integrate[Cos[a + b*x]/(c + d*x^2),x]
 

Output:

((I/4)*E^((-I)*a - (b*Sqrt[c])/Sqrt[d])*(-(E^((2*b*Sqrt[c])/Sqrt[d])*ExpIn 
tegralEi[-((b*Sqrt[c])/Sqrt[d]) - I*b*x]) + ExpIntegralEi[(b*Sqrt[c])/Sqrt 
[d] - I*b*x] + E^((2*I)*a)*(E^((2*b*Sqrt[c])/Sqrt[d])*ExpIntegralEi[-((b*S 
qrt[c])/Sqrt[d]) + I*b*x] - ExpIntegralEi[(b*Sqrt[c])/Sqrt[d] + I*b*x])))/ 
(Sqrt[c]*Sqrt[d])
 

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3815, 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 (a+b x)}{c+d x^2} \, dx\)

\(\Big \downarrow \) 3815

\(\displaystyle \int \left (\frac {\sqrt {-c} \cos (a+b x)}{2 c \left (\sqrt {-c}-\sqrt {d} x\right )}+\frac {\sqrt {-c} \cos (a+b x)}{2 c \left (\sqrt {-c}+\sqrt {d} x\right )}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\cos \left (a+\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \operatorname {CosIntegral}\left (\frac {b \sqrt {-c}}{\sqrt {d}}-b x\right )}{2 \sqrt {-c} \sqrt {d}}-\frac {\cos \left (a-\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \operatorname {CosIntegral}\left (x b+\frac {\sqrt {-c} b}{\sqrt {d}}\right )}{2 \sqrt {-c} \sqrt {d}}+\frac {\sin \left (a+\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \text {Si}\left (\frac {b \sqrt {-c}}{\sqrt {d}}-b x\right )}{2 \sqrt {-c} \sqrt {d}}+\frac {\sin \left (a-\frac {b \sqrt {-c}}{\sqrt {d}}\right ) \text {Si}\left (x b+\frac {\sqrt {-c} b}{\sqrt {d}}\right )}{2 \sqrt {-c} \sqrt {d}}\)

Input:

Int[Cos[a + b*x]/(c + d*x^2),x]
 

Output:

(Cos[a + (b*Sqrt[-c])/Sqrt[d]]*CosIntegral[(b*Sqrt[-c])/Sqrt[d] - b*x])/(2 
*Sqrt[-c]*Sqrt[d]) - (Cos[a - (b*Sqrt[-c])/Sqrt[d]]*CosIntegral[(b*Sqrt[-c 
])/Sqrt[d] + b*x])/(2*Sqrt[-c]*Sqrt[d]) + (Sin[a + (b*Sqrt[-c])/Sqrt[d]]*S 
inIntegral[(b*Sqrt[-c])/Sqrt[d] - b*x])/(2*Sqrt[-c]*Sqrt[d]) + (Sin[a - (b 
*Sqrt[-c])/Sqrt[d]]*SinIntegral[(b*Sqrt[-c])/Sqrt[d] + b*x])/(2*Sqrt[-c]*S 
qrt[d])
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3815
Int[Cos[(c_.) + (d_.)*(x_)]*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int 
[ExpandIntegrand[Cos[c + d*x], (a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d}, 
 x] && ILtQ[p, 0] && IGtQ[n, 0] && (EqQ[n, 2] || EqQ[p, -1])
 
Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.08

method result size
derivativedivides \(b \left (-\frac {\operatorname {Si}\left (-b x -a +\frac {b \sqrt {-c d}+a d}{d}\right ) \sin \left (\frac {b \sqrt {-c d}+a d}{d}\right )+\operatorname {Ci}\left (b x +a -\frac {b \sqrt {-c d}+a d}{d}\right ) \cos \left (\frac {b \sqrt {-c d}+a d}{d}\right )}{2 d \left (-\frac {b \sqrt {-c d}+a d}{d}+a \right )}-\frac {-\operatorname {Si}\left (-b x -a -\frac {b \sqrt {-c d}-a d}{d}\right ) \sin \left (\frac {b \sqrt {-c d}-a d}{d}\right )+\operatorname {Ci}\left (b x +a +\frac {b \sqrt {-c d}-a d}{d}\right ) \cos \left (\frac {b \sqrt {-c d}-a d}{d}\right )}{2 d \left (\frac {b \sqrt {-c d}-a d}{d}+a \right )}\right )\) \(231\)
default \(b \left (-\frac {\operatorname {Si}\left (-b x -a +\frac {b \sqrt {-c d}+a d}{d}\right ) \sin \left (\frac {b \sqrt {-c d}+a d}{d}\right )+\operatorname {Ci}\left (b x +a -\frac {b \sqrt {-c d}+a d}{d}\right ) \cos \left (\frac {b \sqrt {-c d}+a d}{d}\right )}{2 d \left (-\frac {b \sqrt {-c d}+a d}{d}+a \right )}-\frac {-\operatorname {Si}\left (-b x -a -\frac {b \sqrt {-c d}-a d}{d}\right ) \sin \left (\frac {b \sqrt {-c d}-a d}{d}\right )+\operatorname {Ci}\left (b x +a +\frac {b \sqrt {-c d}-a d}{d}\right ) \cos \left (\frac {b \sqrt {-c d}-a d}{d}\right )}{2 d \left (\frac {b \sqrt {-c d}-a d}{d}+a \right )}\right )\) \(231\)
risch \(-\frac {i \sqrt {c d}\, {\mathrm e}^{-\frac {i a d +b \sqrt {c d}}{d}} \operatorname {expIntegral}_{1}\left (-\frac {i a d +b \sqrt {c d}-\left (i b x +i a \right ) d}{d}\right )}{4 c d}+\frac {i \sqrt {c d}\, {\mathrm e}^{-\frac {i a d -b \sqrt {c d}}{d}} \operatorname {expIntegral}_{1}\left (-\frac {i a d -b \sqrt {c d}-\left (i b x +i a \right ) d}{d}\right )}{4 c d}-\frac {i \sqrt {c d}\, \operatorname {expIntegral}_{1}\left (\frac {i a d +b \sqrt {c d}-\left (i b x +i a \right ) d}{d}\right ) {\mathrm e}^{\frac {i a d +b \sqrt {c d}}{d}}}{4 c d}+\frac {i \sqrt {c d}\, \operatorname {expIntegral}_{1}\left (\frac {i a d -b \sqrt {c d}-\left (i b x +i a \right ) d}{d}\right ) {\mathrm e}^{\frac {i a d -b \sqrt {c d}}{d}}}{4 c d}\) \(266\)

Input:

int(cos(b*x+a)/(d*x^2+c),x,method=_RETURNVERBOSE)
 

Output:

b*(-1/2/d/(-(b*(-c*d)^(1/2)+a*d)/d+a)*(Si(-b*x-a+(b*(-c*d)^(1/2)+a*d)/d)*s 
in((b*(-c*d)^(1/2)+a*d)/d)+Ci(b*x+a-(b*(-c*d)^(1/2)+a*d)/d)*cos((b*(-c*d)^ 
(1/2)+a*d)/d))-1/2/d/((b*(-c*d)^(1/2)-a*d)/d+a)*(-Si(-b*x-a-(b*(-c*d)^(1/2 
)-a*d)/d)*sin((b*(-c*d)^(1/2)-a*d)/d)+Ci(b*x+a+(b*(-c*d)^(1/2)-a*d)/d)*cos 
((b*(-c*d)^(1/2)-a*d)/d)))
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.09 (sec) , antiderivative size = 189, normalized size of antiderivative = 0.89 \[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=-\frac {-i \, \sqrt {\frac {b^{2} c}{d}} {\rm Ei}\left (i \, b x - \sqrt {\frac {b^{2} c}{d}}\right ) e^{\left (i \, a + \sqrt {\frac {b^{2} c}{d}}\right )} + i \, \sqrt {\frac {b^{2} c}{d}} {\rm Ei}\left (i \, b x + \sqrt {\frac {b^{2} c}{d}}\right ) e^{\left (i \, a - \sqrt {\frac {b^{2} c}{d}}\right )} + i \, \sqrt {\frac {b^{2} c}{d}} {\rm Ei}\left (-i \, b x - \sqrt {\frac {b^{2} c}{d}}\right ) e^{\left (-i \, a + \sqrt {\frac {b^{2} c}{d}}\right )} - i \, \sqrt {\frac {b^{2} c}{d}} {\rm Ei}\left (-i \, b x + \sqrt {\frac {b^{2} c}{d}}\right ) e^{\left (-i \, a - \sqrt {\frac {b^{2} c}{d}}\right )}}{4 \, b c} \] Input:

integrate(cos(b*x+a)/(d*x^2+c),x, algorithm="fricas")
 

Output:

-1/4*(-I*sqrt(b^2*c/d)*Ei(I*b*x - sqrt(b^2*c/d))*e^(I*a + sqrt(b^2*c/d)) + 
 I*sqrt(b^2*c/d)*Ei(I*b*x + sqrt(b^2*c/d))*e^(I*a - sqrt(b^2*c/d)) + I*sqr 
t(b^2*c/d)*Ei(-I*b*x - sqrt(b^2*c/d))*e^(-I*a + sqrt(b^2*c/d)) - I*sqrt(b^ 
2*c/d)*Ei(-I*b*x + sqrt(b^2*c/d))*e^(-I*a - sqrt(b^2*c/d)))/(b*c)
 

Sympy [F]

\[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\int \frac {\cos {\left (a + b x \right )}}{c + d x^{2}}\, dx \] Input:

integrate(cos(b*x+a)/(d*x**2+c),x)
                                                                                    
                                                                                    
 

Output:

Integral(cos(a + b*x)/(c + d*x**2), x)
 

Maxima [F]

\[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\int { \frac {\cos \left (b x + a\right )}{d x^{2} + c} \,d x } \] Input:

integrate(cos(b*x+a)/(d*x^2+c),x, algorithm="maxima")
 

Output:

integrate(cos(b*x + a)/(d*x^2 + c), x)
 

Giac [F]

\[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\int { \frac {\cos \left (b x + a\right )}{d x^{2} + c} \,d x } \] Input:

integrate(cos(b*x+a)/(d*x^2+c),x, algorithm="giac")
 

Output:

integrate(cos(b*x + a)/(d*x^2 + c), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\int \frac {\cos \left (a+b\,x\right )}{d\,x^2+c} \,d x \] Input:

int(cos(a + b*x)/(c + d*x^2),x)
 

Output:

int(cos(a + b*x)/(c + d*x^2), x)
 

Reduce [F]

\[ \int \frac {\cos (a+b x)}{c+d x^2} \, dx=\frac {-\sqrt {d}\, \sqrt {c}\, \mathit {atan} \left (\frac {d x}{\sqrt {d}\, \sqrt {c}}\right )+\left (\int \frac {\cos \left (b x +a \right )}{d \,x^{2}+c}d x \right ) c d +\left (\int \frac {1}{d \,x^{2}+c}d x \right ) c d}{c d} \] Input:

int(cos(b*x+a)/(d*x^2+c),x)
 

Output:

( - sqrt(d)*sqrt(c)*atan((d*x)/(sqrt(d)*sqrt(c))) + int(cos(a + b*x)/(c + 
d*x**2),x)*c*d + int(1/(c + d*x**2),x)*c*d)/(c*d)