TN 12th MathsLearn · Visualize · Practice

Chapter 8

Differentials and Partial Derivatives

Linear approximation, functions of several variables and partial derivatives.

1. Linear approximation — the tangent line as a calculator

Near a point, a smooth curve looks almost straight — it hugs its tangent line. This is the single most useful idea in differential calculus: over a small step Δx\Delta x, the change in y=f(x)y = f(x) is well approximated by the change along the tangent, whose slope is f(x)f'(x).

Increment approximation
Δyf(x)Δx\Delta y \approx f'(x)\,\Delta x

Sliding along the tangent from a point x0x_0 where ff is easy to evaluate gives the linear approximation (also called the tangent-line approximation):

DefinitionLinear approximation

The linear approximation of a differentiable ff near x0x_0 is L(x)=f(x0)+f(x0)(xx0)L(x) = f(x_0) + f'(x_0)(x - x_0). For xx close to x0x_0, f(x)L(x)f(x) \approx L(x). The trick is to choose x0x_0 as a nearby point where f(x0)f(x_0) and f(x0)f'(x_0) are known exactly.

ExampleEstimating a root
Use linear approximation to approximate 36.6\sqrt{36.6}.
ExampleA cube-root estimate
Using f(x)=x1/3f(x) = x^{1/3} at x0=27x_0 = 27, approximate 27.231/327.23^{1/3}.
Note: Choosing $x_0$ well is the whole game: pick the closest 'nice' value (a perfect square, cube, or multiple of a known angle) so that $f(x_0)$ and $f'(x_0)$ need no calculator.

2. Errors: absolute, relative and percentage

When a measured quantity feeds into a formula, its small error propagates. The differential is the tool that converts a measurement error Δx\Delta x into an estimated error in f(x)f(x).

DefinitionThree kinds of error

Absolute error=actualapproximate\textbf{Absolute error} = |\text{actual} - \text{approximate}| (carries a unit). Relative error=absolute erroractual value\textbf{Relative error} = \dfrac{\text{absolute error}}{\text{actual value}} (no unit). Percentage error=relative error×100%\textbf{Percentage error} = \text{relative error} \times 100\%.

If xx carries a small error Δx\Delta x, then the induced error in f(x)f(x) is about Δff(x)Δx\Delta f \approx f'(x)\,\Delta x. Dividing by f(x)f(x) turns this into a relative error.

ExampleSurface area of a soap bubble
A spherical soap bubble's radius grows from 5 cm5\text{ cm} to 5.2 cm5.2\text{ cm}. Use linear approximation to estimate the increase in surface area S=4πr2S = 4\pi r^2, and find the percentage error against the exact change.
ExampleVolume of a cylinder
A right circular cylinder has r=10 cmr = 10\text{ cm}, h=20 cmh = 20\text{ cm} (fixed). If rr increases to 10.1 cm10.1\text{ cm}, estimate the change in volume V=πr2hV = \pi r^2 h and the relative error.
Watch out: A clean exam result: the percentage error in the $n$-th root of a number is about $\dfrac{1}{n}$ times the percentage error in the number itself. (From $f = x^{1/n}$, $\dfrac{df}{f} = \dfrac{1}{n}\dfrac{dx}{x}$.)

3. Differentials as a working notation

To turn Δyf(x)Δx\Delta y \approx f'(x)\Delta x into a precise object, we introduce the differentials dxdx and dydy. We treat dxdx as an independent variable (the size of the step), and define dydy to be the matching rise along the tangent line.

DefinitionDifferential

For a differentiable y=f(x)y = f(x), the differential of yy is dy=f(x)dxdy = f'(x)\,dx, where dx=Δxdx = \Delta x is the differential of xx. The true change Δy\Delta y and the differential dydy agree to first order: Δydy\Delta y \approx dy for small dxdx.

Key idea: $\Delta y$ is the exact change measured along the curve; $dy = f'(x)\,dx$ is the change predicted by the tangent line. Their difference shrinks faster than $\Delta x$ itself, which is why the approximation is so good.

