Calculus 1, Lectures 18B through 20B
In some ways, multivariable calculus seems like a minor extension of single-variable calculus ideas and techniques. In other ways, it’s definitely a major step up in difficulty.
This post will mainly be an introduction to multivariable calculus. However, since it is in the context of my series of posts on my Fall 2019 Calculus 1 lectures, it will, as usual, be interspersed with other topics.
In recent posts, I’ve been focusing on the foundations of single-variable calculus. In “Limit Definition, Continuity, and Derivatives”, I emphasize how the idea of a limit underlies the derivative. I expand on this in the next post, “Differentiable Functions and Local Linearity”, while I also emphasize important geometric perspectives. Finally, in the most recent post, “Infinitesimal Calculus and Calculus Rules”, I focus on both conceptual ideas and practical tools for computation.
As already stated, this post is mainly an introduction to multivariable calculus. Once again, I will focus mostly on conceptual ideas and practical tools for computation. However, I will also emphasize some applications.
Lecture 18B: Antiderivatives and an Introduction to Multivariable Calculus via a Physics Example
After I briefly review derivatives of logarithmic functions from Lecture 18A, I start the main part of Lecture 18B with an introduction to antiderivatives.
The basic idea of an antiderivative is pretty simple. For example, we know that is the derivative of (and we write ). Therefore, we say that is an antiderivative of .
But this is not the only antiderivative of the function . The function is as well. And so are all functions of the form , where is any constant.
Consider another example. We know that is the derivative of any function of the form (and we write ). Therefore, any function of the form is an antiderivative of the function .
Leibniz Notation and Operators
Using notation introduced by Gottfried Wilhelm Leibniz, we write these truths as: 1) , so , and 2) , so .
The symbol is called the derivative operator. It takes a differentiable function of as input and returns its derivative as output.
We have seen that the symbol can represent an infinitesimal quantity. However, that is not how we are treating it here. Here it just emphasizes that the variable to differentiate with respect to is .
On the other hand, the symbol is called the (indefinite) integral operator. It takes a “sufficiently nice” function as input and returns the collection of all its (infinitely many) antiderivatives as output.
Once again, at the moment, the symbol just emphasizes that the variable to integrate with respect to is .
For more indefinite integral examples, we can also write the following: 1) when , 2) , 3) when , and 4) when .
Introduction to Multivariable Calculus via a Mass on a Spring (Harmonic Oscillator)
Continuing in Lecture 18B, I then introduce multivariable calculus through a physics example. Suppose a block of wood with mass kg is attached to a spring with “spring constant” (which respresents the “strength” of the spring). Suppose the mass is displaced from equilibrium (where it is “at rest”) and allowed to oscillate because of the restoring force of the spring. For small oscillations when there is little to no friction, the period (time for one completion oscillation) is approximately .
This fact can be confirmed empirically (via experiments) and theoretically (via physics principles and differential equations).
The standard unit for is (unit of force per unit length). Since the standard unit of force, the Newton, is the same as (recall from Newton’s Second Law that ), it follows that the standard unit for is (think about this!). Therefore, the standard unit for is seconds. The period truly is an amount of time.
This is a Multivariable (Real-Valued) Function (of Two Independent Variables)…a.k.a. a “Scalar Field”
It is not standard to view the equation as defining a function. Why not? Because we might typically have just a single mass and a single spring at our disposal. There is no need to view it as a function in such a situation. In that case, it is just an equation for a “single use”.
However, from a mathematical point of view, it is certainly more interesting to imagine that we have many masses and springs at our disposal — maybe even infinitely many — what fun! — Infinity is Really Big! If so, then we can think of and as defining two independent variables. We can think of the equation as defining a real-valued function of two variables.
This is also sometimes called a scalar field — in this case, the scalar field has a domain which is the set of all points , where and . The period represents the single dependent variable in this situation.
In fact, it is often helpful to emphasize this with function notation. Let be the function of two independent variables and that is defined by the formula .
Then, for example, . This means that if the block of wood has mass kg and the spring constant is , then we can expect an oscillation with period seconds. The spring is relatively “weak” compared to the “large” size of the mass. This results in a very slow oscillation.
The Graph of Such a Multivariable Calculus Function
Recall how a graph of an “ordinary” function of one variable is made. For each input in the domain of a function , the corresponding output value is found, and the point is plotted. As a set of points, the graph is described with set-builder notation as , where represents two-dimensional (real Euclidean) space. The plotting is made using a rectangular coordinate system on the two-dimensional -plane .
But how do we graph the multivariable calculus function at hand? The two independent variables and are thought of as determining the ordered pair . This is thought of as a point in a rectangular coordinate plane. And, in this case, it varies over the set of such points where and .
For each such input point, there is an output number . Hence, the graph should be the set of all points in three-dimensional Euclidean space where . In set-builder notation, this is .
Since , it follows that, for example, the point is on the graph of .
Using Technology
Such a graph is very cumbersome to draw by hand. Many points must be plotted and then “connected” with a surface. It is best to leave it to a software program, such as Mathematica.
The figure below shows two viewpoints of the graph of , drawn with Mathematica.
In both cases, there are three coordinate axes. The letters label sides of each box which are parallel to the respective axes. For instance, in the picture on the left, the positive -axis goes to the right and the positive -axis goes into the screen. For the picture on the right, the positive -axis comes toward the viewer and slightly to the left while the positive -axis goes to the right.
From both of these pictures we can see that increases as increases and decreases as increases. This also makes sense if you think about the formula.
We can also strive to understand this graph by “slicing” it with planes parallel to the various two-dimensional coordinate planes in the picture: 1) the horizontal -plane (where ), 2) the vertical -plane (where ), and 3) the vertical -plane (where ).
Slicing Parallel to the Vertical Coordinate Planes
When we slice this graph with a plane parallel to the vertical -plane, we are looking at the points of intersection of the system of equations and , for various constants. If we define infinitely-many single variable functions (a “family of functions”) by the formula , then this is equivalent to studying the graphs of as the constant changes.
On the other hand, if we slice the graph with a plane parallel to the vertical -plane, we are looking at the points of intersection of the system of equations and , for various constants. The corresponding infinite family of single variable functions is , defined by .
A few visuals will help to clarify this. In the first visual, we see more clearly that increases as increases (no matter what is).
And here’s a corresponding visual where we slice parallel to the -plane (for infinitely many values of ). This results in graphs of the family of functions defined by . Here we see more clearly that decreases as increases (no matter what is).
Slicing Parallel to the Horizontal Coordinate Plane
If , then the equation defines a curve in the -plane that changes as changes. For our example, . This equation can be solved, for instance, for as a function of .
Doing so gives the family of functions . This is actually a family of linear functions of , and the graphs are straight lines. Since the slope of is , the slope decreases as increases.
Here is the visual:
Analyzing a Multivariable Function with Partial Derivatives
Ordinary derivatives are used to analyze functions of one variable . The derivative represents the instantaneous rate of change of at the point .
It is the slope of the tangent line to the graph of at the point . In other words, the equation of the tangent line to the graph of at is .
For a function of two variables , we can differentiate either with respect to or with respect to . If we differentiate with respect to , then we treat as constant. If we differentiate with respect to , then we treat as constant. In either case, we are finding a rate of change of with respect to the appropriate variable.
The notation differs a bit, but the idea is basically the same. The symbols both represent the derivative of with respect to . And the symbols both represent the derivative of with respect to . The symbol can be thought of as a “fancy” letter .
To be a bit more technical, when differentiating with respect to at some point , we are really finding . On the other hand, when differentiating with respect to at some point , we are really finding . In both cases, this can therefore be interpreted as a slope of a tangent line.
Computing and Interpreting Partial Derivatives for the Period
Recall that . Therefore, and .
Since at all points, this confirms that increases as increases. Since at all points, this confirms that decreases as increases.
Of course, we can also make more quantitative predictions. Recall that seconds. Next, note that seconds per kg. Therefore, we would estimate, for example, that seconds.
In fact, seconds, so the linear approximation is pretty good.
Lectures 19A and 19B: More Derivatives and a Continuing Introduction to Multivariable Calculus
In Lecture 19A, I start by introducing a topic related to Newton’s Method (I discussed this previously in “Infinitesimal Calculus and Calculus Rules”). That topic is iteration of functions. This is a fundamental part of the vast subject of dynamical systems.
Iteration of functions is where functions of the form get applied (used) over and over. Given a seed (initial condition) , we can generate a sequence , , , etc.
Many interesting and unexpected things can happen in this situation. A very interesting graph, called a cobweb plot, can also be made to help us understand what is going on visually. The idea of a fixed point is fundamental to this understanding as well.
Derivatives of Inverse Functions
From there, I move on to deriving the derivatives of inverse sine (arcsine), inverse cosine (arccosine), and the derivatives of inverse functions in general.
Assuming the differentiability of an inverse function, such a derivation is based on the Chain Rule. We know that for all in the domain of . Therefore, we can use the Chain Rule to differentiate both sides of this equation to get . Assuming , it follows that
Sometimes we can use this formula even when the formula for cannot be found very easily, if at all. For example, if , then the formula for is not very easy to find. However, based on the facts that and , we can say that and
.
A Few More Fundamental Antiderivatives
I end Lecture 19A by mentioning a few new antiderivatives and emphasizing that they should be memorized.
Besides the ones mentioned above, the antiderivatives (indefinite integrals) mentioned include: 1) , 2) , and 3) .
Lecture 19B
I start Lecture 19B by mentioning that, since , it follows that we can write as well.
Geometrically, this also makes sense because the graph of is a vertical translation of the graph of . In fact, .
From there, I review my introduction to multivariable calculus. I describe slices of the graph of the multivariable function (see above) before moving on to a new multivariable function example.
Compound Interest as Part of an Introduction to Multivariable Calculus
The new example involves the compound interest formula . In this formula, is the final amount accrued in a bank account, is the principal (deposit) into the bank account, is the “nominal” annual interest rate, compounded times per year, and is the number of years.
This can be thought of as a function of four independent variables! We can write !
The graph is not so easy to visualize, but it can still be defined as . Technically-speaking, this is a 4-dimensional “hypersurface” sitting inside 5-dimensional “space” .
Understanding this Function
Can such a thing be understood? Yes! We can still graph “slices” of it. Moreover, we can still find partial derivatives and interpret them as slopes of the “slices”.
Furthermore, even though is technically a “discrete” variable, we can “pretend” it is “continuous” for the purpose of making use of calculus.
Here is an animation of the graphs of the family of functions as varies (setting dollars and years). These graphs represent “slices” of the high-dimensional graph of for , , and , as the constant value of increases from to .
We can also compute the partial derivative and use it to estimate how changes for small changes in .
Using Logarithmic Differentiation to Find the Partial Derivative
To do this, it is helpful to take the natural logarithm of the function first, because the variable appears in both the base and the exponent. This is an example of logarithmic differentiation (I show this in video Lecture 20B further below).
Based on the equation , we can write , where the last equality follows from properties of logarithms.
Now differentiate both sides of this equation with respect to , keeping in mind that depends on . We can also describe this step as “apply the operator”.
Doing this gives, by the Chain Rule and Product Rule, .
After multiplying both sides by , we can write our final answer as .
If we then plug in, for example, , , , and into this, we get dollars per number of compounding periods per year.
Since dollars and dollars, for an increase of dollars, we can see that the linear approximation is not too far off in approximating what happens as increases from 4 to 5 times per year.
Limiting Values
As the graphs above seem to imply, this function also has limiting values as (for various fixed , and ). In fact, it turns out that as .
The final topic of Lecture 19B is implicit curves and implicit differentiation. I will discuss that topic in the next section below.
Lectures 20A and 20B: Practice with Derivatives and Antiderivatives and Implicit Differentiation
In Lecture 20A, I start by talking about how to get better at math. This does include an emphasis on remembering facts, even though memorization is often ridiculed as “rote” learning. My point is this: a person can’t be expected to do “high-order” learning and problem-solving unless they have some basic facts in his or her brain. These facts form the foundation for more advanced skills. You can’t have one without the other.
After that, I work through some practice problems for derivatives and antiderivatives. This includes the fact that (so ). It also includes the fact that, as long as , . Therefore, , as long as .
The reason this works is as follows: if , then (which is actually a positive number). In that case, by the Chain Rule, .
Lecture 20B: More on Logarithmic Differentiation and Implicit Differentiation (the Second Topic is Also Important for Multivariable Calculus)
The last video to summarize for this post is Lecture 20B. I start that lecture by emphasizing how powerful these derivative rules and techniques are. We can figure them out without using limits! I then use logarithmic differentiation on the compound interest example from above.
Next, I do a simpler example. I differentiate with logarithmic differentiation. The answer turns out to be . You should take the time to check this!
After mentioning some linear approximation examples worth memorizing, I then launch into the final topic of Lecture 20B, as well as the final topic of this blog post: implicit differentiation. This is also related to any good introduction to multivariable calculus, though I don’t have the time to emphasize that point in the lecture.
Implicit Differentiation and Multivariable Calculus
Suppose we want to understand the graph of the multivariable function . As before, we can start by looking at the 2-dimensional graph of this function (a surface) sitting inside 3-dimensional space .
The following two graphs of this function are from the same viewpoint. However, the one on the right is more “zoomed in” to see the most interesting features of the graph more clearly.
The graph on the left seems to indicate that, as increases, “generally-speaking”, will increase as well. However, there are exceptions. If and are both near zero, the graph on the right makes it clear that can decrease as increases as well.
Slicing the Graph
As before, we can slice this graph in various ways. Let’s slice it with planes parallel to the -plane, where . These give the “level curves” of this function. An animation of this is shown below.
Notice that, for each value , the blue graph on the right is not the graph of a single function of . Each such graph fails the vertical line test.
However, if we “cut” these blue graphs “in half” along the -axis, each resulting piece is a function of . In fact, since , for any fixed , these functions are .
Ordinary Differentiation versus Implicit Differentiation
We can find slopes of tangent lines to these graphs in a couple different ways. Since we were able to solve for as two functions of , we can differentiate one or the other of these functions as needed. For example, if , we can differentiate the function at to find the slope of the graph of the lower function at the point .
The derivative is . Plugging in gives .
Implicit Differentiation
With implicit differentiation, there is no need to solve the original equation for as a function of (for fixed ). Just assume depends on and differentiate, using the Chain Rule.
Doing this gives . Now algebraically solve this for to get .
Finally, we want the slope of the (tangent line to the) curve at the point , so plug this point into the derivative. Doing so gives .
We get the same answer either way!
In either case, we see that the equation of the tangent line to this point is . This can help us to approximate points on the curve if we needed to. For example, when , the linear approximation gives . The point is approximately on the curve. See the figure below.
Benefits of Implicit Differentiation
What are the benefits of implicit differentiation? The main benefit is that it can be done even when the original equation cannot be solved for as a function of .
An example of this is the equation . We cannot solve for as a function of here, but we can solve for the derivative as a function of both and .
Assuming depends on , along with the Chain Rule and Product Rule, give . Algebraically solving this for gives (check this!).
This can then give us slopes of tangent lines to the graph of (assuming we know points on this graph). Part of the graph itself is shown below. A point on the graph is . The slope of the tangent line there is approximately .
Because of this, the equation of the tangent line at this point is approximately . If , for example, this would imply that and the point is approximately on the blue graph.