# Visualizing Euler's Formula

Posted 10 months ago
860 Views
|
6 Replies
|
2 Total Likes
|
 A previous post caused me to think about how to visualize Euler's Formula Exp[ i Pi ] = -1. I use a (slowly) converging series for Pi.  t[n_] = (4 (-1)^n)/(2 n + 1); Sum[t[n], {n, 0, \[Infinity]}] - \[Pi] 0 Calculating the exponent of i times the sum of the series for an increasing number of terms gives me a plot which converges toward -1 se = {Re[#], Im[#]} & /@ Table[Exp[I Sum[t[n], {n, 0, m}]], {m, 0, 1000}]; ListPlot[se, Joined -> True] 
6 Replies
Sort By:
Posted 10 months ago
Posted 10 months ago
 Great!!!My try: t[n_] := (4 (-1)^n)/(2 n + 1); f[m_] := ReIm[Exp[I Sum[t[n], {n, 0, m}]]]; ParametricPlot[Evaluate[f[m]], {m, 0, 50}, PlotRange -> Full] 
Posted 10 months ago
 I don't understand how ParametricPlot can work for a function which only evaluates for integer arguments. When I look at the entire plot using PlotRange -> All I get
Posted 10 months ago
 Hello FrankI checked and it works fine on MMA 10.2(11.2) version.I don't know how ParametricPlot can work, maybe one of the WRI/SE jedi can join the party to provide even more insights on this.Regards Mariusz.
 Evaluating f generates a continuous function, which is why ParametricPlot can do a plot. In[12]:= Evaluate[f[x]] Out[12]= {Re[E^(I (\[Pi] + 2 (-1)^x LerchPhi[-1, 1, 3/2 + x]))], Im[E^(I (\[Pi] + 2 (-1)^x LerchPhi[-1, 1, 3/2 + x]))]} Our plots agree for integer arguments of f
 One can also do the series of expansion of e^(i pi) ListPlot[Table[ReIm[Sum[(I \[Pi])^n/n!, {n, 0, m}]], {m, 0, 10}], Joined -> True] or a ParametricPlot of the evaluated form ParametricPlot[ Evaluate[ReIm[Sum[(I \[Pi])^n/n!, {n, 0, m}]]], {m, 0, 20}, PlotRange -> All]