# Visualizing Euler's Formula

GROUPS:
 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] 
12 days ago
6 Replies
 Frank Kampas 1 Vote
12 days ago
 Mariusz Iwaniuk 1 Vote 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] 
12 days 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
 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]