Differentials obey the same algebra as derivatives — sum, product, quotient and chain rules all carry over:

d(cf)=cfdx,d(f+g)=df+dg,d(fg)=fdg+gdf,d(fg)=f(g)gdxd(cf) = c\,f'\,dx,\quad d(f+g) = df + dg,\quad d(fg) = f\,dg + g\,df,\quad d(f\circ g) = f'(g)\,g'\,dx
ExampleA differential from the product rule
Find the differential of g(x)=x2+sinxg(x) = x^2 + \sin x.
ExampleShrinking sphere
A sphere of radius 10 cm10\text{ cm} has its radius decrease by 0.1 cm0.1\text{ cm}. Approximately how much does its volume change?

4. Functions of several variables

Most real quantities depend on more than one input: the volume of a cylinder depends on radius and height, temperature on position and time. A function of two variables assigns a single number z=f(x,y)z = f(x,y) to each point (x,y)(x,y) in a region of the plane.

DefinitionFunction of two variables

A function ff of two variables is a rule assigning to each ordered pair (x,y)(x,y) in a domain DR2D \subseteq \mathbb{R}^2 a unique real number z=f(x,y)z = f(x,y). Its graph is a surface sitting above the xyxy-plane.

For example g(x,y)=30x2y2g(x,y) = 30 - x^2 - y^2 is a paraboloid. Fixing y=3y = 3 gives g(x,3)=21x2g(x,3) = 21 - x^2, a parabola — the curve where the vertical plane y=3y = 3 slices the surface. Fixing x=2x = 2 gives g(2,y)=26y2g(2,y) = 26 - y^2, another parabola. Slicing to hold one variable fixed is exactly what partial derivatives will formalise.

Key idea: Open the Visualize tab to slice a surface: freeze $y = b$ to get an $x$-curve, freeze $x = a$ to get a $y$-curve. The partial derivatives are the slopes of these two slice-curves.

5. Limits and continuity in two variables

We say f(x,y)Lf(x,y) \to L as (x,y)(a,b)(x,y) \to (a,b) if ff can be made arbitrarily close to LL by taking (x,y)(x,y) close enough to (a,b)(a,b). The crucial new feature in two dimensions is that a point can be approached from infinitely many directions — along any path in the plane, not just from left and right.

Watch out: Path dependence: for a limit to exist, $f$ must approach the same value along every path. If two paths give different values, the limit does not exist.
ExampleA limit that fails to exist
Show that f(x,y)=xyx2+y2f(x,y) = \dfrac{xy}{x^2 + y^2} has no limit at (0,0)(0,0).
DefinitionContinuity

ff is continuous at (a,b)(a,b) if lim(x,y)(a,b)f(x,y)=f(a,b)\displaystyle\lim_{(x,y)\to(a,b)} f(x,y) = f(a,b). Polynomials in xx and yy are continuous everywhere; a quotient is continuous wherever its denominator is non-zero.

ExampleContinuity by the squeeze
Show g(x,y)=x2yx2+y2g(x,y) = \dfrac{x^2 y}{x^2 + y^2} (with g(0,0)=0g(0,0)=0) is continuous at the origin.

6. Partial derivatives

To measure how f(x,y)f(x,y) changes, we vary one input at a time and hold the other fixed. Freezing yy turns ff into a function of xx alone; its ordinary derivative is the partial derivative with respect to xx.

DefinitionPartial derivatives

The partial derivatives of f(x,y)f(x,y) are fx=limh0f(x+h,y)f(x,y)h\dfrac{\partial f}{\partial x} = \lim_{h\to 0}\dfrac{f(x+h,\,y) - f(x,y)}{h} and fy=limh0f(x,y+h)f(x,y)h\dfrac{\partial f}{\partial y} = \lim_{h\to 0}\dfrac{f(x,\,y+h) - f(x,y)}{h}, when these limits exist. They are also written fxf_x and fyf_y.

