\(\int \frac {\sin (a+b x)}{c+d x+e x^2} \, dx\) [34]

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 = 19, antiderivative size = 271 \[ \int \frac {\sin (a+b x)}{c+d x+e x^2} \, dx=\frac {\operatorname {CosIntegral}\left (\frac {b \left (d-\sqrt {d^2-4 c e}\right )}{2 e}+b x\right ) \sin \left (a-\frac {b \left (d-\sqrt {d^2-4 c e}\right )}{2 e}\right )}{\sqrt {d^2-4 c e}}-\frac {\operatorname {CosIntegral}\left (\frac {b \left (d+\sqrt {d^2-4 c e}\right )}{2 e}+b x\right ) \sin \left (a-\frac {b \left (d+\sqrt {d^2-4 c e}\right )}{2 e}\right )}{\sqrt {d^2-4 c e}}+\frac {\cos \left (a-\frac {b \left (d-\sqrt {d^2-4 c e}\right )}{2 e}\right ) \text {Si}\left (\frac {b \left (d-\sqrt {d^2-4 c e}\right )}{2 e}+b x\right )}{\sqrt {d^2-4 c e}}-\frac {\cos \left (a-\frac {b \left (d+\sqrt {d^2-4 c e}\right )}{2 e}\right ) \text {Si}\left (\frac {b \left (d+\sqrt {d^2-4 c e}\right )}{2 e}+b x\right )}{\sqrt {d^2-4 c e}} \] Output:

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

Mathematica [C] (verified)

Result contains complex when optimal does not.

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

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

Output:

((I/2)*(E^((I*b*d)/e)*ExpIntegralEi[((-1/2*I)*b*(d - Sqrt[d^2 - 4*c*e] + 2 
*e*x))/e] - E^(I*(2*a + (b*Sqrt[d^2 - 4*c*e])/e))*ExpIntegralEi[((I/2)*b*( 
d - Sqrt[d^2 - 4*c*e] + 2*e*x))/e] - E^((I*b*(d + Sqrt[d^2 - 4*c*e]))/e)*E 
xpIntegralEi[((-1/2*I)*b*(d + Sqrt[d^2 - 4*c*e] + 2*e*x))/e] + E^((2*I)*a) 
*ExpIntegralEi[((I/2)*b*(d + Sqrt[d^2 - 4*c*e] + 2*e*x))/e]))/(Sqrt[d^2 - 
4*c*e]*E^((I/2)*(2*a + (b*(d + Sqrt[d^2 - 4*c*e]))/e)))
 

Rubi [A] (verified)

Time = 0.95 (sec) , antiderivative size = 271, 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.105, Rules used = {7279, 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 {\sin (a+b x)}{c+d x+e x^2} \, dx\)

\(\Big \downarrow \) 7279

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(CosIntegral[(b*(d - Sqrt[d^2 - 4*c*e]))/(2*e) + b*x]*Sin[a - (b*(d - Sqrt 
[d^2 - 4*c*e]))/(2*e)])/Sqrt[d^2 - 4*c*e] - (CosIntegral[(b*(d + Sqrt[d^2 
- 4*c*e]))/(2*e) + b*x]*Sin[a - (b*(d + Sqrt[d^2 - 4*c*e]))/(2*e)])/Sqrt[d 
^2 - 4*c*e] + (Cos[a - (b*(d - Sqrt[d^2 - 4*c*e]))/(2*e)]*SinIntegral[(b*( 
d - Sqrt[d^2 - 4*c*e]))/(2*e) + b*x])/Sqrt[d^2 - 4*c*e] - (Cos[a - (b*(d + 
 Sqrt[d^2 - 4*c*e]))/(2*e)]*SinIntegral[(b*(d + Sqrt[d^2 - 4*c*e]))/(2*e) 
+ b*x])/Sqrt[d^2 - 4*c*e]
 

Defintions of rubi rules used

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

rule 7279
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ 
{v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su 
mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
 
Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 328, normalized size of antiderivative = 1.21

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

Input:

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

Output:

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

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int(sin(a + b*x)/(c + d*x + e*x**2),x)