Is integrating over complex numbers like this valid? I had to evaluate the integral $$I=\int_{0}^{\pi} x^4 \sin{x} \ \mathrm{d}x$$ I thought that integrating by parts would be to long, and so, planning to use the property $\displaystyle\int e^{x} (f(x)+f'(x)) \ \mathrm{d}x=e^{x}f(x)+C$,  I wrote the required integral this way - $$I=\Im \int_{0}^{\pi} x^4 e^{ix} \ \mathrm{d}x$$ Then I substituted $ix=t$. So, I got $$I=\Im \left\{i \int_{0}^{i\pi} x^4 e^x \ \mathrm{d}x\right\}$$ I used the property stated earlier, and got the answer. But, is integrating over complex numbers just like reals okay? If so, what does it mean? I mean, integrating over the reals signifies the area under a curve. What does integrating over complex numbers this way mean, if it is valid?


What does integrating over complex numbers this way mean, if it is valid?

Imagine that the graph of the function is plotted along a third dimension, perpendicular on the horizontal plane $XOY$. Since the line segment $(0,i\pi)\subset OY$, imagine that the graph is drawn in $YOZ$, with both the real part and the imaginary part forming each a curve in this new plane.
