Implicit Functions and Partial Differentiation

Implicit Functions

In mathematics, we often encounter equations that define relationships between variables. Sometimes, these relationships are straightforward, allowing us to easily express one variable as a function of another. For instance, an equation like $y = 2x + 3$ explicitly defines $y$ in terms of $x$. Here, $y$ is a function of $x$, denoted as $y = f(x)$.

However, many equations are not so simple. They might involve both variables in a more intertwined manner, making it difficult or impossible to isolate one variable explicitly in terms of the other. Equations of this form are called implicit functions. An implicit function is defined by an equation of the form $F(x, y) = 0$ or $G(x, y) = c$, where $c$ is a constant. In such cases, we assume that $y$ is still a function of $x$, even if we cannot write $y = f(x)$ directly.

Consider the equation of a circle: $x^2 + y^2 = r^2$. This equation implicitly defines $y$ as a function of $x$. While we can solve for $y$ to get $y = \pm\sqrt{r^2 - x^2}$, this gives us two explicit functions, one for the upper semicircle and one for the lower semicircle. For many purposes, it is more convenient to work with the implicit form.

The key challenge with implicit functions is finding the derivative of $y$ with respect to $x$, denoted as $\frac{dy}{dx}$, without explicitly solving for $y$. This is where the technique of implicit differentiation comes into play.

Implicit Differentiation

Implicit differentiation is a method used to find the derivative of an implicit function. The core idea is to differentiate both sides of the equation with respect to $x$, treating $y$ as a function of $x$ (i.e., $y = y(x)$). When differentiating terms involving $y$, we must apply the chain rule.

Let's recall the chain rule: if $y$ is a function of $x$, then the derivative of $y^n$ with respect to $x$ is $n y^{n-1} \frac{dy}{dx}$. Similarly, the derivative of $\sin(y)$ with respect to $x$ is $\cos(y) \frac{dy}{dx}$, and so on.

The steps for implicit differentiation are:

  1. Differentiate both sides of the equation with respect to $x$.
  2. Remember to use the chain rule whenever you differentiate a term involving $y$.
  3. After differentiating, you will have an equation that includes $\frac{dy}{dx}$.
  4. Algebraically rearrange the equation to solve for $\frac{dy}{dx}$.
Example 1: Circle

Let's find $\frac{dy}{dx}$ for the circle equation $x^2 + y^2 = r^2$.

Differentiate both sides with respect to $x$:

$\frac{d}{dx}(x^2 + y^2) = \frac{d}{dx}(r^2)$

Applying the power rule to $x^2$ and the chain rule to $y^2$ (since $y$ is a function of $x$):

$2x + 2y \frac{dy}{dx} = 0$

Now, we solve for $\frac{dy}{dx}$:

$2y \frac{dy}{dx} = -2x$

$\frac{dy}{dx} = \frac{-2x}{2y}$

$\frac{dy}{dx} = -\frac{x}{y}$

This result tells us that the slope of the tangent line to the circle at any point $(x, y)$ is $-\frac{x}{y}$. Notice that the derivative depends on both $x$ and $y$, which is typical for implicit functions.

Example 2: Curve

Find $\frac{dy}{dx}$ for the equation $x^3 + y^3 = 6xy$.

Differentiate both sides with respect to $x$:

$\frac{d}{dx}(x^3 + y^3) = \frac{d}{dx}(6xy)$

For the left side:

$\frac{d}{dx}(x^3) = 3x^2$

$\frac{d}{dx}(y^3) = 3y^2 \frac{dy}{dx}$ (using the chain rule)

So, the left side derivative is $3x^2 + 3y^2 \frac{dy}{dx}$.

For the right side, we need to use the product rule for $6xy$:

$\frac{d}{dx}(6xy) = 6 \left( \frac{d}{dx}(x) \cdot y + x \cdot \frac{d}{dx}(y) \right)$

$= 6 \left( 1 \cdot y + x \cdot \frac{dy}{dx} \right)$

$= 6y + 6x \frac{dy}{dx}$

Now, equate the derivatives of both sides:

$3x^2 + 3y^2 \frac{dy}{dx} = 6y + 6x \frac{dy}{dx}$

Next, collect all terms involving $\frac{dy}{dx}$ on one side and all other terms on the other side:

$3y^2 \frac{dy}{dx} - 6x \frac{dy}{dx} = 6y - 3x^2$

Factor out $\frac{dy}{dx}$:

$\frac{dy}{dx}(3y^2 - 6x) = 6y - 3x^2$

Finally, solve for $\frac{dy}{dx}$:

$\frac{dy}{dx} = \frac{6y - 3x^2}{3y^2 - 6x}$

