\(\int \sin (a+\frac {b}{x^2}) \, dx\) [119]

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

Optimal result

Integrand size = 8, antiderivative size = 80 \[ \int \sin \left (a+\frac {b}{x^2}\right ) \, dx=-\sqrt {b} \sqrt {2 \pi } \cos (a) \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\sqrt {b} \sqrt {2 \pi } \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a)+x \sin \left (a+\frac {b}{x^2}\right ) \] Output:

-b^(1/2)*2^(1/2)*Pi^(1/2)*cos(a)*FresnelC(b^(1/2)*2^(1/2)/Pi^(1/2)/x)+b^(1 
/2)*2^(1/2)*Pi^(1/2)*FresnelS(b^(1/2)*2^(1/2)/Pi^(1/2)/x)*sin(a)+x*sin(a+b 
/x^2)
 

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.01 \[ \int \sin \left (a+\frac {b}{x^2}\right ) \, dx=x \cos \left (\frac {b}{x^2}\right ) \sin (a)-\sqrt {b} \sqrt {2 \pi } \left (\cos (a) \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )-\operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a)\right )+x \cos (a) \sin \left (\frac {b}{x^2}\right ) \] Input:

Integrate[Sin[a + b/x^2],x]
 

Output:

x*Cos[b/x^2]*Sin[a] - Sqrt[b]*Sqrt[2*Pi]*(Cos[a]*FresnelC[(Sqrt[b]*Sqrt[2/ 
Pi])/x] - FresnelS[(Sqrt[b]*Sqrt[2/Pi])/x]*Sin[a]) + x*Cos[a]*Sin[b/x^2]
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {3840, 3868, 3835, 3832, 3833}

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 \sin \left (a+\frac {b}{x^2}\right ) \, dx\)

\(\Big \downarrow \) 3840

\(\displaystyle -\int x^2 \sin \left (a+\frac {b}{x^2}\right )d\frac {1}{x}\)

\(\Big \downarrow \) 3868

\(\displaystyle x \sin \left (a+\frac {b}{x^2}\right )-2 b \int \cos \left (a+\frac {b}{x^2}\right )d\frac {1}{x}\)

\(\Big \downarrow \) 3835

\(\displaystyle x \sin \left (a+\frac {b}{x^2}\right )-2 b \left (\cos (a) \int \cos \left (\frac {b}{x^2}\right )d\frac {1}{x}-\sin (a) \int \sin \left (\frac {b}{x^2}\right )d\frac {1}{x}\right )\)

\(\Big \downarrow \) 3832

\(\displaystyle x \sin \left (a+\frac {b}{x^2}\right )-2 b \left (\cos (a) \int \cos \left (\frac {b}{x^2}\right )d\frac {1}{x}-\frac {\sqrt {\frac {\pi }{2}} \sin (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )}{\sqrt {b}}\right )\)

\(\Big \downarrow \) 3833

\(\displaystyle x \sin \left (a+\frac {b}{x^2}\right )-2 b \left (\frac {\sqrt {\frac {\pi }{2}} \cos (a) \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )}{\sqrt {b}}-\frac {\sqrt {\frac {\pi }{2}} \sin (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )}{\sqrt {b}}\right )\)

Input:

Int[Sin[a + b/x^2],x]
 

Output:

-2*b*((Sqrt[Pi/2]*Cos[a]*FresnelC[(Sqrt[b]*Sqrt[2/Pi])/x])/Sqrt[b] - (Sqrt 
[Pi/2]*FresnelS[(Sqrt[b]*Sqrt[2/Pi])/x]*Sin[a])/Sqrt[b]) + x*Sin[a + b/x^2 
]
 

Defintions of rubi rules used

rule 3832
Int[Sin[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]/(f*Rt[ 
d, 2]))*FresnelS[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)], x] /; FreeQ[{d, e, f}, x]
 

rule 3833
Int[Cos[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]/(f*Rt[ 
d, 2]))*FresnelC[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)], x] /; FreeQ[{d, e, f}, x]
 

