Integrand size = 14, antiderivative size = 103 \[ \int x^{2+m} \sin ^2(a+b x) \, dx=\frac {x^{3+m}}{2 (3+m)}-\frac {i 2^{-5-m} e^{2 i a} x^m (-i b x)^{-m} \Gamma (3+m,-2 i b x)}{b^3}+\frac {i 2^{-5-m} e^{-2 i a} x^m (i b x)^{-m} \Gamma (3+m,2 i b x)}{b^3} \] Output:
x^(3+m)/(6+2*m)-I*2^(-5-m)*exp(2*I*a)*x^m*GAMMA(3+m,-2*I*b*x)/b^3/((-I*b*x )^m)+I*2^(-5-m)*x^m*GAMMA(3+m,2*I*b*x)/b^3/exp(2*I*a)/((I*b*x)^m)
Time = 0.36 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.17 \[ \int x^{2+m} \sin ^2(a+b x) \, dx=\frac {2^{-5-m} x^m \left (b^2 x^2\right )^{-m} \left (2^{4+m} b x \left (b^2 x^2\right )^{1+m}+(3+m) (i b x)^m \Gamma (3+m,-2 i b x) (-i \cos (2 a)+\sin (2 a))+(3+m) (-i b x)^m \Gamma (3+m,2 i b x) (i \cos (2 a)+\sin (2 a))\right )}{b^3 (3+m)} \] Input:
Integrate[x^(2 + m)*Sin[a + b*x]^2,x]
Output:
(2^(-5 - m)*x^m*(2^(4 + m)*b*x*(b^2*x^2)^(1 + m) + (3 + m)*(I*b*x)^m*Gamma [3 + m, (-2*I)*b*x]*((-I)*Cos[2*a] + Sin[2*a]) + (3 + m)*((-I)*b*x)^m*Gamm a[3 + m, (2*I)*b*x]*(I*Cos[2*a] + Sin[2*a])))/(b^3*(3 + m)*(b^2*x^2)^m)
Time = 0.34 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 3793, 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 x^{m+2} \sin ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int x^{m+2} \sin (a+b x)^2dx\) |
\(\Big \downarrow \) 3793 |
\(\displaystyle \int \left (\frac {x^{m+2}}{2}-\frac {1}{2} x^{m+2} \cos (2 a+2 b x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i e^{2 i a} 2^{-m-5} x^m (-i b x)^{-m} \Gamma (m+3,-2 i b x)}{b^3}+\frac {i e^{-2 i a} 2^{-m-5} x^m (i b x)^{-m} \Gamma (m+3,2 i b x)}{b^3}+\frac {x^{m+3}}{2 (m+3)}\) |
Input:
Int[x^(2 + m)*Sin[a + b*x]^2,x]
Output:
x^(3 + m)/(2*(3 + m)) - (I*2^(-5 - m)*E^((2*I)*a)*x^m*Gamma[3 + m, (-2*I)* b*x])/(b^3*((-I)*b*x)^m) + (I*2^(-5 - m)*x^m*Gamma[3 + m, (2*I)*b*x])/(b^3 *E^((2*I)*a)*(I*b*x)^m)
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In t[ExpandTrigReduce[(c + d*x)^m, Sin[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f , m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1]))
\[\int x^{2+m} \sin \left (b x +a \right )^{2}d x\]
Input:
int(x^(2+m)*sin(b*x+a)^2,x)
Output:
int(x^(2+m)*sin(b*x+a)^2,x)
Time = 0.08 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.75 \[ \int x^{2+m} \sin ^2(a+b x) \, dx=\frac {4 \, b x x^{m + 2} + {\left (-i \, m - 3 i\right )} e^{\left (-{\left (m + 2\right )} \log \left (2 i \, b\right ) - 2 i \, a\right )} \Gamma \left (m + 3, 2 i \, b x\right ) + {\left (i \, m + 3 i\right )} e^{\left (-{\left (m + 2\right )} \log \left (-2 i \, b\right ) + 2 i \, a\right )} \Gamma \left (m + 3, -2 i \, b x\right )}{8 \, {\left (b m + 3 \, b\right )}} \] Input:
integrate(x^(2+m)*sin(b*x+a)^2,x, algorithm="fricas")
Output:
1/8*(4*b*x*x^(m + 2) + (-I*m - 3*I)*e^(-(m + 2)*log(2*I*b) - 2*I*a)*gamma( m + 3, 2*I*b*x) + (I*m + 3*I)*e^(-(m + 2)*log(-2*I*b) + 2*I*a)*gamma(m + 3 , -2*I*b*x))/(b*m + 3*b)
\[ \int x^{2+m} \sin ^2(a+b x) \, dx=\int x^{m + 2} \sin ^{2}{\left (a + b x \right )}\, dx \] Input:
integrate(x**(2+m)*sin(b*x+a)**2,x)
Output:
Integral(x**(m + 2)*sin(a + b*x)**2, x)
\[ \int x^{2+m} \sin ^2(a+b x) \, dx=\int { x^{m + 2} \sin \left (b x + a\right )^{2} \,d x } \] Input:
integrate(x^(2+m)*sin(b*x+a)^2,x, algorithm="maxima")
Output:
-1/2*((m + 3)*integrate(x^2*x^m*cos(2*b*x + 2*a), x) - e^(m*log(x) + 3*log (x)))/(m + 3)
\[ \int x^{2+m} \sin ^2(a+b x) \, dx=\int { x^{m + 2} \sin \left (b x + a\right )^{2} \,d x } \] Input:
integrate(x^(2+m)*sin(b*x+a)^2,x, algorithm="giac")
Output:
integrate(x^(m + 2)*sin(b*x + a)^2, x)
Timed out. \[ \int x^{2+m} \sin ^2(a+b x) \, dx=\int x^{m+2}\,{\sin \left (a+b\,x\right )}^2 \,d x \] Input:
int(x^(m + 2)*sin(a + b*x)^2,x)
Output:
int(x^(m + 2)*sin(a + b*x)^2, x)
\[ \int x^{2+m} \sin ^2(a+b x) \, dx =\text {Too large to display} \] Input:
int(x^(2+m)*sin(b*x+a)^2,x)
Output:
(3*x**m*tan((a + b*x)/2)**4*b**3*x**3 + 6*x**m*tan((a + b*x)/2)**3*b**2*m* x**2 + 18*x**m*tan((a + b*x)/2)**3*b**2*x**2 + 6*x**m*tan((a + b*x)/2)**2* b**3*x**3 + 6*x**m*tan((a + b*x)/2)**2*b*m**2*x + 30*x**m*tan((a + b*x)/2) **2*b*m*x + 36*x**m*tan((a + b*x)/2)**2*b*x - 6*x**m*tan((a + b*x)/2)*b**2 *m*x**2 - 18*x**m*tan((a + b*x)/2)*b**2*x**2 + 4*x**m*tan((a + b*x)/2)*m** 3 + 24*x**m*tan((a + b*x)/2)*m**2 + 44*x**m*tan((a + b*x)/2)*m + 24*x**m*t an((a + b*x)/2) + 3*x**m*b**3*x**3 - 2*int(x**m/(tan((a + b*x)/2)**4 + 2*t an((a + b*x)/2)**2 + 1),x)*tan((a + b*x)/2)**4*b*m**3 - 12*int(x**m/(tan(( a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*tan((a + b*x)/2)**4*b*m**2 - 22*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*tan((a + b*x)/2)**4*b*m - 12*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)** 2 + 1),x)*tan((a + b*x)/2)**4*b - 4*int(x**m/(tan((a + b*x)/2)**4 + 2*tan( (a + b*x)/2)**2 + 1),x)*tan((a + b*x)/2)**2*b*m**3 - 24*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*tan((a + b*x)/2)**2*b*m**2 - 4 4*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*tan((a + b *x)/2)**2*b*m - 24*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*tan((a + b*x)/2)**2*b - 2*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b*m**3 - 12*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b*m**2 - 22*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b*m - 12*int(x**m/(tan((a + b*x)/2)**4 + 2*tan((a ...