This can be simplified by dividing the numerator and denominator by 3:

$\frac{dy}{dx} = \frac{2y - x^2}{y^2 - 2x}$

Implicit Differentiation and Higher-Order Derivatives

We can also find second-order derivatives, such as $\frac{d^2y}{dx^2}$, using implicit differentiation. After finding the first derivative $\frac{dy}{dx}$, we differentiate it again with respect to $x$. Remember that $\frac{dy}{dx}$ itself is a function of $x$ and $y$, so when differentiating terms containing $\frac{dy}{dx}$, we will need to substitute the expression for $\frac{dy}{dx}$ back into the result.

Example 3: Second Derivative of a Circle

Let's find $\frac{d^2y}{dx^2}$ for $x^2 + y^2 = r^2$. We already found $\frac{dy}{dx} = -\frac{x}{y}$.

Differentiate $\frac{dy}{dx}$ with respect to $x$:

$\frac{d^2y}{dx^2} = \frac{d}{dx}\left(-\frac{x}{y}\right)$

Using the quotient rule $\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}$, where $u = -x$ and $v = y$. Here $u' = \frac{d}{dx}(-x) = -1$. And $v' = \frac{d}{dx}(y) = \frac{dy}{dx}$.

$\frac{d^2y}{dx^2} = \frac{(-1)(y) - (-x)\left(\frac{dy}{dx}\right)}{y^2}$

$\frac{d^2y}{dx^2} = \frac{-y + x\frac{dy}{dx}}{y^2}$

Now, substitute the expression for $\frac{dy}{dx} = -\frac{x}{y}$:

$\frac{d^2y}{dx^2} = \frac{-y + x\left(-\frac{x}{y}\right)}{y^2}$

$\frac{d^2y}{dx^2} = \frac{-y - \frac{x^2}{y}}{y^2}$

To simplify, multiply the numerator and denominator by $y$:

$\frac{d^2y}{dx^2} = \frac{y(-y) - y\left(\frac{x^2}{y}\right)}{y^2(y)}$

$\frac{d^2y}{dx^2} = \frac{-y^2 - x^2}{y^3}$

$\frac{d^2y}{dx^2} = -\frac{x^2 + y^2}{y^3}$

Since $x^2 + y^2 = r^2$, we can substitute this back:

$\frac{d^2y}{dx^2} = -\frac{r^2}{y^3}$

This gives us the second derivative of $y$ with respect to $x$ for the circle equation.

Partial Differentiation

So far, we have dealt with functions of a single variable, like $y = f(x)$. However, in many real-world applications, quantities depend on multiple independent variables. For example, the temperature at a point in a room might depend on its position $(x, y, z)$ and time $t$. Such functions are called functions of several variables, e.g., $z = f(x, y)$.

When we have a function of multiple variables, say $f(x, y)$, we are interested in how the function's value changes as each of its independent variables changes. This is where partial differentiation comes in. Partial differentiation allows us to study the rate of change of a multivariable function with respect to one of its variables, while holding all other variables constant.

Definition of Partial Derivatives

Let $z = f(x, y)$ be a function of two independent variables $x$ and $y$. The partial derivative of $f$ with respect to $x$, denoted as $\frac{\partial z}{\partial x}$ or $f_x(x, y)$, is the derivative of $f$ treating $y$ as a constant. The partial derivative of $f$ with respect to $y$, denoted as $\frac{\partial z}{\partial y}$ or $f_y(x, y)$, is the derivative of $f$ treating $x$ as a constant.

The symbol '$\partial$' (pronounced "del" or "partial") is used to distinguish partial derivatives from ordinary derivatives (where we use 'd').

Calculating Partial Derivatives

To calculate a partial derivative:

  1. To find $\frac{\partial f}{\partial x}$, treat all variables other than $x$ as constants and differentiate $f$ with respect to $x$ using the standard rules of differentiation.
  2. To find $\frac{\partial f}{\partial y}$, treat all variables other than $y$ as constants and differentiate $f$ with respect to $y$ using the standard rules of differentiation.
Example 4: Partial Derivatives of a Function of Two Variables

Let $f(x, y) = x^3 + 2x^2y + y^4$. Find $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$.

To find $\frac{\partial f}{\partial x}$:

Treat $y$ as a constant. Differentiate $f(x, y)$ with respect to $x$:

$\frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(x^3) + \frac{\partial}{\partial x}(2x^2y) + \frac{\partial}{\partial x}(y^4)$

$\frac{\partial}{\partial x}(x^3) = 3x^2$