rule 3835
Int[Cos[(c_) + (d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[Cos[c]   In 
t[Cos[d*(e + f*x)^2], x], x] - Simp[Sin[c]   Int[Sin[d*(e + f*x)^2], x], x] 
 /; FreeQ[{c, d, e, f}, x]
 

rule 3840
Int[((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_.), x_S 
ymbol] :> Simp[-f^(-1)   Subst[Int[(a + b*Sin[c + d/x^n])^p/x^2, x], x, 1/( 
e + f*x)], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[p, 0] && ILtQ[n, 0] & 
& EqQ[n, -2]
 

rule 3868
Int[((e_.)*(x_))^(m_)*Sin[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Simp[(e*x) 
^(m + 1)*(Sin[c + d*x^n]/(e*(m + 1))), x] - Simp[d*(n/(e^n*(m + 1)))   Int[ 
(e*x)^(m + n)*Cos[c + d*x^n], x], x] /; FreeQ[{c, d, e}, x] && IGtQ[n, 0] & 
& LtQ[m, -1]
 
Maple [A] (verified)

Time = 0.64 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.74

method result size
derivativedivides \(x \sin \left (a +\frac {b}{x^{2}}\right )-\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {FresnelC}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )-\sin \left (a \right ) \operatorname {FresnelS}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )\) \(59\)
default \(x \sin \left (a +\frac {b}{x^{2}}\right )-\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {FresnelC}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )-\sin \left (a \right ) \operatorname {FresnelS}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )\) \(59\)
risch \(-\frac {{\mathrm e}^{i a} b \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {-i b}}{x}\right )}{2 \sqrt {-i b}}-\frac {{\mathrm e}^{-i a} b \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {i b}}{x}\right )}{2 \sqrt {i b}}+x \sin \left (\frac {a \,x^{2}+b}{x^{2}}\right )\) \(72\)
meijerg \(-\frac {\cos \left (a \right ) \sqrt {\pi }\, \sqrt {2}\, \sqrt {b}\, \left (-\frac {4 \sqrt {2}\, x \sin \left (\frac {b}{x^{2}}\right )}{\sqrt {b}\, \sqrt {\pi }}+8 \,\operatorname {FresnelC}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )}{8}-\frac {\sin \left (a \right ) \sqrt {\pi }\, \sqrt {2}\, \left (b^{2}\right )^{\frac {1}{4}} \left (-\frac {4 x \sqrt {2}\, \cos \left (\frac {b}{x^{2}}\right )}{\sqrt {\pi }\, \left (b^{2}\right )^{\frac {1}{4}}}-\frac {8 \sqrt {b}\, \operatorname {FresnelS}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )}{\left (b^{2}\right )^{\frac {1}{4}}}\right )}{8}\) \(110\)

Input:

int(sin(a+b/x^2),x,method=_RETURNVERBOSE)
 

Output:

x*sin(a+b/x^2)-b^(1/2)*2^(1/2)*Pi^(1/2)*(cos(a)*FresnelC(b^(1/2)*2^(1/2)/P 
i^(1/2)/x)-sin(a)*FresnelS(b^(1/2)*2^(1/2)/Pi^(1/2)/x))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.92 \[ \int \sin \left (a+\frac {b}{x^2}\right ) \, dx=-\sqrt {2} \pi \sqrt {\frac {b}{\pi }} \cos \left (a\right ) \operatorname {C}\left (\frac {\sqrt {2} \sqrt {\frac {b}{\pi }}}{x}\right ) + \sqrt {2} \pi \sqrt {\frac {b}{\pi }} \operatorname {S}\left (\frac {\sqrt {2} \sqrt {\frac {b}{\pi }}}{x}\right ) \sin \left (a\right ) + x \sin \left (\frac {a x^{2} + b}{x^{2}}\right ) \] Input:

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

Output:

-sqrt(2)*pi*sqrt(b/pi)*cos(a)*fresnel_cos(sqrt(2)*sqrt(b/pi)/x) + sqrt(2)* 
pi*sqrt(b/pi)*fresnel_sin(sqrt(2)*sqrt(b/pi)/x)*sin(a) + x*sin((a*x^2 + b) 
/x^2)
                                                                                    
                                                                                    
 

Sympy [F]

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

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

Output:

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

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.08 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.59 \[ \int \sin \left (a+\frac {b}{x^2}\right ) \, dx=\frac {\sqrt {2} {\left (2 \, \sqrt {2} b x^{2} \sqrt {\frac {1}{x^{4}}} \sin \left (\frac {a x^{2} + b}{x^{2}}\right ) + {\left ({\left (\left (i - 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {i \, b}{x^{2}}}\right ) - 1\right )} - \left (i + 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {i \, b}{x^{2}}}\right ) - 1\right )}\right )} \cos \left (a\right ) + {\left (\left (i + 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {i \, b}{x^{2}}}\right ) - 1\right )} - \left (i - 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {i \, b}{x^{2}}}\right ) - 1\right )}\right )} \sin \left (a\right )\right )} b \left (\frac {b^{2}}{x^{4}}\right )^{\frac {1}{4}}\right )} \sqrt {x^{4}}}{4 \, b x} \] Input:

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

Output:

1/4*sqrt(2)*(2*sqrt(2)*b*x^2*sqrt(x^(-4))*sin((a*x^2 + b)/x^2) + (((I - 1) 
*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) - (I + 1)*sqrt(pi)*(erf(sqrt(-I*b/x^2)) 
 - 1))*cos(a) + ((I + 1)*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) - (I - 1)*sqrt( 
pi)*(erf(sqrt(-I*b/x^2)) - 1))*sin(a))*b*(b^2/x^4)^(1/4))*sqrt(x^4)/(b*x)
 

Giac [F]

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

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

Output:

integrate(sin(a + b/x^2), x)
 

Mupad [F(-1)]

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

int(sin(a + b/x^2),x)
 

Output:

int(sin(a + b/x^2), x)
 

Reduce [F]

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

int(sin(a+b/x^2),x)
 

Output:

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