Introduction to Multivariable Calculus

Calculus 1, Lectures 18B through 20B

In an introduction to multivariable calculus, the graph of a function of more than one variable should be sliced to help you understand it and its partial derivatives.
The graph of a multivariable function can be sliced to help you understand it and its partial derivatives.

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.

Calculus 1, Lecture 18B: Antiderivatives, Introduction to Multivariable Calculus (Partial Derivatives: Period & Frequency of a Mass on Spring)

The basic idea of an antiderivative is pretty simple. For example, we know that f(x)=2x is the derivative of F(x)=x^{2} (and we write f(x)=F'(x)). Therefore, we say that F(x)=x^{2} is an antiderivative of f(x)=2x.

But this is not the only antiderivative of the function f(x)=2x. The function F(x)=x^{2}+4 is as well. And so are all functions of the form F(x)=x^{2}+C, where C is any constant.

Consider another example. We know thatf(x)=\cos(x) is the derivative of any function of the form F(x)=\sin(x)+C (and we write f(x)=F'(x)). Therefore, any function of the form F(x)=\sin(x)+C is an antiderivative of the function f(x)=\cos(x).

Leibniz Notation and Operators

Using notation introduced by Gottfried Wilhelm Leibniz, we write these truths as: 1) \frac{d}{dx}\left(x^{2}+C\right)=2x, so \displaystyle\int 2x\, dx=x^{2}+C, and 2) \frac{d}{dx}\left(\sin(x)+C\right)=\cos(x), so \displaystyle\int \cos(x)\, dx=\sin(x)+C.

The symbol \frac{d}{dx} is called the derivative operator. It takes a differentiable function of x as input and returns its derivative as output.

We have seen that the symbol dx 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 x.

On the other hand, the symbol \int 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 dx just emphasizes that the variable to integrate with respect to is x.

For more indefinite integral examples, we can also write the following: 1) \displaystyle\int x^{n}\, dx=\frac{1}{n+1}x^{n+1}+C when n\not=-1, 2) \displaystyle\int\sin(x)\, dx=-\cos(x)+C, 3) \displaystyle\int e^{kx}\, dx=\frac{1}{k}e^{kx}+C when k\not=0, and 4) \displaystyle\int\frac{1}{x}\, dx=\ln(x)+C when x>0.

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 m kg is attached to a spring with “spring constant” k (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 T=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2}.

This fact can be confirmed empirically (via experiments) and theoretically (via physics principles and differential equations).

The standard unit for k is \frac{\mbox{Newtons}}{\mbox{meter}} (unit of force per unit length). Since the standard unit of force, the Newton, is the same as \frac{\mbox{kg}\cdot \mbox{meter}}{\mbox{sec}^{2}} (recall from Newton’s Second Law that F=ma), it follows that the standard unit for \frac{m}{k} is \mbox{sec}^{2} (think about this!). Therefore, the standard unit for T=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2} 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 T=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2} 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 m and k as defining two independent variables. We can think of the equation T=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2} 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 (m,k), where m>0 and k>0. The period T represents the single dependent variable in this situation.

In fact, it is often helpful to emphasize this with function notation. Let f be the function of two independent variables m and k that is defined by the formula T=f(m,k)=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2}.

Then, for example, f(9,4)=2\pi\sqrt{\frac{9}{4}}=2\pi\cdot \frac{3}{2}=3\pi. This means that if the block of wood has mass m=9 kg and the spring constant is k=4\ \frac{\mbox{Newtons}}{\mbox{meter}}, then we can expect an oscillation with period T=f(9,4)=3\pi\approx 9.42 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 x in the domain of a function f, the corresponding output value y=f(x) is found, and the point (x,y)=(x,f(x)) is plotted. As a set of points, the graph is described with set-builder notation as \{(x,y)\, |\, y=f(x)\}\subseteq {\Bbb R}^{2}, where {\Bbb R}^{2} represents two-dimensional (real Euclidean) space. The plotting is made using a rectangular coordinate system on the two-dimensional xy-plane {\Bbb R}^{2}.