For the second term, $2y$ is a constant multiplier: $\frac{\partial}{\partial x}(2x^2y) = 2y \frac{\partial}{\partial x}(x^2) = 2y(2x) = 4xy$.

For the third term, $y^4$ is treated as a constant, so its derivative with respect to $x$ is 0: $\frac{\partial}{\partial x}(y^4) = 0$.

Therefore, $\frac{\partial f}{\partial x} = 3x^2 + 4xy + 0 = 3x^2 + 4xy$.

To find $\frac{\partial f}{\partial y}$:

Treat $x$ as a constant. Differentiate $f(x, y)$ with respect to $y$:

$\frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(x^3) + \frac{\partial}{\partial y}(2x^2y) + \frac{\partial}{\partial y}(y^4)$

For the first term, $x^3$ is treated as a constant, so its derivative with respect to $y$ is 0: $\frac{\partial}{\partial y}(x^3) = 0$.

For the second term, $2x^2$ is a constant multiplier: $\frac{\partial}{\partial y}(2x^2y) = 2x^2 \frac{\partial}{\partial y}(y) = 2x^2(1) = 2x^2$.

$\frac{\partial}{\partial y}(y^4) = 4y^3$.

Therefore, $\frac{\partial f}{\partial y} = 0 + 2x^2 + 4y^3 = 2x^2 + 4y^3$.

Example 5: Partial Derivatives involving Trigonometric and Exponential Functions

Let $g(x, y) = e^{xy} \sin(x)$. Find $\frac{\partial g}{\partial x}$ and $\frac{\partial g}{\partial y}$.

To find $\frac{\partial g}{\partial x}$:

Treat $y$ as a constant. We need to use the product rule for $e^{xy} \sin(x)$. Let $u = e^{xy}$ and $v = \sin(x)$.

We need to find $\frac{\partial u}{\partial x}$ and $\frac{\partial v}{\partial x}$.

$\frac{\partial u}{\partial x} = \frac{\partial}{\partial x}(e^{xy})$. Using the chain rule, treating $y$ as constant: $\frac{\partial}{\partial x}(e^{xy}) = e^{xy} \cdot \frac{\partial}{\partial x}(xy) = e^{xy} \cdot y = ye^{xy}$.

$\frac{\partial v}{\partial x} = \frac{\partial}{\partial x}(\sin(x)) = \cos(x)$.

Using the product rule $\frac{\partial g}{\partial x} = \frac{\partial u}{\partial x} v + u \frac{\partial v}{\partial x}$:

$\frac{\partial g}{\partial x} = (ye^{xy}) \sin(x) + (e^{xy}) (\cos(x))$

$\frac{\partial g}{\partial x} = ye^{xy}\sin(x) + e^{xy}\cos(x) = e^{xy}(y\sin(x) + \cos(x))$.

To find $\frac{\partial g}{\partial y}$:

Treat $x$ as a constant. The term $e^{xy}$ involves $y$, but $\sin(x)$ is treated as a constant.

$\frac{\partial g}{\partial y} = \frac{\partial}{\partial y}(e^{xy} \sin(x))$

Here, $\sin(x)$ is a constant multiplier.

$\frac{\partial g}{\partial y} = \sin(x) \frac{\partial}{\partial y}(e^{xy})$

Using the chain rule, treating $x$ as constant: $\frac{\partial}{\partial y}(e^{xy}) = e^{xy} \cdot \frac{\partial}{\partial y}(xy) = e^{xy} \cdot x = xe^{xy}$.

So, $\frac{\partial g}{\partial y} = \sin(x) (xe^{xy}) = xe^{xy}\sin(x)$.

Partial Derivatives of Functions of More Than Two Variables

The concept extends easily to functions of three or more variables. For a function $f(x, y, z)$, we can find partial derivatives with respect to $x$, $y$, and $z$. To find $\frac{\partial f}{\partial x}$, we treat $y$ and $z$ as constants. To find $\frac{\partial f}{\partial y}$, we treat $x$ and $z$ as constants, and so on.

Example 6: Function of Three Variables

Let $h(x, y, z) = x^2y + y^3z^2 - \frac{z}{x}$. Find $\frac{\partial h}{\partial x}$, $\frac{\partial h}{\partial y}$, and $\frac{\partial h}{\partial z}$.

$\frac{\partial h}{\partial x}$ (treat $y, z$ as constants):

$\frac{\partial}{\partial x}(x^2y) = 2xy$

$\frac{\partial}{\partial x}(y^3z^2) = 0$ (constant)

$\frac{\partial}{\partial x}\left(-\frac{z}{x}\right) = -z \frac{\partial}{\partial x}(x^{-1}) = -z (-1 x^{-2}) = \frac{z}{x^2}$

