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:
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?
Integrate[E^x x^(2/3), {x, 0, x}]
$\endgroup$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$