diff --git a/PCP_07_exp.html b/PCP_07_exp.html index 62adcea..33e184b 100644 --- a/PCP_07_exp.html +++ b/PCP_07_exp.html @@ -13116,7 +13116,6 @@

Unit 7: Exponential Function

Overview and Learning Objectives

-
    

The exponential function is one of the most important functions in mathematics. In everyday life, we encounter this function when a phenomenon (e.g., the spread of a viral infection) can be modeled by an initial value and a growth rate. The exponential function has several remarkable mathematical properties, which lead to different ways on how to approach and define this concept. In this unit, we introduce the exponential function by its power series. This definition allows for expanding the definition of a real (defined for real numbers in $\mathbb{R}$) to a complex exponential function (defined for complex numbers in $\mathbb{C}$). The complex version of the exponential function will play a central role for defining and understanding the Fourier transform covered in Unit 9. We will then go through important properties such as the exponentiation identity and Euler's Formula, which sheds a different, more natural light on the trigonometric identities of the sine and the cosine functions. Furthermore, we discuss the exponential function from the perspective of differential equations. This also leads to numerical methods for approximating the exponential function's values (methods that are much more efficient than using the power series). Finally, we introduce the notion of roots of unity, which are the roots of a specific polynomial (being of the form $z^N-1$ for some $N\in\mathbb{N}$) and can be expressed in terms of the exponential function. These roots of unity are the building blocks of the discrete Fourier transform (DFT) and the FFT algorithm—topics we cover in Unit 9. While discussing the exponential function, another goal of this unit is to further deepen your skills in Python programming by applying the concepts learned in previous units. In Exercise 1 we ask you to implement and compare two algorithms to approximate the exponential function for some given argument. Then, in Exercise 2, you will write a Python program to compute and plot the Gaussian function given the exponential function. Finally, you will apply in Exercise 3 the exponential function to create spirals with different properties, which will deepen your understanding of the relationship between the complex exponential function and angles.

@@ -13138,7 +13137,7 @@

Power Series
@@ -13205,7 +13194,7 @@

Exponentiation Identity and

-
In [2]:
+
In [ ]:
from matplotlib import ticker 
@@ -13243,24 +13232,6 @@ 

Exponentiation Identity and

-
-
-
-
-
-
/tmp/ipykernel_114157/1914264468.py:4: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
-  cmap = plt.cm.get_cmap('hsv') # hsv is nice because it defines a circular color map
-
-
-
-
-
-
-No description has been provided for this image -
-
-
-
@@ -13296,7 +13267,7 @@

Differential Equations
-
In [3]:
+
In [ ]:
@@ -13382,7 +13343,7 @@

Roots of Unity
-
In [4]:
+
In [ ]:
@@ -13465,7 +13416,7 @@

Exercises and Results
-
In [5]:
+
In [ ]:
import libpcp.exp
@@ -13488,7 +13439,7 @@ 

Exercises and Results
-
In [6]:
+
In [ ]:
#<solution>
@@ -13501,7 +13452,7 @@ 