So, $\frac{\partial h}{\partial x} = 2xy + \frac{z}{x^2}$.

$\frac{\partial h}{\partial y}$ (treat $x, z$ as constants):

$\frac{\partial}{\partial y}(x^2y) = x^2$

$\frac{\partial}{\partial y}(y^3z^2) = 3y^2z^2$

$\frac{\partial}{\partial y}\left(-\frac{z}{x}\right) = 0$ (constant)

So, $\frac{\partial h}{\partial y} = x^2 + 3y^2z^2$.

$\frac{\partial h}{\partial z}$ (treat $x, y$ as constants):

$\frac{\partial}{\partial z}(x^2y) = 0$ (constant)

$\frac{\partial}{\partial z}(y^3z^2) = y^3 (2z) = 2y^3z$

$\frac{\partial}{\partial z}\left(-\frac{z}{x}\right) = -\frac{1}{x} \frac{\partial}{\partial z}(z) = -\frac{1}{x}(1) = -\frac{1}{x}$

So, $\frac{\partial h}{\partial z} = 2y^3z - \frac{1}{x}$.

Higher-Order Partial Derivatives

Just like with ordinary derivatives, we can compute higher-order partial derivatives. For a function $f(x, y)$, we can find second-order partial derivatives:

  • $\frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right)$
  • $\frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right)$
  • $\frac{\partial^2 f}{\partial y \partial x} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right)$
  • $\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right)$

The notation $\frac{\partial^2 f}{\partial y \partial x}$ means we first find the partial derivative with respect to $x$, and then differentiate the result with respect to $y$. The notation $\frac{\partial^2 f}{\partial x \partial y}$ means we first find the partial derivative with respect to $y$, and then differentiate the result with respect to $x$. These are often called mixed partial derivatives.

A very important result in calculus is Clairaut's Theorem (also known as Schwarz's Theorem), which states that if the second-order partial derivatives of $f(x, y)$ and their mixed partial derivatives are continuous in a region, then the order of differentiation does not matter:

$\frac{\partial^2 f}{\partial y \partial x} = \frac{\partial^2 f}{\partial x \partial y}$

Example 7: Second-Order Partial Derivatives

Let $f(x, y) = x^3 + 2x^2y + y^4$. We previously found:

$\frac{\partial f}{\partial x} = 3x^2 + 4xy$

$\frac{\partial f}{\partial y} = 2x^2 + 4y^3$

Now let's find the second-order derivatives:

$\frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x}(3x^2 + 4xy)$

(Treat $y$ as constant): $\frac{\partial^2 f}{\partial x^2} = 6x + 4y$.

$\frac{\partial^2 f}{\partial y^2} = \frac{\partial}{\partial y}(2x^2 + 4y^3)$

(Treat $x$ as constant): $\frac{\partial^2 f}{\partial y^2} = 0 + 12y^2 = 12y^2$.

$\frac{\partial^2 f}{\partial y \partial x} = \frac{\partial}{\partial y}(3x^2 + 4xy)$

(Treat $x$ as constant): $\frac{\partial^2 f}{\partial y \partial x} = 0 + 4x = 4x$.

$\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x}(2x^2 + 4y^3)$

(Treat $y$ as constant): $\frac{\partial^2 f}{\partial x \partial y} = 4x + 0 = 4x$.

As expected by Clairaut's Theorem, $\frac{\partial^2 f}{\partial y \partial x} = \frac{\partial^2 f}{\partial x \partial y} = 4x$.

Applications of Partial Differentiation

Partial differentiation is a fundamental tool in many fields of science, engineering, economics, and statistics. Some key applications include:

  • Optimization: Finding maximum or minimum values of functions of several variables (e.g., maximizing profit, minimizing cost). This involves finding critical points where all first-order partial derivatives are zero.
  • Rate of Change Analysis: Understanding how a quantity changes with respect to multiple factors. For example, in economics, how demand changes with respect to price and income.
  • Physics: Describing phenomena like heat flow (heat equation), wave propagation (wave equation), and electromagnetism (Maxwell's equations), all of which are expressed using partial differential equations (PDEs).
  • Engineering: Analyzing stress, strain, fluid dynamics, and control systems.
  • Statistics: In statistical modeling, parameters are often estimated by maximizing likelihood functions, which requires partial derivatives.
Memory Trick for Partial Differentiation:

Think of it like a multi-ingredient recipe. When you're adjusting the amount of 'salt' (one variable), you keep the 'flour' and 'sugar' (other variables) exactly the same. The partial derivative tells you how the final dish's taste (function value) changes *only* due to the salt, ignoring changes from flour or sugar.