Integrand size = 12, antiderivative size = 103 \[ \int x^m \cos ^2(a+b x) \, dx=\frac {x^{1+m}}{2 (1+m)}-\frac {i 2^{-3-m} e^{2 i a} x^m (-i b x)^{-m} \Gamma (1+m,-2 i b x)}{b}+\frac {i 2^{-3-m} e^{-2 i a} x^m (i b x)^{-m} \Gamma (1+m,2 i b x)}{b} \] Output:
x^(1+m)/(2+2*m)-I*2^(-3-m)*exp(2*I*a)*x^m*GAMMA(1+m,-2*I*b*x)/b/((-I*b*x)^ m)+I*2^(-3-m)*x^m*GAMMA(1+m,2*I*b*x)/b/exp(2*I*a)/((I*b*x)^m)
Time = 0.14 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.87 \[ \int x^m \cos ^2(a+b x) \, dx=\frac {1}{8} x^m \left (\frac {4 x}{1+m}-2^{-m} e^{2 i a} x (-i b x)^{-1-m} \Gamma (1+m,-2 i b x)-2^{-m} e^{-2 i a} x (i b x)^{-1-m} \Gamma (1+m,2 i b x)\right ) \] Input:
Integrate[x^m*Cos[a + b*x]^2,x]
Output:
(x^m*((4*x)/(1 + m) - (E^((2*I)*a)*x*((-I)*b*x)^(-1 - m)*Gamma[1 + m, (-2* I)*b*x])/2^m - (x*(I*b*x)^(-1 - m)*Gamma[1 + m, (2*I)*b*x])/(2^m*E^((2*I)* a))))/8
Time = 0.33 (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.250, 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 \cos ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int x^m \sin \left (a+b x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3793 |
\(\displaystyle \int \left (\frac {1}{2} x^m \cos (2 a+2 b x)+\frac {x^m}{2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i e^{2 i a} 2^{-m-3} x^m (-i b x)^{-m} \Gamma (m+1,-2 i b x)}{b}+\frac {i e^{-2 i a} 2^{-m-3} x^m (i b x)^{-m} \Gamma (m+1,2 i b x)}{b}+\frac {x^{m+1}}{2 (m+1)}\) |
Input:
Int[x^m*Cos[a + b*x]^2,x]
Output:
x^(1 + m)/(2*(1 + m)) - (I*2^(-3 - m)*E^((2*I)*a)*x^m*Gamma[1 + m, (-2*I)* b*x])/(b*((-I)*b*x)^m) + (I*2^(-3 - m)*x^m*Gamma[1 + m, (2*I)*b*x])/(b*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^{m} \cos \left (b x +a \right )^{2}d x\]
Input:
int(x^m*cos(b*x+a)^2,x)
Output:
int(x^m*cos(b*x+a)^2,x)
Time = 0.08 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.67 \[ \int x^m \cos ^2(a+b x) \, dx=\frac {4 \, b x x^{m} + {\left (i \, m + i\right )} e^{\left (-m \log \left (2 i \, b\right ) - 2 i \, a\right )} \Gamma \left (m + 1, 2 i \, b x\right ) + {\left (-i \, m - i\right )} e^{\left (-m \log \left (-2 i \, b\right ) + 2 i \, a\right )} \Gamma \left (m + 1, -2 i \, b x\right )}{8 \, {\left (b m + b\right )}} \] Input:
integrate(x^m*cos(b*x+a)^2,x, algorithm="fricas")
Output:
1/8*(4*b*x*x^m + (I*m + I)*e^(-m*log(2*I*b) - 2*I*a)*gamma(m + 1, 2*I*b*x) + (-I*m - I)*e^(-m*log(-2*I*b) + 2*I*a)*gamma(m + 1, -2*I*b*x))/(b*m + b)
\[ \int x^m \cos ^2(a+b x) \, dx=\int x^{m} \cos ^{2}{\left (a + b x \right )}\, dx \] Input:
integrate(x**m*cos(b*x+a)**2,x)
Output:
Integral(x**m*cos(a + b*x)**2, x)
\[ \int x^m \cos ^2(a+b x) \, dx=\int { x^{m} \cos \left (b x + a\right )^{2} \,d x } \] Input:
integrate(x^m*cos(b*x+a)^2,x, algorithm="maxima")
Output:
1/2*((m + 1)*integrate(x^m*cos(2*b*x + 2*a), x) + e^(m*log(x) + log(x)))/( m + 1)
\[ \int x^m \cos ^2(a+b x) \, dx=\int { x^{m} \cos \left (b x + a\right )^{2} \,d x } \] Input:
integrate(x^m*cos(b*x+a)^2,x, algorithm="giac")
Output:
integrate(x^m*cos(b*x + a)^2, x)
Timed out. \[ \int x^m \cos ^2(a+b x) \, dx=\int x^m\,{\cos \left (a+b\,x\right )}^2 \,d x \] Input:
int(x^m*cos(a + b*x)^2,x)
Output:
int(x^m*cos(a + b*x)^2, x)
\[ \int x^m \cos ^2(a+b x) \, dx =\text {Too large to display} \] Input:
int(x^m*cos(b*x+a)^2,x)
Output:
(10*x**m*cos(a + b*x)*sin(a + b*x)*tan((a + b*x)/2)**4*m + 10*x**m*cos(a + b*x)*sin(a + b*x)*tan((a + b*x)/2)**4 + 20*x**m*cos(a + b*x)*sin(a + b*x) *tan((a + b*x)/2)**2*m + 20*x**m*cos(a + b*x)*sin(a + b*x)*tan((a + b*x)/2 )**2 + 10*x**m*cos(a + b*x)*sin(a + b*x)*m + 10*x**m*cos(a + b*x)*sin(a + b*x) + 10*x**m*sin(a + b*x)*tan((a + b*x)/2)**4*m + 10*x**m*sin(a + b*x)*t an((a + b*x)/2)**4 + 20*x**m*sin(a + b*x)*tan((a + b*x)/2)**2*m + 20*x**m* sin(a + b*x)*tan((a + b*x)/2)**2 + 10*x**m*sin(a + b*x)*m + 10*x**m*sin(a + b*x) + 3*x**m*tan((a + b*x)/2)**4*b*x - 24*x**m*tan((a + b*x)/2)**3*m - 24*x**m*tan((a + b*x)/2)**3 + 6*x**m*tan((a + b*x)/2)**2*b*x - 40*x**m*tan ((a + b*x)/2)*m - 40*x**m*tan((a + b*x)/2) + 3*x**m*b*x + 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 + 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 + 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 + 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 + 12*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 + b*x)/2)**2 + 1),x)*b + 24*int((x**m*tan((a + b*x)/2)**3)/ (tan((a + b*x)/2)**4*x + 2*tan((a + b*x)/2)**2*x + x),x)*tan((a + b*x)/2)* *4*m**2 + 24*int((x**m*tan((a + b*x)/2)**3)/(tan((a + b*x)/2)**4*x + 2*tan ((a + b*x)/2)**2*x + x),x)*tan((a + b*x)/2)**4*m + 48*int((x**m*tan((a ...