But how do we graph the multivariable calculus function T=f(m,k)=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2} at hand? The two independent variables m and k are thought of as determining the ordered pair (m,k). 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 m>0 and k>0.

For each such input point, there is an output number T=f(m,k). Hence, the graph should be the set of all points (m,k,T) in three-dimensional Euclidean space {\Bbb R}^{3} where T=f(m,k). In set-builder notation, this is \{(m,k,T)\, |\, T=f(m,k)\}\subseteq {\Bbb R}^{3}.

Since f(9,4)=2\pi\sqrt{\frac{9}{4}}=2\pi\cdot \frac{3}{2}=3\pi, it follows that, for example, the point (m,k,T)=(9,4,3\pi)\approx (9, 4, 9.42) is on the graph of f.

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 T=f(m,k)=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2}, 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 m-axis goes to the right and the positive k-axis goes into the screen. For the picture on the right, the positive m-axis comes toward the viewer and slightly to the left while the positive k-axis goes to the right.

Two views of the graph of T=f(m,k)=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2}.

From both of these pictures we can see that T increases as m increases and T decreases as k 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 mk-plane (where T=0), 2) the vertical mT-plane (where k=0), and 3) the vertical kT-plane (where m=0).

Slicing Parallel to the Vertical Coordinate Planes

When we slice this graph with a plane parallel to the vertical mT-plane, we are looking at the points of intersection of the system of equations T=f(m,k) and k=constant, for various constants. If we define infinitely-many single variable functions f_{k}(m) (a “family of functions”) by the formula f_{k}(m)=f(m,k), then this is equivalent to studying the graphs of f_{k} as the constant k changes.

On the other hand, if we slice the graph with a plane parallel to the vertical kT-plane, we are looking at the points of intersection of the system of equations T=f(m,k) and m=constant, for various constants. The corresponding infinite family of single variable functions is f_{m}(k), defined by f_{m}(k)=f(m,k).

A few visuals will help to clarify this. In the first visual, we see more clearly that T increases as m increases (no matter what k is).

In any introduction to multivariable calculus it is helpful to think about slicing graphs in three-dimensional space with vertical and horizontal planes.
Slicing the graph of T=f(k,m) for with infinitely many planes where k=constant in three-dimensional space is equivalent to graphing the family of functions T=f_{k}(m)=f(m,k) for infinitely many constant values of k in two-dimensional space.

And here’s a corresponding visual where we slice parallel to the kT-plane (for infinitely many values of m=constant). This results in graphs of the family of functions f_{m}(k) defined by f_{m}(k)=f(m,k). Here we see more clearly that T decreases as k increases (no matter what m is).

Slice the graph of a function of two variables with a vertical plane.
Slicing the graph of T=f(k,m) for with infinitely many planes where m=constant in three-dimensional space is equivalent to graphing the family of functions T=f_{m}(k)=f(m,k) for infinitely many constant values of m in two-dimensional space.
Slicing Parallel to the Horizontal Coordinate Plane

If T=constant, then the equation T=f(m,k) defines a curve in the mk-plane that changes as T changes. For our example, T=f(m,k)=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2}. This equation can be solved, for instance, for k as a function of m.

Doing so gives the family of functions k=g_{T}(m)=\left(\frac{2\pi m^{1/2}}{T}\right)^{2}=\frac{4\pi^{2}}{T^{2}}m. This is actually a family of linear functions of m, and the graphs are straight lines. Since the slope of is \frac{4\pi^{2}}{T^{2}}, the slope decreases as T increases.

Here is the visual:

Level curves generate a contour map of a function of two variables in multivariable calculus.
Slicing the graph of T=f(k,m) for with infinitely many planes where T=constant in three-dimensional space is equivalent to graphing the family of curves T=f(m,k) for infinitely many constant values of T in two-dimensional space.

