Integrand size = 19, antiderivative size = 97 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {2 b^2 \cos (c+d x)}{d^3}-\frac {2 a b \cos (c+d x)}{d}-\frac {b^2 x^2 \cos (c+d x)}{d}+a^2 d \cos (c) \operatorname {CosIntegral}(d x)-\frac {a^2 \sin (c+d x)}{x}+\frac {2 b^2 x \sin (c+d x)}{d^2}-a^2 d \sin (c) \text {Si}(d x) \] Output:
2*b^2*cos(d*x+c)/d^3-2*a*b*cos(d*x+c)/d-b^2*x^2*cos(d*x+c)/d+a^2*d*cos(c)* Ci(d*x)-a^2*sin(d*x+c)/x+2*b^2*x*sin(d*x+c)/d^2-a^2*d*sin(c)*Si(d*x)
Time = 0.28 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {2 b^2 \cos (c+d x)}{d^3}-\frac {2 a b \cos (c+d x)}{d}-\frac {b^2 x^2 \cos (c+d x)}{d}+a^2 d \cos (c) \operatorname {CosIntegral}(d x)-\frac {a^2 \sin (c+d x)}{x}+\frac {2 b^2 x \sin (c+d x)}{d^2}-a^2 d \sin (c) \text {Si}(d x) \] Input:
Integrate[((a + b*x^2)^2*Sin[c + d*x])/x^2,x]
Output:
(2*b^2*Cos[c + d*x])/d^3 - (2*a*b*Cos[c + d*x])/d - (b^2*x^2*Cos[c + d*x]) /d + a^2*d*Cos[c]*CosIntegral[d*x] - (a^2*Sin[c + d*x])/x + (2*b^2*x*Sin[c + d*x])/d^2 - a^2*d*Sin[c]*SinIntegral[d*x]
Time = 0.36 (sec) , antiderivative size = 97, 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 = {3820, 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 {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx\) |
\(\Big \downarrow \) 3820 |
\(\displaystyle \int \left (\frac {a^2 \sin (c+d x)}{x^2}+2 a b \sin (c+d x)+b^2 x^2 \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 d \cos (c) \operatorname {CosIntegral}(d x)-a^2 d \sin (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{x}-\frac {2 a b \cos (c+d x)}{d}+\frac {2 b^2 \cos (c+d x)}{d^3}+\frac {2 b^2 x \sin (c+d x)}{d^2}-\frac {b^2 x^2 \cos (c+d x)}{d}\) |
Input:
Int[((a + b*x^2)^2*Sin[c + d*x])/x^2,x]
Output:
(2*b^2*Cos[c + d*x])/d^3 - (2*a*b*Cos[c + d*x])/d - (b^2*x^2*Cos[c + d*x]) /d + a^2*d*Cos[c]*CosIntegral[d*x] - (a^2*Sin[c + d*x])/x + (2*b^2*x*Sin[c + d*x])/d^2 - a^2*d*Sin[c]*SinIntegral[d*x]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_ )], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x ], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Time = 1.14 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.61
method | result | size |
derivativedivides | \(d \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )-\frac {2 a b \cos \left (d x +c \right )}{d^{2}}-\frac {6 b^{2} c^{2} \cos \left (d x +c \right )}{d^{4}}-\frac {4 c \,b^{2} \left (2 c +1\right ) \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}+\frac {\left (3 c^{2}+2 c +1\right ) b^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}\right )\) | \(156\) |
default | \(d \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )-\frac {2 a b \cos \left (d x +c \right )}{d^{2}}-\frac {6 b^{2} c^{2} \cos \left (d x +c \right )}{d^{4}}-\frac {4 c \,b^{2} \left (2 c +1\right ) \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}+\frac {\left (3 c^{2}+2 c +1\right ) b^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}\right )\) | \(156\) |
risch | \(-\frac {-\pi \,\operatorname {csgn}\left (d x \right ) \sin \left (c \right ) a^{2} d^{4} x +2 \,\operatorname {Si}\left (d x \right ) \sin \left (c \right ) a^{2} d^{4} x -i \pi \,\operatorname {csgn}\left (d x \right ) \cos \left (c \right ) a^{2} d^{4} x +2 i \operatorname {Si}\left (d x \right ) \cos \left (c \right ) a^{2} d^{4} x +2 \,\operatorname {expIntegral}_{1}\left (-i d x \right ) \cos \left (c \right ) a^{2} d^{4} x +2 \cos \left (d x +c \right ) b^{2} d^{2} x^{3}+2 \sin \left (d x +c \right ) a^{2} d^{3}-4 \sin \left (d x +c \right ) b^{2} d \,x^{2}+4 \cos \left (d x +c \right ) a b \,d^{2} x -4 \cos \left (d x +c \right ) b^{2} x}{2 d^{3} x}\) | \(164\) |
meijerg | \(\frac {4 b^{2} \sin \left (c \right ) \sqrt {\pi }\, \left (\frac {x \left (d^{2}\right )^{\frac {3}{2}} \cos \left (d x \right )}{2 \sqrt {\pi }\, d^{2}}-\frac {\left (d^{2}\right )^{\frac {3}{2}} \left (-\frac {3 x^{2} d^{2}}{2}+3\right ) \sin \left (d x \right )}{6 \sqrt {\pi }\, d^{3}}\right )}{d^{2} \sqrt {d^{2}}}+\frac {4 b^{2} \cos \left (c \right ) \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\left (-\frac {x^{2} d^{2}}{2}+1\right ) \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {x d \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{3}}+\frac {2 a b \sin \left (c \right ) \sin \left (d x \right )}{d}+\frac {2 a b \cos \left (c \right ) \sqrt {\pi }\, \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (d x \right )}{\sqrt {\pi }}\right )}{d}+\frac {a^{2} \sin \left (c \right ) \sqrt {\pi }\, d^{2} \left (-\frac {4 d^{2} \cos \left (x \sqrt {d^{2}}\right )}{x \left (d^{2}\right )^{\frac {3}{2}} \sqrt {\pi }}-\frac {4 \,\operatorname {Si}\left (x \sqrt {d^{2}}\right )}{\sqrt {\pi }}\right )}{4 \sqrt {d^{2}}}+\frac {a^{2} \cos \left (c \right ) \sqrt {\pi }\, d \left (\frac {4 \gamma -4+4 \ln \left (x \right )+4 \ln \left (d \right )}{\sqrt {\pi }}+\frac {4}{\sqrt {\pi }}-\frac {4 \gamma }{\sqrt {\pi }}-\frac {4 \ln \left (2\right )}{\sqrt {\pi }}-\frac {4 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}-\frac {4 \sin \left (d x \right )}{\sqrt {\pi }\, x d}+\frac {4 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{4}\) | \(291\) |
Input:
int((b*x^2+a)^2*sin(d*x+c)/x^2,x,method=_RETURNVERBOSE)
Output:
d*(a^2*(-sin(d*x+c)/d/x-Si(d*x)*sin(c)+Ci(d*x)*cos(c))-2/d^2*a*b*cos(d*x+c )-6/d^4*b^2*c^2*cos(d*x+c)-4*c*b^2*(2*c+1)/d^4*(sin(d*x+c)-cos(d*x+c)*(d*x +c))+(3*c^2+2*c+1)/d^4*b^2*(-(d*x+c)^2*cos(d*x+c)+2*cos(d*x+c)+2*(d*x+c)*s in(d*x+c)))
Time = 0.08 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.99 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {a^{2} d^{4} x \cos \left (c\right ) \operatorname {Ci}\left (d x\right ) - a^{2} d^{4} x \sin \left (c\right ) \operatorname {Si}\left (d x\right ) - {\left (b^{2} d^{2} x^{3} + 2 \, {\left (a b d^{2} - b^{2}\right )} x\right )} \cos \left (d x + c\right ) - {\left (a^{2} d^{3} - 2 \, b^{2} d x^{2}\right )} \sin \left (d x + c\right )}{d^{3} x} \] Input:
integrate((b*x^2+a)^2*sin(d*x+c)/x^2,x, algorithm="fricas")
Output:
(a^2*d^4*x*cos(c)*cos_integral(d*x) - a^2*d^4*x*sin(c)*sin_integral(d*x) - (b^2*d^2*x^3 + 2*(a*b*d^2 - b^2)*x)*cos(d*x + c) - (a^2*d^3 - 2*b^2*d*x^2 )*sin(d*x + c))/(d^3*x)
\[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\int \frac {\left (a + b x^{2}\right )^{2} \sin {\left (c + d x \right )}}{x^{2}}\, dx \] Input:
integrate((b*x**2+a)**2*sin(d*x+c)/x**2,x)
Output:
Integral((a + b*x**2)**2*sin(c + d*x)/x**2, x)
Result contains complex when optimal does not.
Time = 0.99 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {{\left (a^{2} {\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \cos \left (c\right ) + a^{2} {\left (-i \, \Gamma \left (-1, i \, d x\right ) + i \, \Gamma \left (-1, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{4} + 4 \, b^{2} d x \sin \left (d x + c\right ) - 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, a b d^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )}{2 \, d^{3}} \] Input:
integrate((b*x^2+a)^2*sin(d*x+c)/x^2,x, algorithm="maxima")
Output:
1/2*((a^2*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))*cos(c) + a^2*(-I*gamma(-1 , I*d*x) + I*gamma(-1, -I*d*x))*sin(c))*d^4 + 4*b^2*d*x*sin(d*x + c) - 2*( b^2*d^2*x^2 + 2*a*b*d^2 - 2*b^2)*cos(d*x + c))/d^3
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.15 (sec) , antiderivative size = 1638, normalized size of antiderivative = 16.89 \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\text {Too large to display} \] Input:
integrate((b*x^2+a)^2*sin(d*x+c)/x^2,x, algorithm="giac")
Output:
-1/2*(a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/ 2*d*x)^2*tan(1/2*c)^2 + a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d* x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a^2*d^4*x*imag_part(cos_integ ral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c) - 2*a^2*d^4*x*i mag_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2 *c) + 4*a^2*d^4*x*sin_integral(d*x)*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2* tan(1/2*c) - 2*b^2*d^2*x^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2*tan(1/2*c )^2 - a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/ 2*d*x)^2 - a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2* tan(1/2*d*x)^2 + a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*d*x + 1/2* c)^2*tan(1/2*c)^2 + a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c)^2 + a^2*d^4*x*real_part(cos_integral(d*x))*tan(1/2*d*x )^2*tan(1/2*c)^2 + a^2*d^4*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2* tan(1/2*c)^2 - 2*b^2*d^2*x^3*tan(1/2*d*x + 1/2*c)^2*tan(1/2*d*x)^2 + 2*a^2 *d^4*x*imag_part(cos_integral(d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) - 2* a^2*d^4*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) + 4*a^2*d^4*x*sin_integral(d*x)*tan(1/2*d*x + 1/2*c)^2*tan(1/2*c) + 2*a^2* d^4*x*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a^2*d^4*x *imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*a^2*d^4*x*sin _integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c) - 2*b^2*d^2*x^3*tan(1/2*d*x + ...
Timed out. \[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\int \frac {\sin \left (c+d\,x\right )\,{\left (b\,x^2+a\right )}^2}{x^2} \,d x \] Input:
int((sin(c + d*x)*(a + b*x^2)^2)/x^2,x)
Output:
int((sin(c + d*x)*(a + b*x^2)^2)/x^2, x)
\[ \int \frac {\left (a+b x^2\right )^2 \sin (c+d x)}{x^2} \, dx=\frac {-2 \cos \left (d x +c \right ) a b \,d^{2}-\cos \left (d x +c \right ) b^{2} d^{2} x^{2}+2 \cos \left (d x +c \right ) b^{2}+\left (\int \frac {\sin \left (d x +c \right )}{x^{2}}d x \right ) a^{2} d^{3}+2 \sin \left (d x +c \right ) b^{2} d x}{d^{3}} \] Input:
int((b*x^2+a)^2*sin(d*x+c)/x^2,x)
Output:
( - 2*cos(c + d*x)*a*b*d**2 - cos(c + d*x)*b**2*d**2*x**2 + 2*cos(c + d*x) *b**2 + int(sin(c + d*x)/x**2,x)*a**2*d**3 + 2*sin(c + d*x)*b**2*d*x)/d**3