Partial Derivatives and Plane Tangents 14.3, 14.4ΒΆ
The following notebook will take the user through five points, showing examples of how to use Python to graph functions of two variables and communicate ideas. It will also familarize the reader with some basic LaTeX syntax.ΒΆ
How to plot 2D plots and 3D surfaces + curves in Python with numpy and matplotlib
Parametric derivatives, visually
Partial derivatives and Tangent Planes
1. Basic Plots in 2D and 3D using matplotlibΒΆ
Basic Functions in matplotlib for 2D plotsΒΆ
But what does drawing parametric curves look like? We can loop through the array.ΒΆ
2. Parametric DerivativesΒΆ
3. Partial DerivativesΒΆ
To show partial derivatives of functions of two variables, we will first see the trace of surfaces, a technique we can use to draw them by hand. Then we will show the idea of partial derivatives and what they might mean graphically. We will use the curves below as examples.
For the changing values of Y, we have different values of Z and X. We can draw a few of these curves and connect them to draw 3D surfaces by hand. For example, we can take y = -4, y = -2, y = 0, y = 2, y = 4, and connect these in a parabolic manner after keeping x constant. It might further help to realize that these are this is where the surface intersects 2D planes. Visualized below are some other surfaces.
Contour or Level Curves (Traces with z = k, k = constant)ΒΆ
Contour curves are a little more interesting to look at.
Note the real contour graph below, the usual way it would be drawn
<matplotlib.contour.QuadContourSet at 0x7faf1c6541c0>
<matplotlib.contour.QuadContourSet at 0x7faee9ed9550>