Analyzing a Multivariable Function with Partial Derivatives

Ordinary derivatives are used to analyze functions of one variable y=f(x). The derivative \frac{dy}{dx}\Bigr\rvert_{x=a}=f'(a) represents the instantaneous rate of change of y=f(x) at the point (a,f(a)).

It is the slope of the tangent line to the graph of f at the point (a,f(a)). In other words, the equation of the tangent line to the graph of f at (a,f(a)) is y=f(a)+f'(a)(x-a).

For a function of two variables T=f(m,k), we can differentiate either with respect to m or with respect to k. If we differentiate with respect to m, then we treat k as constant. If we differentiate with respect to k, then we treat m as constant. In either case, we are finding a rate of change of T with respect to the appropriate variable.

The notation differs a bit, but the idea is basically the same. The symbols \frac{\partial T}{\partial m}=\frac{\partial f}{\partial m} both represent the derivative of T=f(m,k) with respect to m. And the symbols \frac{\partial T}{\partial k}=\frac{\partial f}{\partial k} both represent the derivative of T=f(m,k) with respect to k. The symbol \partial can be thought of as a “fancy” letter d.

To be a bit more technical, when differentiating T=f(m,k) with respect to m at some point (m,k), we are really finding f_{k}'(m). On the other hand, when differentiating T=f(m,k) with respect to k at some point (m,k), we are really finding f_{m}'(k). 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 T=f(m,k)=2\pi\sqrt{\frac{m}{k}}=2\pi m^{1/2}k^{-1/2}. Therefore, \frac{\partial T}{\partial m}=\frac{\partial f}{\partial m}=\pi m^{-1/2}k^{-1/2}=\frac{\pi}{\sqrt{mk}} and \frac{\partial T}{\partial k}=\frac{\partial f}{\partial k}=-\pi m^{1/2}k^{-3/2}=-\frac{\pi\sqrt{m}}{k\sqrt{k}}=-\pi\sqrt{\frac{m}{k^{3}}}.

Since \frac{\partial T}{\partial m}=\frac{\pi}{\sqrt{mk}}>0 at all points, this confirms that T increases as m increases. Since \frac{\partial T}{\partial k}=-\pi\sqrt{\frac{m}{k^{3}}}<0 at all points, this confirms that T decreases as k increases.

Of course, we can also make more quantitative predictions. Recall that T=f(9,4)=3\pi\approx 9.42 seconds. Next, note that \frac{\partial T}{\partial m}\Bigr\rvert_{(m,k)=(9,4)}=\frac{\pi}{\sqrt{36}}=\frac{\pi}{6}\approx 0.5236 seconds per kg. Therefore, we would estimate, for example, that f(9.1,4)\approx f(9,4)+\left(\frac{\partial T}{\partial m}\Bigr\rvert_{(m,k)=(9,4)}\right)\cdot 0.1=9.42+0.5236\cdot 0.1\approx 9.472 seconds.

In fact, f(9.1,4)=2\pi\cdot  9.1^{1/2}\cdot 4^{-1/2}\approx 9.477 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 y=f(x) get applied (used) over and over. Given a seed (initial condition) x_{0}, we can generate a sequence x_{1}=f(x_{0}), x_{2}=f(x_{1}), x_{3}=f(x_{2}), 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.

Calculus 1, Lecture 19A: Iteration & Fixed Points, Derivatives of Inverse Functions, Antiderivatives

Assuming the differentiability of an inverse function, such a derivation is based on the Chain Rule. We know that f(f^{-1}(x))=x for all x in the domain of f^{-1}. Therefore, we can use the Chain Rule to differentiate both sides of this equation to get f'(f^{-1}(x))\cdot \frac{d}{dx}\left(f^{-1}(x)\right)=1. Assuming f'(f^{-1}(x))\not=0, it follows that

