2
$\begingroup$

I am trying to compute the following (indefinite) integral:

$$\int e^x x^{2/3} dx $$

Integrate[E^x (x)^(2/3), x]
Plot[{Re[%], Im[%]}, {x, -5, 5}]

Output is:

enter image description here

That the integral is complex for $x<0$ makes sense to me, since the integrand is. But for $x>0$ the latter is real, why is the integral complex?

$\endgroup$
4
  • $\begingroup$ Your function isn't real for x<0! $\endgroup$ Commented Jul 31, 2023 at 12:44
  • 1
    $\begingroup$ Integrate[E^x x^(2/3), {x, 0, x}] $\endgroup$
    – Domen
    Commented Jul 31, 2023 at 12:47
  • 1
    $\begingroup$ If differentiating the anti derivative gives back the integrand ($\pm$ constant in anti is OK), then the result is correct, which is in this case. !Mathematica graphics $\endgroup$
    – Nasser
    Commented Jul 31, 2023 at 12:48
  • $\begingroup$ The integrand is not real. It's multivalued (like $z^{1/3}$ is). The discontinuity arises from integrating it using a multivalued antiderivative over a path which is not analytically continuous, that is, across its branch point at the origin. Look at ComplexExpand[x^(2/3)/(-x)^(2/3)] and note how the argument of x abruptly changes from $0$ to $\pi$ across the branch point as $x$ changes from negative to positive giving rise to the discontinuity. $\endgroup$
    – josh
    Commented Jul 31, 2023 at 13:33

1 Answer 1

3
$\begingroup$

The antiderivative is calculated with a complex integration constant. Its value is here

Limit[(x^(2/3)*Gamma[5/3, -x])/(-x)^(2/3), x -> 0, 
Direction -> "FromAbove"]   
(* (-(-1)^(1/3))*Gamma[5/3] *)

and you can subtract it like :

Integrate[E^x*x^(2/3), x]
Plot[{Re[% + (-1)^(1/3)*Gamma[5/3]], Im[% + (-1)^(1/3)*Gamma[5/3]], 
NIntegrate[E^y (y)^(2/3), {y, 0, x}]}, {x, 0, 1}, 
PlotStyle -> {Blue, Red, Dashed}]

enter image description here The corrected antiderivative (blue line) coincides with the numerical integration (dashed green) and the imaginary part (red) is gone.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.