Key idea: To compute $f_x$, differentiate as usual in $x$ while treating every $y$ as a constant. For $f_y$, treat every $x$ as constant. Geometrically, $f_x(a,b)$ is the slope of the surface in the $x$-direction — the slope of the curve cut by the plane $y = b$.
ExampleBoth partials of a polynomial
Find fxf_x and fyf_y for f(x,y)=x2y+3xy2f(x,y) = x^2 y + 3xy^2.
ExampleEvaluating at a point
For F(x,y)=x3y+y2x+7F(x,y) = x^3 y + y^2 x + 7, find Fx(1,3)F_x(-1,3) and Fy(2,1)F_y(2,-1).
ExamplePartial of an exponential
For u(x,y)=ex2+y2u(x,y) = e^{x^2 + y^2}, find uxu_x.
ExamplePartial of a power tower
For w(x,y)=xyw(x,y) = x^y with x>0x > 0, find wxw_x and wyw_y.

7. Higher-order partials and Clairaut's theorem

Each partial derivative is itself a function of xx and yy, so we can differentiate again. This gives four second-order partial derivatives:

fxx=2fx2,fyy=2fy2,fxy=y ⁣(fx),fyx=x ⁣(fy)f_{xx} = \dfrac{\partial^2 f}{\partial x^2},\quad f_{yy} = \dfrac{\partial^2 f}{\partial y^2},\quad f_{xy} = \dfrac{\partial}{\partial y}\!\left(\dfrac{\partial f}{\partial x}\right),\quad f_{yx} = \dfrac{\partial}{\partial x}\!\left(\dfrac{\partial f}{\partial y}\right)

The two mixed partials fxyf_{xy} (by xx, then yy) and fyxf_{yx} (the other order) are, remarkably, almost always equal.

DefinitionClairaut's theorem (equality of mixed partials)

If fxyf_{xy} and fyxf_{yx} both exist and are continuous on a region, then fxy=fyxf_{xy} = f_{yx} there. The order of differentiation does not matter.

ExampleVerifying $f_{xy} = f_{yx}$
Verify Clairaut's theorem for f(x,y)=x2y+3xy2f(x,y) = x^2 y + 3xy^2.
ExampleA harmonic function (Laplace's equation)
Show u(x,y)=e2ycos(2x)u(x,y) = e^{-2y}\cos(2x) satisfies uxx+uyy=0u_{xx} + u_{yy} = 0.
Note: A function with $u_{xx} + u_{yy} = 0$ is called harmonic; that equation is Laplace's equation, central to heat flow, electrostatics and fluid flow.

8. The total differential and error propagation

With one variable, dy=f(x)dxdy = f'(x)\,dx. With two variables, a small change in ff comes from both inputs moving, so the two contributions add:

DefinitionTotal differential

For z=f(x,y)z = f(x,y), the total differential is dz=fxdx+fydy=fxdx+fydydz = \dfrac{\partial f}{\partial x}\,dx + \dfrac{\partial f}{\partial y}\,dy = f_x\,dx + f_y\,dy. It gives the tangent-plane (linear) approximation Δzfx(a,b)Δx+fy(a,b)Δy\Delta z \approx f_x(a,b)\,\Delta x + f_y(a,b)\,\Delta y.

ExampleApproximating a change
For f(x,y)=x2+y2f(x,y) = x^2 + y^2, estimate the change as (x,y)(x,y) moves from (3,4)(3,4) to (3.1,3.9)(3.1,\,3.9).
ExampleTotal differential of a 3-variable function
Find dwdw for w(x,y,z)=x2y+y2z+z2xw(x,y,z) = x^2 y + y^2 z + z^2 x.
ExamplePercentage error in a product
The dimensions of a rectangle are measured as length x=10x = 10 and width y=5y = 5, each with a possible error of 1%1\%. Estimate the percentage error in the area A=xyA = xy.

9. Chain rule for partial derivatives

When xx and yy are themselves functions of another variable tt, then w=f(x,y)w = f(x,y) depends only on tt. Its rate of change combines both channels through which tt influences ww:

DefinitionChain rule (one parameter)

If w=f(x,y)w = f(x,y) with x=x(t)x = x(t) and y=y(t)y = y(t) differentiable, then dwdt=wxdxdt+wydydt\dfrac{dw}{dt} = \dfrac{\partial w}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial w}{\partial y}\dfrac{dy}{dt}.

