Integrand size = 14, antiderivative size = 53 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\frac {2 b \cos (c+d x)}{d^3}-\frac {a \cos (c+d x)}{d}-\frac {b x^2 \cos (c+d x)}{d}+\frac {2 b x \sin (c+d x)}{d^2} \] Output:
2*b*cos(d*x+c)/d^3-a*cos(d*x+c)/d-b*x^2*cos(d*x+c)/d+2*b*x*sin(d*x+c)/d^2
Time = 0.07 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.77 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\frac {-\left (\left (a d^2+b \left (-2+d^2 x^2\right )\right ) \cos (c+d x)\right )+2 b d x \sin (c+d x)}{d^3} \] Input:
Integrate[(a + b*x^2)*Sin[c + d*x],x]
Output:
(-((a*d^2 + b*(-2 + d^2*x^2))*Cos[c + d*x]) + 2*b*d*x*Sin[c + d*x])/d^3
Time = 0.24 (sec) , antiderivative size = 53, 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.143, Rules used = {3810, 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 \left (a+b x^2\right ) \sin (c+d x) \, dx\) |
\(\Big \downarrow \) 3810 |
\(\displaystyle \int \left (a \sin (c+d x)+b x^2 \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a \cos (c+d x)}{d}+\frac {2 b \cos (c+d x)}{d^3}+\frac {2 b x \sin (c+d x)}{d^2}-\frac {b x^2 \cos (c+d x)}{d}\) |
Input:
Int[(a + b*x^2)*Sin[c + d*x],x]
Output:
(2*b*Cos[c + d*x])/d^3 - (a*Cos[c + d*x])/d - (b*x^2*Cos[c + d*x])/d + (2* b*x*Sin[c + d*x])/d^2
Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> In t[ExpandIntegrand[Sin[c + d*x], (a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[p, 0]
Time = 0.83 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.81
method | result | size |
risch | \(-\frac {\left (x^{2} d^{2} b +d^{2} a -2 b \right ) \cos \left (d x +c \right )}{d^{3}}+\frac {2 b x \sin \left (d x +c \right )}{d^{2}}\) | \(43\) |
parallelrisch | \(\frac {\left (\left (-b \,x^{2}-a \right ) d^{2}+2 b \right ) \cos \left (d x +c \right )+2 \sin \left (d x +c \right ) b d x +d^{2} a -2 b}{d^{3}}\) | \(50\) |
parts | \(-\frac {b \,x^{2} \cos \left (d x +c \right )}{d}-\frac {a \cos \left (d x +c \right )}{d}+\frac {2 b \left (\cos \left (d x +c \right )+\left (d x +c \right ) \sin \left (d x +c \right )-c \sin \left (d x +c \right )\right )}{d^{3}}\) | \(63\) |
norman | \(\frac {\frac {b \,x^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}-\frac {2 d^{2} a -4 b}{d^{3}}-\frac {b \,x^{2}}{d}+\frac {4 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{2}}}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\) | \(77\) |
orering | \(\frac {4 b x \left (x^{2} d^{2} b +d^{2} a -b \right ) \sin \left (d x +c \right )}{d^{4} \left (b \,x^{2}+a \right )}-\frac {\left (x^{2} d^{2} b +d^{2} a -2 b \right ) \left (2 x b \sin \left (d x +c \right )+\left (b \,x^{2}+a \right ) d \cos \left (d x +c \right )\right )}{d^{4} \left (b \,x^{2}+a \right )}\) | \(98\) |
derivativedivides | \(\frac {-\cos \left (d x +c \right ) a -\frac {b \,c^{2} \cos \left (d x +c \right )}{d^{2}}-\frac {2 b c \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}+\frac {b \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^{2}}}{d}\) | \(99\) |
default | \(\frac {-\cos \left (d x +c \right ) a -\frac {b \,c^{2} \cos \left (d x +c \right )}{d^{2}}-\frac {2 b c \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}+\frac {b \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^{2}}}{d}\) | \(99\) |
meijerg | \(\frac {4 b \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 \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 {a \sin \left (c \right ) \sin \left (d x \right )}{d}+\frac {a \cos \left (c \right ) \sqrt {\pi }\, \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (d x \right )}{\sqrt {\pi }}\right )}{d}\) | \(145\) |
Input:
int((b*x^2+a)*sin(d*x+c),x,method=_RETURNVERBOSE)
Output:
-(b*d^2*x^2+a*d^2-2*b)/d^3*cos(d*x+c)+2*b*x*sin(d*x+c)/d^2
Time = 0.09 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.77 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\frac {2 \, b d x \sin \left (d x + c\right ) - {\left (b d^{2} x^{2} + a d^{2} - 2 \, b\right )} \cos \left (d x + c\right )}{d^{3}} \] Input:
integrate((b*x^2+a)*sin(d*x+c),x, algorithm="fricas")
Output:
(2*b*d*x*sin(d*x + c) - (b*d^2*x^2 + a*d^2 - 2*b)*cos(d*x + c))/d^3
Time = 0.18 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.23 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\begin {cases} - \frac {a \cos {\left (c + d x \right )}}{d} - \frac {b x^{2} \cos {\left (c + d x \right )}}{d} + \frac {2 b x \sin {\left (c + d x \right )}}{d^{2}} + \frac {2 b \cos {\left (c + d x \right )}}{d^{3}} & \text {for}\: d \neq 0 \\\left (a x + \frac {b x^{3}}{3}\right ) \sin {\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate((b*x**2+a)*sin(d*x+c),x)
Output:
Piecewise((-a*cos(c + d*x)/d - b*x**2*cos(c + d*x)/d + 2*b*x*sin(c + d*x)/ d**2 + 2*b*cos(c + d*x)/d**3, Ne(d, 0)), ((a*x + b*x**3/3)*sin(c), True))
Time = 0.04 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.72 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=-\frac {a \cos \left (d x + c\right ) + \frac {b c^{2} \cos \left (d x + c\right )}{d^{2}} - \frac {2 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b c}{d^{2}} + \frac {{\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} b}{d^{2}}}{d} \] Input:
integrate((b*x^2+a)*sin(d*x+c),x, algorithm="maxima")
Output:
-(a*cos(d*x + c) + b*c^2*cos(d*x + c)/d^2 - 2*((d*x + c)*cos(d*x + c) - si n(d*x + c))*b*c/d^2 + (((d*x + c)^2 - 2)*cos(d*x + c) - 2*(d*x + c)*sin(d* x + c))*b/d^2)/d
Time = 0.10 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.79 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\frac {2 \, b x \sin \left (d x + c\right )}{d^{2}} - \frac {{\left (b d^{2} x^{2} + a d^{2} - 2 \, b\right )} \cos \left (d x + c\right )}{d^{3}} \] Input:
integrate((b*x^2+a)*sin(d*x+c),x, algorithm="giac")
Output:
2*b*x*sin(d*x + c)/d^2 - (b*d^2*x^2 + a*d^2 - 2*b)*cos(d*x + c)/d^3
Time = 42.59 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.92 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\frac {\cos \left (c+d\,x\right )\,\left (2\,b-a\,d^2\right )}{d^3}+\frac {2\,b\,x\,\sin \left (c+d\,x\right )}{d^2}-\frac {b\,x^2\,\cos \left (c+d\,x\right )}{d} \] Input:
int(sin(c + d*x)*(a + b*x^2),x)
Output:
(cos(c + d*x)*(2*b - a*d^2))/d^3 + (2*b*x*sin(c + d*x))/d^2 - (b*x^2*cos(c + d*x))/d
Time = 0.16 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98 \[ \int \left (a+b x^2\right ) \sin (c+d x) \, dx=\frac {-\cos \left (d x +c \right ) a \,d^{2}-\cos \left (d x +c \right ) b \,d^{2} x^{2}+2 \cos \left (d x +c \right ) b +2 \sin \left (d x +c \right ) b d x}{d^{3}} \] Input:
int((b*x^2+a)*sin(d*x+c),x)
Output:
( - cos(c + d*x)*a*d**2 - cos(c + d*x)*b*d**2*x**2 + 2*cos(c + d*x)*b + 2* sin(c + d*x)*b*d*x)/d**3