Skip to main content
Engineering LibreTexts

2.7: Numerical Experiment (Approximating e^jθ)

  • Page ID
    10097
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    We have demonstrated that the function \(e^{jθ}\) has two representations:

    1. \(e^{jθ}=\lim_{n→∞}(1+\frac {jθ} n)^n\) ; and
    2. \(e^{jθ}=\lim_{n→∞}∑_{k=0}^n\frac {(jθ)^k} {k!}\)

    In this experiment, you will write a MATLAB program to evaluate the two functions \(f_n\) and \(S_n\) for twenty values of n:

    1. \(f_n=(1+\frac {jθ} n)^n,\;n=1,2,...,20\) ; and
    2. \(S_n=∑^n_{k=0}\frac {(jθ)^k} {k!},\;n=1,2,...,20k\)

    Choose \(θ=π/4(=\mathrm{pi}/4)\). Use an implicit for loop to draw and plot a circle of radius 1. Then use an implicit for loop to compute and plot \(f_n\) and an explicit for loop to compute and plot \(S_n\) for n=1,2,...,100. You should observe plots like those illustrated in the Figure. Interpret them.

    ConvergencePlots.PNG
    Plots for Convergence;(a) of fn, and (b) of Sn

    This page titled 2.7: Numerical Experiment (Approximating e^jθ) is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Louis Scharf (OpenStax CNX) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.