Wikipedia:Reference desk/Archives/Mathematics/2023 August 2

= August 2 =

Minus one raised to the x is actually normalized sine and cosine waves
I found out that $$\left(-1 \right)^x = e^{(i \pi x)}$$ according to Wolfram Alpha, which means I can re-write the equations for the discrete Fourier transform to $$X_k = \sum_{n=0}^{N-1} x_n \cdot (-1)^{-\frac {2}{N}kn}$$, so are they easier to write than traditional ones since I don't have to scale it by pi? 2001:448A:3070:D945:9116:3C5C:80F7:837F (talk) 05:24, 2 August 2023 (UTC)


 * It does not lead to a simplification. Worse, the equality claimed by WolframAlpha is dubious. I suppose that it will also happily tell you that $$(-1)^{1/2}=i.$$ This exponentation is, however, generally considered undefined; see the last paragraph of . This implies that the road of defining $$(-1)^x$$ more generally as the limit for rational exponents approaching $$x$$ (see ) is barred. The remaining approach, as given in the subsection, is to use the general identity $$a^b=\exp(b\ln a).$$ Applying it here results in $$(-1)^x=\exp(x\ln(-1)).$$ But now, what is $$\ln(-1)$$? The natural logarithm is only defined on positive real numbers. --Lambiam 07:56, 2 August 2023 (UTC)
 * @Lambiam The natural logarithm of minus one is pi multiplied by an imaginary unit. But keep in mind that it is not defined on real numbers system (or in other words, only defined on complex number systems like the square root of negative numbers). Also, $$i^x = (-1)^{x/2}$$ since doing repeated multiplications of negative one by itself is periodic, just 2 times faster than repeatedly multiplying an imaginary unit by itself. 2001:448A:3070:D945:9116:3C5C:80F7:837F (talk) 10:18, 2 August 2023 (UTC)
 * To get there, you have to move to the complex logarithm, using $$a^b=\exp(b\log a).$$ Then the problem is which branch to choose. Taking $$\log(-1)$$ to be the principal value, we find $$\operatorname{Log}(-1)=i\pi,$$ which corresponds to WolframAlpha's choice. There is, however, nothing "natural" about this choice. For computing a Fast Fourier transform, one can compute the values of $$c_k=\exp(2i\pi k/N)$$ by using $$c_0=1,c_{k{+}1}=rc_k$$ where $$r=\cos(2i\pi/N)+i\sin(2i\pi/N)$$ is precomputed, so there is no need to do exponentiation operations. --Lambiam 11:27, 2 August 2023 (UTC)
 * Thanks for your explanation. Also, for the sliding DFT, fiddles (used at the comb stage) and twiddles (used at resonator stage) can be precalculated with $$\left(-1 \right)^{2xk}$$ and $$\left(-1 \right)^{2xk/N}$$ respectively where the former is necessary for real-time constant-Q transform and detecting a single tone like Goertzel algorithm does. 2001:448A:3070:D945:9116:3C5C:80F7:837F (talk) 07:18, 4 August 2023 (UTC)