ExampleChain rule along a curve
Let g(x,y)=x2yxg(x,y) = x^2 - yx, with x(t)=etx(t) = e^t and y(t)=t2y(t) = t^2. Find dgdt\dfrac{dg}{dt}.

When xx and yy depend on two variables ss and tt, the same idea gives partial chain rules:

ws=wxxs+wyys,wt=wxxt+wyyt\dfrac{\partial w}{\partial s} = \dfrac{\partial w}{\partial x}\dfrac{\partial x}{\partial s} + \dfrac{\partial w}{\partial y}\dfrac{\partial y}{\partial s},\qquad \dfrac{\partial w}{\partial t} = \dfrac{\partial w}{\partial x}\dfrac{\partial x}{\partial t} + \dfrac{\partial w}{\partial y}\dfrac{\partial y}{\partial t}
ExampleTwo-variable chain rule
Let g(x,y)=2x2+yg(x,y) = 2x^2 + y, with x=rsx = r - s and y=2r+sy = 2r + s. Find gr\dfrac{\partial g}{\partial r}.

10. Homogeneous functions and Euler's theorem

Many functions in geometry and physics scale in a simple way when all inputs are stretched by the same factor. Such functions are called homogeneous.

DefinitionHomogeneous function of degree $n$

A function f(x,y)f(x,y) is homogeneous of degree nn if f(tx,ty)=tnf(x,y)f(tx, ty) = t^n f(x,y) for all admissible t>0t > 0. Equivalently, every term of a polynomial ff has the same total degree nn; a ratio is homogeneous of degree (numerator degree - denominator degree).

For instance f(x,y)=x3+x2y+y3f(x,y) = x^3 + x^2 y + y^3 is homogeneous of degree 33, and f(x,y)=x2+y2x+yf(x,y) = \dfrac{x^2 + y^2}{x + y} is homogeneous of degree 11. But ex+ye^{x} + y is not homogeneous of any degree.

DefinitionEuler's theorem

If f(x,y)f(x,y) is homogeneous of degree nn with continuous partials, then xfx+yfy=nfx\,f_x + y\,f_y = n f. Differentiating once more gives the second-order form x2fxx+2xyfxy+y2fyy=n(n1)fx^2 f_{xx} + 2xy\,f_{xy} + y^2 f_{yy} = n(n-1)f.

Quick facts
  • Read the degree by summing exponents in each term (they must all match).
  • Euler's relation xfx+yfy=nfx f_x + y f_y = n f is a fast check and a shortcut in many proofs.
  • If uu is not homogeneous but ϕ(u)\phi(u) is (of degree nn), apply Euler to ϕ(u)\phi(u) and then substitute back.
ExampleVerifying Euler's theorem
Verify Euler's theorem for f(x,y)=x3+x2y+y3f(x,y) = x^3 + x^2 y + y^3.
ExampleEuler via a substitution
If u=sin1 ⁣(x+yx+y)u = \sin^{-1}\!\left(\dfrac{x + y}{\sqrt{x} + \sqrt{y}}\right), show that xux+yuy=12tanux u_x + y u_y = \tfrac12 \tan u.
Key idea: In the Visualize tab, fix a point $(a,b)$ and read $f_x$ as the tangent slope of the $x$-slice and $f_y$ as the tangent slope of the $y$-slice — the two numbers that Euler's theorem combines.