Replacing "e" in Euler's formula with another number Does Euler's formula remain valid if we use any real number other than the constant $e$?   For example replacing $e$ with 5 would make the formula look like this:  $5^{it}$. 

I tried this idea in Matlab and replaced $e$ with few other real numbers (eg 1.5, 10, 2.1) and each time the plot was still showing what seemed like cosine and sine waves. The frequency of the cos and sin was changing depending on the base.

Here's roughly my approach:

w = freq * 2 * pi;
t = 0:0.001:1000 ;

a = real( number ^ (i*wt) ) ; % cos in Euler's formula
b = imag( number ^ (i*wt) ) ; % sin in Euler's formula
Say you're interested in $$M^{j2\pi f_0 t}. \tag{1}$$ Note that $$M = e^{\log M},$$ so $(1)$ can be written as

\begin{align}
M^{j2\pi f_0 t} &amp;= \left( e^{\log M} \right) ^ {j2\pi f_0 t} \\
&amp;= e^{j2\pi (f_0\log M) t} \\
&amp;= \cos(2\pi (f_0\log M) t) + j \sin(2\pi (f_0\log M) t),
\end{align}
which is a complex sinusoid with frequency $f_0 \log M$. That is why using $M$ instead of $e$ results in a change in frequency.