\(\int e^{2 i \arctan (a x)} x^m \, dx\) [136]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [F]
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 39 \[ \int e^{2 i \arctan (a x)} x^m \, dx=-\frac {x^{1+m}}{1+m}+\frac {2 x^{1+m} \operatorname {Hypergeometric2F1}(1,1+m,2+m,i a x)}{1+m} \]

[Out]

-x^(1+m)/(1+m)+2*x^(1+m)*hypergeom([1, 1+m],[2+m],I*a*x)/(1+m)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, 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 = {5170, 81, 66} \[ \int e^{2 i \arctan (a x)} x^m \, dx=-\frac {x^{m+1}}{m+1}+\frac {2 x^{m+1} \operatorname {Hypergeometric2F1}(1,m+1,m+2,i a x)}{m+1} \]

[In]

Int[E^((2*I)*ArcTan[a*x])*x^m,x]

[Out]

-(x^(1 + m)/(1 + m)) + (2*x^(1 + m)*Hypergeometric2F1[1, 1 + m, 2 + m, I*a*x])/(1 + m)

Rule 66

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x)^(m + 1)/(b*(m + 1)))*Hypergeometr
ic2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[
c, 0] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))

Rule 81

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 5170

Int[E^(ArcTan[(a_.)*(x_)]*(n_.))*(x_)^(m_.), x_Symbol] :> Int[x^m*((1 - I*a*x)^(I*(n/2))/(1 + I*a*x)^(I*(n/2))
), x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[(I*n - 1)/2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {x^m (1+i a x)}{1-i a x} \, dx \\ & = -\frac {x^{1+m}}{1+m}+2 \int \frac {x^m}{1-i a x} \, dx \\ & = -\frac {x^{1+m}}{1+m}+\frac {2 x^{1+m} \operatorname {Hypergeometric2F1}(1,1+m,2+m,i a x)}{1+m} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.74 \[ \int e^{2 i \arctan (a x)} x^m \, dx=\frac {x^{1+m} (-1+2 \operatorname {Hypergeometric2F1}(1,1+m,2+m,i a x))}{1+m} \]

[In]

Integrate[E^((2*I)*ArcTan[a*x])*x^m,x]

[Out]

(x^(1 + m)*(-1 + 2*Hypergeometric2F1[1, 1 + m, 2 + m, I*a*x]))/(1 + m)

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 5.

Time = 0.30 (sec) , antiderivative size = 175, normalized size of antiderivative = 4.49

method result size
meijerg \(\frac {x^{1+m} \left (\frac {1}{2}+\frac {m}{2}\right ) \operatorname {LerchPhi}\left (-a^{2} x^{2}, 1, \frac {1}{2}+\frac {m}{2}\right )}{1+m}+\frac {i \left (a^{2}\right )^{-\frac {m}{2}} \left (\frac {2 x^{m} \left (a^{2}\right )^{\frac {m}{2}}}{m}+\frac {x^{m} \left (a^{2}\right )^{\frac {m}{2}} \left (-2-m \right ) \operatorname {LerchPhi}\left (-a^{2} x^{2}, 1, \frac {m}{2}\right )}{2+m}\right )}{a}-\frac {\left (a^{2}\right )^{-\frac {1}{2}-\frac {m}{2}} \left (\frac {2 x^{1+m} \left (a^{2}\right )^{\frac {3}{2}+\frac {m}{2}}}{\left (1+m \right ) a^{2}}+\frac {x^{1+m} \left (a^{2}\right )^{\frac {3}{2}+\frac {m}{2}} \left (-3-m \right ) \operatorname {LerchPhi}\left (-a^{2} x^{2}, 1, \frac {1}{2}+\frac {m}{2}\right )}{\left (3+m \right ) a^{2}}\right )}{2}\) \(175\)

[In]

int((1+I*a*x)^2/(a^2*x^2+1)*x^m,x,method=_RETURNVERBOSE)

[Out]

1/(1+m)*x^(1+m)*(1/2+1/2*m)*LerchPhi(-a^2*x^2,1,1/2+1/2*m)+I/a*(a^2)^(-1/2*m)*(2*x^m*(a^2)^(1/2*m)/m+1/(2+m)*x
^m*(a^2)^(1/2*m)*(-2-m)*LerchPhi(-a^2*x^2,1,1/2*m))-1/2*(a^2)^(-1/2-1/2*m)*(2*x^(1+m)*(a^2)^(3/2+1/2*m)/(1+m)/
a^2+1/(3+m)*x^(1+m)*(a^2)^(3/2+1/2*m)*(-3-m)/a^2*LerchPhi(-a^2*x^2,1,1/2+1/2*m))

Fricas [F]

\[ \int e^{2 i \arctan (a x)} x^m \, dx=\int { \frac {{\left (i \, a x + 1\right )}^{2} x^{m}}{a^{2} x^{2} + 1} \,d x } \]

[In]

integrate((1+I*a*x)^2/(a^2*x^2+1)*x^m,x, algorithm="fricas")

[Out]

integral(-(a*x - I)*x^m/(a*x + I), x)

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 126 vs. \(2 (27) = 54\).

Time = 1.63 (sec) , antiderivative size = 126, normalized size of antiderivative = 3.23 \[ \int e^{2 i \arctan (a x)} x^m \, dx=\frac {i a m x^{m + 2} \Phi \left (a x e^{\frac {i \pi }{2}}, 1, m + 2\right ) \Gamma \left (m + 2\right )}{\Gamma \left (m + 3\right )} + \frac {2 i a x^{m + 2} \Phi \left (a x e^{\frac {i \pi }{2}}, 1, m + 2\right ) \Gamma \left (m + 2\right )}{\Gamma \left (m + 3\right )} + \frac {m x^{m + 1} \Phi \left (a x e^{\frac {i \pi }{2}}, 1, m + 1\right ) \Gamma \left (m + 1\right )}{\Gamma \left (m + 2\right )} + \frac {x^{m + 1} \Phi \left (a x e^{\frac {i \pi }{2}}, 1, m + 1\right ) \Gamma \left (m + 1\right )}{\Gamma \left (m + 2\right )} \]

[In]

integrate((1+I*a*x)**2/(a**2*x**2+1)*x**m,x)

[Out]

I*a*m*x**(m + 2)*lerchphi(a*x*exp_polar(I*pi/2), 1, m + 2)*gamma(m + 2)/gamma(m + 3) + 2*I*a*x**(m + 2)*lerchp
hi(a*x*exp_polar(I*pi/2), 1, m + 2)*gamma(m + 2)/gamma(m + 3) + m*x**(m + 1)*lerchphi(a*x*exp_polar(I*pi/2), 1
, m + 1)*gamma(m + 1)/gamma(m + 2) + x**(m + 1)*lerchphi(a*x*exp_polar(I*pi/2), 1, m + 1)*gamma(m + 1)/gamma(m
 + 2)

Maxima [F]

\[ \int e^{2 i \arctan (a x)} x^m \, dx=\int { \frac {{\left (i \, a x + 1\right )}^{2} x^{m}}{a^{2} x^{2} + 1} \,d x } \]

[In]

integrate((1+I*a*x)^2/(a^2*x^2+1)*x^m,x, algorithm="maxima")

[Out]

integrate((I*a*x + 1)^2*x^m/(a^2*x^2 + 1), x)

Giac [F]

\[ \int e^{2 i \arctan (a x)} x^m \, dx=\int { \frac {{\left (i \, a x + 1\right )}^{2} x^{m}}{a^{2} x^{2} + 1} \,d x } \]

[In]

integrate((1+I*a*x)^2/(a^2*x^2+1)*x^m,x, algorithm="giac")

[Out]

integrate((I*a*x + 1)^2*x^m/(a^2*x^2 + 1), x)

Mupad [F(-1)]

Timed out. \[ \int e^{2 i \arctan (a x)} x^m \, dx=\int \frac {x^m\,{\left (1+a\,x\,1{}\mathrm {i}\right )}^2}{a^2\,x^2+1} \,d x \]

[In]

int((x^m*(a*x*1i + 1)^2)/(a^2*x^2 + 1),x)

[Out]

int((x^m*(a*x*1i + 1)^2)/(a^2*x^2 + 1), x)