Integrand size = 12, antiderivative size = 75 \[ \int x^{1+m} \cos (a+b x) \, dx=\frac {e^{i a} x^m (-i b x)^{-m} \Gamma (2+m,-i b x)}{2 b^2}+\frac {e^{-i a} x^m (i b x)^{-m} \Gamma (2+m,i b x)}{2 b^2} \] Output:
1/2*exp(I*a)*x^m*GAMMA(2+m,-I*b*x)/b^2/((-I*b*x)^m)+1/2*x^m*GAMMA(2+m,I*b* x)/b^2/exp(I*a)/((I*b*x)^m)
Time = 0.02 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00 \[ \int x^{1+m} \cos (a+b x) \, dx=\frac {e^{i a} x^m (-i b x)^{-m} \Gamma (2+m,-i b x)}{2 b^2}+\frac {e^{-i a} x^m (i b x)^{-m} \Gamma (2+m,i b x)}{2 b^2} \] Input:
Integrate[x^(1 + m)*Cos[a + b*x],x]
Output:
(E^(I*a)*x^m*Gamma[2 + m, (-I)*b*x])/(2*b^2*((-I)*b*x)^m) + (x^m*Gamma[2 + m, I*b*x])/(2*b^2*E^(I*a)*(I*b*x)^m)
Time = 0.27 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3788, 26, 2612}
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+1} \cos (a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int x^{m+1} \sin \left (a+b x+\frac {\pi }{2}\right )dx\) |
\(\Big \downarrow \) 3788 |
\(\displaystyle \frac {1}{2} i \int -i e^{-i (a+b x)} x^{m+1}dx-\frac {1}{2} i \int i e^{i (a+b x)} x^{m+1}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {1}{2} \int e^{-i (a+b x)} x^{m+1}dx+\frac {1}{2} \int e^{i (a+b x)} x^{m+1}dx\) |
\(\Big \downarrow \) 2612 |
\(\displaystyle \frac {e^{i a} x^m (-i b x)^{-m} \Gamma (m+2,-i b x)}{2 b^2}+\frac {e^{-i a} x^m (i b x)^{-m} \Gamma (m+2,i b x)}{2 b^2}\) |
Input:
Int[x^(1 + m)*Cos[a + b*x],x]
Output:
(E^(I*a)*x^m*Gamma[2 + m, (-I)*b*x])/(2*b^2*((-I)*b*x)^m) + (x^m*Gamma[2 + m, I*b*x])/(2*b^2*E^(I*a)*(I*b*x)^m)
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(-F^(g*(e - c*(f/d))))*((c + d*x)^FracPart[m]/(d*((-f)*g*(Log[F]/d) )^(IntPart[m] + 1)*((-f)*g*Log[F]*((c + d*x)/d))^FracPart[m]))*Gamma[m + 1, ((-f)*g*(Log[F]/d))*(c + d*x)], x] /; FreeQ[{F, c, d, e, f, g, m}, x] && !IntegerQ[m]
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + Pi*(k_.) + (f_.)*(x_)], x_Symbol ] :> Simp[I/2 Int[(c + d*x)^m/(E^(I*k*Pi)*E^(I*(e + f*x))), x], x] - Simp [I/2 Int[(c + d*x)^m*E^(I*k*Pi)*E^(I*(e + f*x)), x], x] /; FreeQ[{c, d, e , f, m}, x] && IntegerQ[2*k]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.73 (sec) , antiderivative size = 291, normalized size of antiderivative = 3.88
method | result | size |
meijerg | \(\frac {2^{1+m} \left (b^{2}\right )^{-\frac {m}{2}} \sqrt {\pi }\, \left (\frac {2^{-1-m} x^{1+m} b \left (b^{2}\right )^{\frac {m}{2}} \sin \left (b x \right )}{\sqrt {\pi }\, \left (2+m \right )}+\frac {3 \,2^{-2-m} x^{2+m} b^{2} \left (b^{2}\right )^{\frac {m}{2}} \left (\frac {2}{3}+\frac {2 m}{3}\right ) \left (b x \right )^{-\frac {3}{2}-m} \operatorname {LommelS1}\left (m +\frac {3}{2}, \frac {3}{2}, b x \right ) \sin \left (b x \right )}{\sqrt {\pi }\, \left (2+m \right )}+\frac {2^{-1-m} x^{2+m} b^{2} \left (b^{2}\right )^{\frac {m}{2}} \left (1+m \right ) \left (b x \right )^{-\frac {5}{2}-m} \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right ) \operatorname {LommelS1}\left (m +\frac {1}{2}, \frac {1}{2}, b x \right )}{\sqrt {\pi }}\right ) \cos \left (a \right )}{b^{2}}-2^{1+m} b^{-2-m} \sqrt {\pi }\, \left (\frac {2^{-1-m} x^{2+m} b^{2+m} m \left (b x \right )^{-\frac {3}{2}-m} \operatorname {LommelS1}\left (m +\frac {1}{2}, \frac {3}{2}, b x \right ) \sin \left (b x \right )}{\sqrt {\pi }}-\frac {2^{-1-m} x^{2+m} b^{2+m} \left (b x \right )^{-\frac {5}{2}-m} \left (\cos \left (b x \right ) x b -\sin \left (b x \right )\right ) \operatorname {LommelS1}\left (m +\frac {3}{2}, \frac {1}{2}, b x \right )}{\sqrt {\pi }}\right ) \sin \left (a \right )\) | \(291\) |
Input:
int(x^(1+m)*cos(b*x+a),x,method=_RETURNVERBOSE)
Output:
2^(1+m)/b^2*(b^2)^(-1/2*m)*Pi^(1/2)*(2^(-1-m)/Pi^(1/2)/(2+m)*x^(1+m)*b*(b^ 2)^(1/2*m)*sin(b*x)+3*2^(-2-m)/Pi^(1/2)/(2+m)*x^(2+m)*b^2*(b^2)^(1/2*m)*(2 /3+2/3*m)*(b*x)^(-3/2-m)*LommelS1(m+3/2,3/2,b*x)*sin(b*x)+2^(-1-m)/Pi^(1/2 )*x^(2+m)*b^2*(b^2)^(1/2*m)*(1+m)*(b*x)^(-5/2-m)*(cos(b*x)*x*b-sin(b*x))*L ommelS1(m+1/2,1/2,b*x))*cos(a)-2^(1+m)*b^(-2-m)*Pi^(1/2)*(2^(-1-m)/Pi^(1/2 )*x^(2+m)*b^(2+m)*m*(b*x)^(-3/2-m)*LommelS1(m+1/2,3/2,b*x)*sin(b*x)-2^(-1- m)/Pi^(1/2)*x^(2+m)*b^(2+m)*(b*x)^(-5/2-m)*(cos(b*x)*x*b-sin(b*x))*LommelS 1(m+3/2,1/2,b*x))*sin(a)
Time = 0.08 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.72 \[ \int x^{1+m} \cos (a+b x) \, dx=\frac {i \, e^{\left (-{\left (m + 1\right )} \log \left (i \, b\right ) - i \, a\right )} \Gamma \left (m + 2, i \, b x\right ) - i \, e^{\left (-{\left (m + 1\right )} \log \left (-i \, b\right ) + i \, a\right )} \Gamma \left (m + 2, -i \, b x\right )}{2 \, b} \] Input:
integrate(x^(1+m)*cos(b*x+a),x, algorithm="fricas")
Output:
1/2*(I*e^(-(m + 1)*log(I*b) - I*a)*gamma(m + 2, I*b*x) - I*e^(-(m + 1)*log (-I*b) + I*a)*gamma(m + 2, -I*b*x))/b
\[ \int x^{1+m} \cos (a+b x) \, dx=\int x^{m + 1} \cos {\left (a + b x \right )}\, dx \] Input:
integrate(x**(1+m)*cos(b*x+a),x)
Output:
Integral(x**(m + 1)*cos(a + b*x), x)
\[ \int x^{1+m} \cos (a+b x) \, dx=\int { x^{m + 1} \cos \left (b x + a\right ) \,d x } \] Input:
integrate(x^(1+m)*cos(b*x+a),x, algorithm="maxima")
Output:
integrate(x^(m + 1)*cos(b*x + a), x)
\[ \int x^{1+m} \cos (a+b x) \, dx=\int { x^{m + 1} \cos \left (b x + a\right ) \,d x } \] Input:
integrate(x^(1+m)*cos(b*x+a),x, algorithm="giac")
Output:
integrate(x^(m + 1)*cos(b*x + a), x)
Timed out. \[ \int x^{1+m} \cos (a+b x) \, dx=\int x^{m+1}\,\cos \left (a+b\,x\right ) \,d x \] Input:
int(x^(m + 1)*cos(a + b*x),x)
Output:
int(x^(m + 1)*cos(a + b*x), x)
\[ \int x^{1+m} \cos (a+b x) \, dx=\frac {x^{m} \cos \left (b x +a \right ) m +x^{m} \cos \left (b x +a \right )+x^{m} \sin \left (b x +a \right ) b x -x^{m} m -x^{m}+2 \left (\int \frac {x^{m} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2} x +x}d x \right ) m^{2}+2 \left (\int \frac {x^{m} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}{\tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2} x +x}d x \right ) m}{b^{2}} \] Input:
int(x^(1+m)*cos(b*x+a),x)
Output:
(x**m*cos(a + b*x)*m + x**m*cos(a + b*x) + x**m*sin(a + b*x)*b*x - x**m*m - x**m + 2*int((x**m*tan((a + b*x)/2)**2)/(tan((a + b*x)/2)**2*x + x),x)*m **2 + 2*int((x**m*tan((a + b*x)/2)**2)/(tan((a + b*x)/2)**2*x + x),x)*m)/b **2