\frac{d}{dx}\left(f^{-1}(x)\right)=\frac{1}{f'(f^{-1}(x))}.

Sometimes we can use this formula even when the formula for f^{-1} cannot be found very easily, if at all. For example, if f(x)=x^{3}+x+1, then the formula for f^{-1}(x) is not very easy to find. However, based on the facts that f(1)=1^{3}+1+1=3 and f'(x)=3x^{2}+1, we can say that f^{-1}(3)=1 and

\frac{d}{dx}\left(f^{-1}(x)\right)\Bigr\rvert_{x=3}=\frac{1}{f'(1)}=\frac{1}{4}.

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) \displaystyle\int \sec^{2}(x)\, dx=\tan(x)+C, 2) \displaystyle\int \frac{1}{1+x^{2}}\, dx=\tan^{-1}(x)+C=\arctan(x)+C, and 3) \displaystyle\int \frac{1}{\sqrt{1-x^{2}}}\, dx=\sin^{-1}(x)+C=\arcsin(x)+C.

Lecture 19B

I start Lecture 19B by mentioning that, since \frac{d}{dx}\left(\cos^{-1}(x)\right)=\frac{d}{dx}(\arccos(x))=-\frac{1}{\sqrt{1-x^{2}}}=-\frac{d}{dx}\left(\sin^{-1}(x)\right)=-\frac{d}{dx}(\arcsin(x)), it follows that we can write \displaystyle\int \frac{1}{\sqrt{1-x^{2}}}\, dx=-\cos^{-1}(x)+C=-\arccos(x)+C as well.

Calculus 1, Lecture 19B: Multivariable Function Graphs, Partial Derivatives, Implicit Differentiation

Geometrically, this also makes sense because the graph of y=-\cos^{-1}(x) is a vertical translation of the graph of y=\sin^{-1}(x). In fact, -\cos^{-1}(x)=\sin^{-1}(x)-\frac{\pi}{2}.

