0

I'm trying to calculate the definite integral: $$\int_{-\pi}^{\pi} (-5\ e^{iz})^{\frac{3}{2}} e^{-inz} dz $$

The indefinite integral without the constant of integration is:

$$ \frac {10 i\sqrt {5}\sqrt {-e^{i z}} e^{-i (n - 1) z}} {2 n - 3} $$

The difference of the indefinite integral evaluated at the bounds $\{-\pi,\pi\}$ is

$$ \frac{10 i \sqrt{5} e^{-i \pi (n-1)}}{2 n-3}-\frac{10 i \sqrt{5} e^{i \pi (n-1)}}{2 n-3} $$

If I substitute $n$ for a positive integer this difference evaluates to $0$

Also the difference can be simplified to

$$ \frac{10 i \sqrt{5} e^{-i \pi (n-1)}}{2 n-3}-\frac{10 i \sqrt{5} e^{i \pi (n-1)}}{2 n-3} = \frac{20 \sqrt{5} \sin (\pi n)}{2 n-3} $$

If I ask Mathematica to compute the definite integral

Integrate[E^(-I*n*z)*((-5*E^(I*z))^(3/2)), {z, -Pi, Pi}],

it produces:

$$ \frac{20 \sqrt{5} (\sin (\pi n)+1)}{2 n-3} $$

I'm using this to generate a Fourier series of $$ {(-5\ e^{i\ z})}^{\frac{3}{2}} $$

Using the definite integral that Mathematica produces, I am able to produce a Fourier series that converges correctly. But using the definite integral obtained from taking the difference of the indefinite integral at the bounds, I can't generate a correctly converging fourier series since $n$ substituted for positive integers always causes the expression to equal $0$

So what I'm wondering is how did Mathematica generate the correct definite integral?, why doesn't computing the definite integral the typical analytic way work?, and is there a way to calculate the correct definite integral using the indefinite integral in this case?

Anon
  • 149
  • 1
    Welcome to MSE. Please, use MathJax to type the math in your questions. Consider that many users in this forum won't even read your question if it's not properly formatted, let alone help you. – jjagmath Mar 08 '25 at 12:55
  • When you were subtracting the indefinite integral evaluated at the bounds (as shown in your third expression), did you make sure to plug in $\pi$ for the first antiderivative term and $-\pi$ for the second term? – VV_721 Mar 08 '25 at 12:58
  • If you plugged in the same $n$ value for both terms, then indeed their difference would be zero. – VV_721 Mar 08 '25 at 13:02
  • @VV_721 Yes. If you try plugging in Pi in the first term and -Pi in the 2nd term it should be what I've posted. Let me know if I made a mistake. – Anon Mar 08 '25 at 13:11
  • @jjagmath changed it to mathjax. can you remove your downvote if you did? – Anon Mar 08 '25 at 13:18
  • Oh sorry, I read the question wrong and thought your third expression was the antiderivative, when it’s actually the second one. In that case, your third expression obtained by plugging the bounds and subtracting is absolutely correct. – VV_721 Mar 08 '25 at 13:31

2 Answers2

1

In order for the definite integral to equal the difference of the indefinite integral at the two endpoints, there are some hypotheses to check. For example, that indefinite integral must be continuous on the interval. That fails for your indefinite integral....

Example.
In $$ F_n(z) := \frac {10 i\sqrt {5}\sqrt {-e^{i z}} e^{-i (n - 1) z}} {2 n - 3} $$ let's take $n=3$. $$ F_3(z) = {\frac {10\,i}{3}}\sqrt {5}\sqrt {-{{\rm e}^{iz}}}{{\rm e}^{-2\,iz}} $$ Here is the real part $\operatorname{Re}(F_3(z))$:
image
It has a jump at the origin. To get a continuous antiderivative, you have to adjust the "$+C$" when you pass $0$:
adjusted

GEdgar
  • 117,296
  • I see that doing this does result in the same definite integral that mathematica produced. But is there a reference or explanation you can give as to why this is mathematically legitamate to do? Or more specifically why is it okay for an indefinite integral of a function to be a piecewise function with different constants of integration, when the integrand is not expressed as a piecewise function? And does this mean the true indefinite Integral of this integrand is in fact legitamately expressed as this piecewise function? – Anon Mar 08 '25 at 16:26
  • Edit: And does this mean the true indefinite Integral of this integrand is in fact legitamately expressed as a piecewise function with multiple constants of integration with the constraint that the constants must result in a continuous function? – Anon Mar 08 '25 at 17:00
1

Part of the problem here is that your integrand is discontinuous. For example, taking $n = 3$ and taking the usual branches of the complex principal square root, the graph of $(-5\ e^{iz})^{3/2} e^{-inz}$ looks like this (from Wolfram Alpha):

graph of real and imaginary parts of the function above from -2pi to 2pi

There is an obvious discontinuity at zero.

Many of the elementary calculus texts you might look into for the Fundamental Theorem won't tell you what to do in a case like this, because they only cover the case of an integrand that is continuous on its entire domain. Those references don't even define your integral. But your kind of integral is addressed in some of the answers to Continuity & differentiability of an improper integral of discontinuous function and Is an integral always continuous? The conclusion is that if the integral is defined in any of the ways mentioned in those answers, it is continuous.

Your method of integration finds a local antiderivative at (almost) every point of the domain, but the formula that it gives you is a formula for a function that is discontinuous at zero. In order to be able to use the Fundamental Theorem the way you want to, you need a single continuous integral over the entire interval $[-\pi,\pi].$ The piecewise nature of $\sqrt{e^{iz}}$ got you into this mess and the simplest way out is a piecewise "adjustment" of the antiderivative to obtain a continuous indefinite integral.

Note that even after this adjustment, you still have a constant of integration, ${}+C,$ to apply to the indefinite integral.

David K
  • 108,155