Exercises and Results
-
In [7]:
+
In [ ]:
-
-
-
-
-
-
Input argument z = 1
-N =   1, Numpy = 2.7182818285, Approx1 = 2.0000000000, Approx2 = 2.0000000000
-N =   2, Numpy = 2.7182818285, Approx1 = 2.5000000000, Approx2 = 2.2500000000
-N =   4, Numpy = 2.7182818285, Approx1 = 2.7083333333, Approx2 = 2.4414062500
-N =   8, Numpy = 2.7182818285, Approx1 = 2.7182787698, Approx2 = 2.5657845140
-N =  16, Numpy = 2.7182818285, Approx1 = 2.7182818285, Approx2 = 2.6379284974
-N =  32, Numpy = 2.7182818285, Approx1 = 2.7182818285, Approx2 = 2.6769901294
-Input argument z = (2.0, 0.7)
-N =   1, Numpy = (5.651462, 4.760161), Approx1 = (3.000000, 0.700000), Approx2 = (3.000000, 0.700000)
-N =   2, Numpy = (5.651462, 4.760161), Approx1 = (4.755000, 2.100000), Approx2 = (3.877500, 1.400000)
-N =   4, Numpy = (5.651462, 4.760161), Approx1 = (5.785004, 4.261833), Approx2 = (4.650000, 2.330344)
-N =   8, Numpy = (5.651462, 4.760161), Approx1 = (5.654404, 4.760077), Approx2 = (5.152687, 3.223932)
-N =  16, Numpy = (5.651462, 4.760161), Approx1 = (5.651462, 4.760161), Approx2 = (5.415734, 3.881969)
-N =  32, Numpy = (5.651462, 4.760161), Approx1 = (5.651462, 4.760161), Approx2 = (5.540143, 4.288473)
-N =  64, Numpy = (5.651462, 4.760161), Approx1 = (5.651462, 4.760161), Approx2 = (5.597987, 4.515429)
-N = 128, Numpy = (5.651462, 4.760161), Approx1 = (5.651462, 4.760161), Approx2 = (5.625352, 4.635473)
-N = 256, Numpy = (5.651462, 4.760161), Approx1 = (5.651462, 4.760161), Approx2 = (5.638575, 4.697223)
-N = 512, Numpy = (5.651462, 4.760161), Approx1 = (5.651462, 4.760161), Approx2 = (5.645062, 4.728542)
-
-
-
-
-
@@ -13556,7 +13479,7 @@

Exercises and Results
-
In [8]:
+
In [ ]:
#<solution>
@@ -13569,7 +13492,7 @@ 

Exercises and Results
-
In [9]:
+
In [ ]:
@@ -13609,7 +13522,7 @@

Exercises and Results
-
In [10]:
+
In [ ]:
#<solution>
@@ -13622,7 +13535,7 @@ 

Exercises and Results
-
In [11]:
+
In [ ]:
diff --git a/PCP_07_exp.ipynb b/PCP_07_exp.ipynb index 62438cb..b76fd42 100644 --- a/PCP_07_exp.ipynb +++ b/PCP_07_exp.ipynb @@ -34,7 +34,7 @@ " \n", "
\n", "

Overview and Learning Objectives

\n", - " \n", + "\n", "The exponential function is one of the most important functions in mathematics. In everyday life, we encounter this function when a phenomenon (e.g., the spread of a viral infection) can be modeled by an initial value and a growth rate. The exponential function has several remarkable mathematical properties, which lead to different ways on how to approach and define this concept. In this unit, we introduce the exponential function by its power series. This definition allows for expanding the definition of a real (defined for real numbers in $\\mathbb{R}$) to a complex exponential function (defined for complex numbers in $\\mathbb{C}$). The complex version of the exponential function will play a central role for defining and understanding the Fourier transform covered in Unit 9. We will then go through important properties such as the exponentiation identity and Euler's Formula, which sheds a different, more natural light on the trigonometric identities of the sine and the cosine functions. Furthermore, we discuss the exponential function from the perspective of differential equations. This also leads to numerical methods for approximating the exponential function's values (methods that are much more efficient than using the power series). Finally, we introduce the notion of roots of unity, which are the roots of a specific polynomial (being of the form $z^N-1$ for some $N\\in\\mathbb{N}$) and can be expressed in terms of the exponential function. These roots of unity are the building blocks of the discrete Fourier transform (DFT) and the FFT algorithm—topics we cover in Unit 9. While discussing the exponential function, another goal of this unit is to further deepen your skills in Python programming by applying the concepts learned in previous units. In Exercise 1 we ask you to implement and compare two algorithms to approximate the exponential function for some given argument. Then, in Exercise 2, you will write a Python program to compute and plot the Gaussian function given the exponential function. Finally, you will apply in Exercise 3 the exponential function to create spirals with different properties, which will deepen your understanding of the relationship between the complex exponential function and angles. \n", " \n", "
" @@ -496,7 +496,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.17" + "version": "3.7.13" } }, "nbformat": 4,