Calculus · Unit 2 · Topic 09

Partial differentiation: one variable at a time.

Short answer

For a function of two variables \(z = f(x, y)\), the partial derivative \(\dfrac{\partial z}{\partial x}\) is found by differentiating with respect to \(x\) while treating \(y\) as a constant. Similarly, \(\dfrac{\partial z}{\partial y}\) treats \(x\) as a constant. For example, if \(z = x^2 y^3\):

\[\frac{\partial z}{\partial x} = 2x\,y^3, \qquad \frac{\partial z}{\partial y} = 3x^2 y^2\]

Engineering Calculus · Unit 2B Tech / BE Semester IBSc
01

Definition and notation

Before you start: partial differentiation uses exactly the same rules as ordinary differentiation. If they feel rusty, revise with the Derivatives guide.

A function of two variables, \(z = f(x, y)\), depends on two inputs. A partial derivative asks how \(z\) changes when you move just one input and freeze the other.

Partial derivatives

With respect to \(x\) (treat \(y\) as a constant)

\[\frac{\partial z}{\partial x} = \lim_{h \to 0}\frac{f(x + h, y) - f(x, y)}{h}\]

With respect to \(y\) (treat \(x\) as a constant)

\[\frac{\partial z}{\partial y} = \lim_{k \to 0}\frac{f(x, y + k) - f(x, y)}{k}\]

You'll see several notations for the same thing: \(\dfrac{\partial z}{\partial x}\), \(\dfrac{\partial f}{\partial x}\), \(f_x\) and \(z_x\). The curly \(\partial\) (read “partial” or “del”) signals that other variables are being held fixed.

02

The idea in one picture

A curved surface z = f(x, y) with two slices through one point: one with y held constant and one with x held constant y held constant x held constant x y
Fix \(y\) and the surface becomes an ordinary curve (orange): its slope is \(\dfrac{\partial z}{\partial x}\). Fix \(x\) instead and you get the green curve, whose slope is \(\dfrac{\partial z}{\partial y}\).

So a partial derivative is just an ordinary derivative of a slice. That's why every rule you already know (power, product, quotient, chain) works unchanged: the other variable simply behaves like a number.

03

Second-order partial derivatives

Differentiate again and you get four second-order partial derivatives:

NotationMeaningShort name
\(f_{xx} = \dfrac{\partial^2 f}{\partial x^2}\)differentiate by \(x\), then by \(x\)\(r\)
\(f_{yy} = \dfrac{\partial^2 f}{\partial y^2}\)differentiate by \(y\), then by \(y\)\(t\)
\(f_{xy} = \dfrac{\partial^2 f}{\partial y\,\partial x}\)by \(x\), then by \(y\)\(s\)
\(f_{yx} = \dfrac{\partial^2 f}{\partial x\,\partial y}\)by \(y\), then by \(x\)
Equality of mixed partials

If \(f_{xy}\) and \(f_{yx}\) are continuous, then \[f_{xy} = f_{yx}\]

(This is Schwarz's or Clairaut's theorem.) In practice, for every function you'll meet in exams, the order of differentiation doesn't matter.

The short names \(r\), \(s\), \(t\) are used in maxima and minima.

04

Chain rule, total derivative and implicit functions

The formulas

Total differential

\[dz = \frac{\partial z}{\partial x}\,dx + \frac{\partial z}{\partial y}\,dy\]

Total derivative: \(z = f(x, y)\), with \(x = x(t)\), \(y = y(t)\)

\[\frac{dz}{dt} = \frac{\partial z}{\partial x}\,\frac{dx}{dt} + \frac{\partial z}{\partial y}\,\frac{dy}{dt}\]

Chain rule: \(z = f(x, y)\), with \(x = x(u, v)\), \(y = y(u, v)\)

\[\frac{\partial z}{\partial u} = \frac{\partial z}{\partial x}\,\frac{\partial x}{\partial u} + \frac{\partial z}{\partial y}\,\frac{\partial y}{\partial u}, \qquad \frac{\partial z}{\partial v} = \frac{\partial z}{\partial x}\,\frac{\partial x}{\partial v} + \frac{\partial z}{\partial y}\,\frac{\partial y}{\partial v}\]

Implicit function: \(f(x, y) = 0\)

\[\frac{dy}{dx} = -\frac{f_x}{f_y}\]

The pattern is the same as the one-variable chain rule, with one product for each route from \(z\) to the final variable.

For homogeneous functions, results like \(x\,u_x + y\,u_y = n\,u\) come from Euler's theorem, which has its own lesson.

05

Solved examples

Example 1: First-order partial derivatives

Easy

Find \(f_x\) and \(f_y\) for \(f(x, y) = x^3 + 3x^2 y + y^3\).

  1. For \(f_x\), treat \(y\) as a constant: \(f_x = 3x^2 + 6xy\).
  2. For \(f_y\), treat \(x\) as a constant: \(f_y = 3x^2 + 3y^2\).

