Integrand size = 16, antiderivative size = 88 \[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=-\frac {a}{x}+b \sqrt {d} \sqrt {2 \pi } \cos (c) \operatorname {FresnelC}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-b \sqrt {d} \sqrt {2 \pi } \operatorname {FresnelS}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)-\frac {b \sin \left (c+d x^2\right )}{x} \] Output:
-a/x+b*d^(1/2)*2^(1/2)*Pi^(1/2)*cos(c)*FresnelC(d^(1/2)*2^(1/2)/Pi^(1/2)*x )-b*d^(1/2)*2^(1/2)*Pi^(1/2)*FresnelS(d^(1/2)*2^(1/2)/Pi^(1/2)*x)*sin(c)-b *sin(d*x^2+c)/x
Time = 0.35 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.03 \[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=-\frac {a}{x}-\frac {b \cos \left (d x^2\right ) \sin (c)}{x}+b \sqrt {d} \sqrt {2 \pi } \left (\cos (c) \operatorname {FresnelC}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-\operatorname {FresnelS}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)\right )-\frac {b \cos (c) \sin \left (d x^2\right )}{x} \] Input:
Integrate[(a + b*Sin[c + d*x^2])/x^2,x]
Output:
-(a/x) - (b*Cos[d*x^2]*Sin[c])/x + b*Sqrt[d]*Sqrt[2*Pi]*(Cos[c]*FresnelC[S qrt[d]*Sqrt[2/Pi]*x] - FresnelS[Sqrt[d]*Sqrt[2/Pi]*x]*Sin[c]) - (b*Cos[c]* Sin[d*x^2])/x
Time = 0.25 (sec) , antiderivative size = 88, 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 = {2010, 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 {a+b \sin \left (c+d x^2\right )}{x^2} \, dx\) |
\(\Big \downarrow \) 2010 |
\(\displaystyle \int \left (\frac {a}{x^2}+\frac {b \sin \left (c+d x^2\right )}{x^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a}{x}+\sqrt {2 \pi } b \sqrt {d} \cos (c) \operatorname {FresnelC}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-\sqrt {2 \pi } b \sqrt {d} \sin (c) \operatorname {FresnelS}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-\frac {b \sin \left (c+d x^2\right )}{x}\) |
Input:
Int[(a + b*Sin[c + d*x^2])/x^2,x]
Output:
-(a/x) + b*Sqrt[d]*Sqrt[2*Pi]*Cos[c]*FresnelC[Sqrt[d]*Sqrt[2/Pi]*x] - b*Sq rt[d]*Sqrt[2*Pi]*FresnelS[Sqrt[d]*Sqrt[2/Pi]*x]*Sin[c] - (b*Sin[c + d*x^2] )/x
Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x] , x] /; FreeQ[{c, m}, x] && SumQ[u] && !LinearQ[u, x] && !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]
Time = 0.71 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.75
method | result | size |
default | \(-\frac {a}{x}+b \left (-\frac {\sin \left (d \,x^{2}+c \right )}{x}+\sqrt {d}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (c \right ) \operatorname {FresnelC}\left (\frac {\sqrt {d}\, \sqrt {2}\, x}{\sqrt {\pi }}\right )-\sin \left (c \right ) \operatorname {FresnelS}\left (\frac {\sqrt {d}\, \sqrt {2}\, x}{\sqrt {\pi }}\right )\right )\right )\) | \(66\) |
parts | \(-\frac {a}{x}+b \left (-\frac {\sin \left (d \,x^{2}+c \right )}{x}+\sqrt {d}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (c \right ) \operatorname {FresnelC}\left (\frac {\sqrt {d}\, \sqrt {2}\, x}{\sqrt {\pi }}\right )-\sin \left (c \right ) \operatorname {FresnelS}\left (\frac {\sqrt {d}\, \sqrt {2}\, x}{\sqrt {\pi }}\right )\right )\right )\) | \(66\) |
risch | \(\frac {b d \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-i d}\, x \right ) {\mathrm e}^{i c}}{2 \sqrt {-i d}}+\frac {b d \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {i d}\, x \right ) {\mathrm e}^{-i c}}{2 \sqrt {i d}}-\frac {a}{x}-\frac {b \sin \left (d \,x^{2}+c \right )}{x}\) | \(76\) |
Input:
int((a+b*sin(d*x^2+c))/x^2,x,method=_RETURNVERBOSE)
Output:
-a/x+b*(-sin(d*x^2+c)/x+d^(1/2)*2^(1/2)*Pi^(1/2)*(cos(c)*FresnelC(d^(1/2)* 2^(1/2)/Pi^(1/2)*x)-sin(c)*FresnelS(d^(1/2)*2^(1/2)/Pi^(1/2)*x)))
Time = 0.09 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.89 \[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=\frac {\sqrt {2} \pi b x \sqrt {\frac {d}{\pi }} \cos \left (c\right ) \operatorname {C}\left (\sqrt {2} x \sqrt {\frac {d}{\pi }}\right ) - \sqrt {2} \pi b x \sqrt {\frac {d}{\pi }} \operatorname {S}\left (\sqrt {2} x \sqrt {\frac {d}{\pi }}\right ) \sin \left (c\right ) - b \sin \left (d x^{2} + c\right ) - a}{x} \] Input:
integrate((a+b*sin(d*x^2+c))/x^2,x, algorithm="fricas")
Output:
(sqrt(2)*pi*b*x*sqrt(d/pi)*cos(c)*fresnel_cos(sqrt(2)*x*sqrt(d/pi)) - sqrt (2)*pi*b*x*sqrt(d/pi)*fresnel_sin(sqrt(2)*x*sqrt(d/pi))*sin(c) - b*sin(d*x ^2 + c) - a)/x
\[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=\int \frac {a + b \sin {\left (c + d x^{2} \right )}}{x^{2}}\, dx \] Input:
integrate((a+b*sin(d*x**2+c))/x**2,x)
Output:
Integral((a + b*sin(c + d*x**2))/x**2, x)
Result contains complex when optimal does not.
Time = 0.19 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.92 \[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=-\frac {\sqrt {d x^{2}} {\left ({\left (\left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, i \, d x^{2}\right ) - \left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, -i \, d x^{2}\right )\right )} \cos \left (c\right ) + {\left (\left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, i \, d x^{2}\right ) - \left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, -i \, d x^{2}\right )\right )} \sin \left (c\right )\right )} b}{8 \, x} - \frac {a}{x} \] Input:
integrate((a+b*sin(d*x^2+c))/x^2,x, algorithm="maxima")
Output:
-1/8*sqrt(d*x^2)*(((I - 1)*sqrt(2)*gamma(-1/2, I*d*x^2) - (I + 1)*sqrt(2)* gamma(-1/2, -I*d*x^2))*cos(c) + ((I + 1)*sqrt(2)*gamma(-1/2, I*d*x^2) - (I - 1)*sqrt(2)*gamma(-1/2, -I*d*x^2))*sin(c))*b/x - a/x
\[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=\int { \frac {b \sin \left (d x^{2} + c\right ) + a}{x^{2}} \,d x } \] Input:
integrate((a+b*sin(d*x^2+c))/x^2,x, algorithm="giac")
Output:
integrate((b*sin(d*x^2 + c) + a)/x^2, x)
Timed out. \[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=\int \frac {a+b\,\sin \left (d\,x^2+c\right )}{x^2} \,d x \] Input:
int((a + b*sin(c + d*x^2))/x^2,x)
Output:
int((a + b*sin(c + d*x^2))/x^2, x)
\[ \int \frac {a+b \sin \left (c+d x^2\right )}{x^2} \, dx=\frac {4 \left (\int \frac {1}{\tan \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )^{2}+1}d x \right ) b d x -\sin \left (d \,x^{2}+c \right ) b -a -2 b d \,x^{2}}{x} \] Input:
int((a+b*sin(d*x^2+c))/x^2,x)
Output:
(4*int(1/(tan((c + d*x**2)/2)**2 + 1),x)*b*d*x - sin(c + d*x**2)*b - a - 2 *b*d*x**2)/x