From there, I review my introduction to multivariable calculus. I describe slices of the graph of the multivariable function T=f(m,k)=2\pi\sqrt{\frac{m}{k}} (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 A=P\left(1+\frac{r}{n}\right)^{nt}. In this formula, A is the final amount accrued in a bank account, P is the principal (deposit) into the bank account, r is the “nominal” annual interest rate, compounded n times per year, and t is the number of years.

This can be thought of as a function of four independent variables! We can write A=f(P,r,n,t)=P\left(1+\frac{r}{n}\right)^{nt}!

The graph is not so easy to visualize, but it can still be defined as \{(P,r,n,t,A)\ |\ A=f(P,r,n,t)\}. Technically-speaking, this is a 4-dimensional “hypersurface” sitting inside 5-dimensional “space” {\Bbb R}^{5}.

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 n 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 f_{P,r,t}(n) as r varies (setting P=1000 dollars and t=10 years). These graphs represent “slices” of the high-dimensional graph of A=f(P,r,n,t) for P=1000, t=10, and r=constant, as the constant value of r increases from r=0.01=1\% to r=0.15=15\%.

The compound interest formula gives another nice example of a high-dimensional function for an introduction to multivariable calculus.
The graphs of A=f_{1000,r,10}(n) as r increases from r=0.01=1\% to r=0.15=15\%. We are thinking of n as a continuous variable. In each case, the function is increasing and seems to have a horizontal asymptote. This is indeed true.

We can also compute the partial derivative \frac{\partial A}{\partial n} and use it to estimate how A changes for small changes in n.

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 n 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 A=f(P,r,n,t)=P\left(1+\frac{r}{n}\right)^{nt}, we can write \ln(A)=\ln(f(P,r,n,t))=\ln\left(P\left(1+\frac{r}{n}\right)^{nt}\right)=\ln(P)+nt\ln\left(1+\frac{r}{n}\right), where the last equality follows from properties of logarithms.

Now differentiate both sides of this equation with respect to n, keeping in mind that A depends on n. We can also describe this step as “apply the \frac{\partial}{\partial n} operator”.

Doing this gives, by the Chain Rule and Product Rule, \frac{1}{A}\cdot \frac{\partial A}{\partial n}=0+t\ln\left(1+\frac{r}{n}\right)+nt\cdot \frac{1}{1+\frac{r}{n}}\cdot \left(-\frac{r}{n^{2}}\right)=t\ln\left(1+\frac{r}{n}\right)-\frac{rt}{n+r}.

After multiplying both sides by A=P\left(1+\frac{r}{n}\right)^{nt}, we can write our final answer as \frac{\partial A}{\partial n}=P\left(1+\frac{r}{n}\right)^{nt}\cdot \left(t\ln\left(1+\frac{r}{n}\right)-\frac{rt}{n+r}\right).

If we then plug in, for example, P=1000, r=0.05, n=4, and t=10 into this, we get \frac{\partial A}{\partial n}\approx 1.26 dollars per number of compounding periods per year.

Since f(1000,0.05,4,10)\approx 1643.62 dollars and f(1000,0.05,5,10)\approx 1644.63 dollars, for an increase of 1644.63-1643.62=1.01 dollars, we can see that the linear approximation is not too far off in approximating what happens as n increases from 4 to 5 times per year.

Limiting Values

As the graphs above seem to imply, this function also has limiting values as n\longrightarrow +\infty (for various fixed P, r, and t). In fact, it turns out that A=f(P,r,n,t)=P\left(1+\frac{r}{n}\right)^{nt}\longrightarrow Pe^{rt} as n\longrightarrow +\infty.

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.

Calculus 1, Lecture 20A: How to Get Better at Math, Derivative Practice, More Antiderivatives

After that, I work through some practice problems for derivatives and antiderivatives. This includes the fact that \frac{d}{dx}(\sec(x))=\sec(x)\tan(x) (so \displaystyle\int \sec(x)\tan(x)\, dx=\sec(x)+C). It also includes the fact that, as long as x\not=0, \frac{d}{dx}\left(\ln|x|\right)=\frac{1}{x}. Therefore, \displaystyle\int\frac{1}{x}\, dx=\ln|x|+C, as long as x\not=0.

The reason this works is as follows: if x<0, then |x|=-x (which is actually a positive number). In that case, by the Chain Rule, \frac{d}{dx}(\ln|x|)=\frac{d}{dx}(\ln(-x))=\frac{1}{-x}\cdot (-1)=\frac{1}{x}.

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.

Calculus 1, Lecture 20B: Partial Derivatives, Logarithmic Differentiation, Implicit Differentiation

Next, I do a simpler example. I differentiate y=f(x)=x^{x} with logarithmic differentiation. The answer turns out to be \frac{dy}{dx}=f'(x)=x^{x}(1+\ln(x)). 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 z=f(x,y)=x^{3}+y^{2}-x. As before, we can start by looking at the 2-dimensional graph of this function (a surface) sitting inside 3-dimensional space {\Bbb R}^{3}.

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 of z=f(x,y)=x^{3}+y^{2}-x from the same “viewing angle”, but the one on the right is more “zoomed in”.

The graph on the left seems to indicate that, as x increases, “generally-speaking”, z will increase as well. However, there are exceptions. If x and y are both near zero, the graph on the right makes it clear that z can decrease as x 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 xy-plane, where z=constant. These give the “level curves” of this function. An animation of this is shown below.

Slicing the graph of z=f(x,y)=x^{3}+y^{2}-x for z=constant gives level curves on the right. These are not graphs of single functions of x.

Notice that, for each value z=constant, the blue graph on the right is not the graph of a single function of x. Each such graph fails the vertical line test.

However, if we “cut” these blue graphs “in half” along the x-axis, each resulting piece is a function of x. In fact, since z=f(x,y)=x^{3}+y^{2}-x, for any fixed z, these functions are y=\pm \sqrt{z+x-x^{3}}.

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 y as two functions of x, we can differentiate one or the other of these functions as needed. For example, if z=1, we can differentiate the function y=-\sqrt{1+x-x^{3}} at x=0 to find the slope of the graph of the lower function at the point (x,y)=\left(0,-\sqrt{1+0-0^{3}}\right)=(0,-1).

The derivative is \frac{dy}{dx}=-\frac{1}{2}\left(1+x-x^{3}\right)^{-1/2}\cdot (1-3x^{2}). Plugging in x=0 gives \frac{dy}{dx}\Bigr\rvert_{x=0}=-\frac{1}{2}\cdot 1^{-1/2}\cdot (1-3\cdot 0^{2})=-\frac{1}{2}.

Implicit Differentiation

With implicit differentiation, there is no need to solve the original equation f(x,y)=x^{3}+y^{2}-x=z for y as a function of x (for fixed z). Just assume y depends on x and differentiate, using the Chain Rule.

Doing this gives 3x^{2}+2y\cdot \frac{dy}{dx}-1=0. Now algebraically solve this for \frac{dy}{dx} to get \frac{dy}{dx}=\frac{1-3x^{2}}{2y}.

Finally, we want the slope of the (tangent line to the) curve at the point (x,y)=(0,-1), so plug this point into the derivative. Doing so gives \frac{dy}{dx}\Bigr\rvert_{(x,y)=(0,-1)}=\frac{1-3\cdot 0^{2}}{2\cdot (-1)}=-\frac{1}{2}.

We get the same answer either way!

In either case, we see that the equation of the tangent line to this point is y=-1-\frac{1}{2}(x-0)=-\frac{1}{2}x-1. This can help us to approximate points on the curve if we needed to. For example, when x=0.1, the linear approximation gives y\approx -\frac{1}{2}\cdot 0.1-1=-0.05-1=-1.05. The point (x,y)=(0.1,-1.05) is approximately on the curve. See the figure below.

Implicit differentiation can be used to find slopes of implicitly defined curves. This can then be used to approximate other points on the curves. These curves arise as level curves of multivariable calculus functions.
The graph of the entire level curve 1=f(x,y)=x^{3}+y^{2}-x along with the tangent line to the curve at the point (x,y)=(0,-1). The point (x,y)=(0,-1) is exactly on the blue level curve. The point (x,y)=(0.1,-1.05) is on the tangent line (red curve) and approximately on the blue level curve.
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 y as a function of x.

An example of this is the equation \sin(xy)=y. We cannot solve for y as a function of x here, but we can solve for the derivative \frac{dy}{dx} as a function of both x and y.

Assuming y depends on x, along with the Chain Rule and Product Rule, give \cos(xy)\cdot \left(y+x\cdot \frac{dy}{dx}\right)=\frac{dy}{dx}. Algebraically solving this for \frac{dy}{dx} gives \frac{dy}{dx}=\frac{y\cos(xy)}{1-x\cos(xy)} (check this!).

This can then give us slopes of tangent lines to the graph of \sin(xy)=y (assuming we know points on this graph). Part of the graph itself is shown below. A point on the graph is (x,y)=\left(\frac{\pi}{3},0.5\right)\approx (1.047,0.5). The slope of the tangent line there is approximately \frac{dy}{dx}\approx 4.651.

The graph of \sin(xy)=y (in blue) and the tangent line to this graph at the point (x,y)=\left(\frac{\pi}{3},\frac{1}{2}\right)\approx (1.047,0.5). Its approximate slope can be found using implicit differentiation to be 4.651.

Because of this, the equation of the tangent line at this point is approximately y=0.5+4.651(x-1.047). If x=1.1, for example, this would imply that y\approx 0.5+4.651\cdot 0.053\approx 0.75 and the point (x,y)=(1.1,0.75) is approximately on the blue graph.