Answer\(f_x = 3x^2 + 6xy\), \(\; f_y = 3x^2 + 3y^2\)

Example 2: Checking the mixed partials

Easy

Verify that \(u_{xy} = u_{yx}\) for \(u = x^y\).

  1. \(u_x = y\,x^{y-1}\) (power rule, \(y\) constant) and \(u_y = x^y \log x\) (exponential rule, \(x\) constant).
  2. \(u_{xy} = \dfrac{\partial}{\partial y}\left(y\,x^{y-1}\right) = x^{y-1} + y\,x^{y-1}\log x\) (product rule).
  3. \(u_{yx} = \dfrac{\partial}{\partial x}\left(x^y \log x\right) = y\,x^{y-1}\log x + x^y\cdot\dfrac{1}{x} = y\,x^{y-1}\log x + x^{y-1}\).

AnswerBoth equal \(x^{y-1}(1 + y\log x)\).

Example 3: Laplace's equation

Medium

If \(u = \log(x^2 + y^2)\), show that \(u_{xx} + u_{yy} = 0\).

  1. \(u_x = \dfrac{2x}{x^2 + y^2}\). By the quotient rule, \(u_{xx} = \dfrac{2(x^2 + y^2) - 2x\cdot 2x}{(x^2 + y^2)^2} = \dfrac{2(y^2 - x^2)}{(x^2 + y^2)^2}\).
  2. By symmetry (swap \(x\) and \(y\)), \(u_{yy} = \dfrac{2(x^2 - y^2)}{(x^2 + y^2)^2}\).
  3. Adding, the numerators cancel.

Answer\(u_{xx} + u_{yy} = 0\)

Example 4: Total derivative

Medium

If \(z = x^2 y\), with \(x = t^2\) and \(y = t^3\), find \(\dfrac{dz}{dt}\).

  1. \(\dfrac{dz}{dt} = z_x\dfrac{dx}{dt} + z_y\dfrac{dy}{dt} = 2xy\cdot 2t + x^2\cdot 3t^2\).
  2. Substitute: \(2t^2 t^3 \cdot 2t + t^4\cdot 3t^2 = 4t^6 + 3t^6\).
  3. Check directly: \(z = t^4 \cdot t^3 = t^7\), so \(\dfrac{dz}{dt} = 7t^6\). ✓

Answer\(\dfrac{dz}{dt} = 7t^6\)

Example 5: Implicit differentiation

Medium

Find \(\dfrac{dy}{dx}\) if \(x^3 + y^3 = 3axy\).

  1. Let \(f(x, y) = x^3 + y^3 - 3axy = 0\).
  2. \(f_x = 3x^2 - 3ay\) and \(f_y = 3y^2 - 3ax\).
  3. \(\dfrac{dy}{dx} = -\dfrac{f_x}{f_y} = -\dfrac{x^2 - ay}{y^2 - ax}\).

Answer\(\dfrac{dy}{dx} = \dfrac{ay - x^2}{y^2 - ax}\)

Example 6: A function of r

Exam level

If \(u = f(r)\), where \(r^2 = x^2 + y^2\), show that \(u_{xx} + u_{yy} = f''(r) + \dfrac{1}{r}f'(r)\).

  1. From \(r^2 = x^2 + y^2\): \(2r\,r_x = 2x\), so \(r_x = \dfrac{x}{r}\). Similarly \(r_y = \dfrac{y}{r}\).
  2. \(u_x = f'(r)\,\dfrac{x}{r}\). Differentiate again with the product and quotient rules: \[u_{xx} = f''(r)\frac{x^2}{r^2} + f'(r)\,\frac{r - x\cdot\frac{x}{r}}{r^2} = f''(r)\frac{x^2}{r^2} + f'(r)\frac{y^2}{r^3}\]
  3. By symmetry, \(u_{yy} = f''(r)\dfrac{y^2}{r^2} + f'(r)\dfrac{x^2}{r^3}\).
  4. Add, using \(x^2 + y^2 = r^2\): \(f''(r)\cdot 1 + f'(r)\cdot\dfrac{r^2}{r^3}\).

Answer\(u_{xx} + u_{yy} = f''(r) + \dfrac{1}{r}f'(r)\)

Vipul Sir's tip

Before you differentiate with respect to \(x\), mentally replace every \(y\) by a number such as 5. Then \(\dfrac{\partial}{\partial x}(x^2 y) = 2xy\) is as obvious as \(\dfrac{d}{dx}(5x^2) = 10x\).

06

Common mistakes

1. Differentiating the 'constant' variable too

\(\dfrac{\partial}{\partial x}(x^2 y) = 2xy\). There is no product rule here, because \(y\) is a constant when you differentiate with respect to \(x\).

2. Writing \(d\) instead of \(\partial\)

\(\dfrac{dz}{dx}\) and \(\dfrac{\partial z}{\partial x}\) mean different things for a function of two variables. Examiners notice.

3. Missing a route in the chain rule

If \(z\) depends on both \(x\) and \(y\), and both depend on \(t\), then \(\dfrac{dz}{dt}\) has two terms. Leaving out one route is the most common slip.

4. Losing the minus sign in \(\dfrac{dy}{dx} = -\dfrac{f_x}{f_y}\)

Check it on a simple case: for \(x^2 + y^2 = 1\), it gives \(-\dfrac{x}{y}\), which matches implicit differentiation.

07

How it's asked in exams

  • Find partial derivatives of a given function, often up to second order.
  • Prove an identity such as \(u_{xx} + u_{yy} = 0\) (Laplace's equation) or \(u_{xy} = u_{yx}\).
  • Total derivative and chain rule: find \(\dfrac{dz}{dt}\), or change variables (for example to polar coordinates).
  • Homogeneous functions: “if \(u = \dots\), prove that \(x u_x + y u_y = \dots\)” (see Euler's theorem).
08

Practice questions

Try each one on paper before you open the answer.

Q1Find \(f_x\) and \(f_y\) for \(f = x^2 y + x y^3\).

\(f_x = 2xy + y^3\), \(\; f_y = x^2 + 3xy^2\).

Q2Show that \(z = e^x \sin y\) satisfies \(z_{xx} + z_{yy} = 0\).

\(z_{xx} = e^x\sin y\) and \(z_{yy} = -e^x\sin y\). They add to 0.

Q3For \(z = \tan^{-1}\dfrac{y}{x}\), find \(z_x\) and \(z_y\), and show \(z_{xx} + z_{yy} = 0\).

\(z_x = -\dfrac{y}{x^2 + y^2}\), \(z_y = \dfrac{x}{x^2 + y^2}\).

\(z_{xx} = \dfrac{2xy}{(x^2 + y^2)^2}\) and \(z_{yy} = -\dfrac{2xy}{(x^2 + y^2)^2}\), which add to 0.

Q4If \(z = xy\), with \(x = e^t\) and \(y = \cos t\), find \(\dfrac{dz}{dt}\).

\(\dfrac{dz}{dt} = y\,e^t + x(-\sin t) = e^t(\cos t - \sin t)\).

Q5Find \(\dfrac{dy}{dx}\) if \(x^2 + xy + y^2 = 1\).

\(f_x = 2x + y\), \(f_y = x + 2y\), so \(\dfrac{dy}{dx} = -\dfrac{2x + y}{x + 2y}\).

Q6If \(u = (x^2 + y^2 + z^2)^{-1/2}\), show that \(u_{xx} + u_{yy} + u_{zz} = 0\).

Let \(r^2 = x^2 + y^2 + z^2\), so \(u = r^{-1}\). Then \(u_x = -x\,r^{-3}\) and \(u_{xx} = -r^{-3} + 3x^2 r^{-5}\).

Adding the three: \(-3r^{-3} + 3(x^2 + y^2 + z^2)\,r^{-5} = -3r^{-3} + 3r^{-3} = 0\).

Q7Challenge. If \(z = f(x, y)\) with \(x = r\cos\theta\), \(y = r\sin\theta\), show that \(z_x^2 + z_y^2 = z_r^2 + \dfrac{1}{r^2}z_\theta^2\).

Chain rule: \(z_r = z_x\cos\theta + z_y\sin\theta\) and \(z_\theta = -z_x\,r\sin\theta + z_y\,r\cos\theta\).

Square and add \(z_r^2 + \dfrac{z_\theta^2}{r^2}\): the cross terms \(\pm 2z_x z_y\sin\theta\cos\theta\) cancel, leaving \(z_x^2(\cos^2\theta + \sin^2\theta) + z_y^2(\sin^2\theta + \cos^2\theta) = z_x^2 + z_y^2\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

09

Frequently asked questions

What is the difference between a partial derivative and an ordinary derivative?

An ordinary derivative applies to a function of one variable. A partial derivative applies to a function of several variables and changes only one of them, holding the others fixed.

Does the order of mixed partial derivatives matter?

Not when the mixed partials are continuous, which covers almost every function in exams: \(f_{xy} = f_{yx}\).

What is the total derivative?

When \(x\) and \(y\) both depend on \(t\), the total derivative \(\dfrac{dz}{dt}\) adds up the change through every route: \(z_x\dfrac{dx}{dt} + z_y\dfrac{dy}{dt}\).

Where are partial derivatives used?

Everywhere in engineering: heat and wave equations, fluid flow, optimisation (maxima and minima), error estimates, and the gradient in vector calculus and machine learning.

Where partial differentiation leads next

← All 33 Calculus topics
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

First-year Engineering Calculus

Get the whole course right, with Vipul Sir beside you.

Concept-first coaching in small batches in Goregaon and Vile Parle, from the mean value theorems to Gauss's divergence theorem.

WhatsApp↗