You are on page 1of 8

Lecture 7: Total differentials

Suppose a differentiable function f (x, y ) and its partial derivatives


exist at a point (x, y ). If we move from (x0 , y0 ) to a nearby point
(x0 + dx, y0 + dy ), the resulting change

df = fx (x0 , y0 )dx + fy (x0 , y0 )dy

in the linearisation of f is called the total differential of f .


Why total differential?
when (x, y ) change from (x0 ,y0 ) to (x0 + ∆x, y0 + ∆y ),
f (x, y ) changes from f (x0 , y0 ) to f (x0 + ∆x, y0 + ∆y ).
the change in f (x, y ) or the total increment of f (x, y )
corresponding to ∆x and ∆y is
∆f (x0 , y0 ) = f (x0 + ∆x, y0 + ∆y ) − f (x0 , y0 )

we seek an analytical approximation to ∆f (x0 , y0 ) for small


∆x and ∆y .
Advanced Engineering Mathematics Week 2 L7: 1 / 8
If ∆x and ∆y are small enough, we usually take

dx = ∆x and dy = ∆y

Then

∂f ∂f
∆f ≈ (x0 ,y0 )
dx + (x0 ,y0 )
dy = df
∂x ∂y
or
∆f ≈ df

That is, the total increment ∆f can be approximated by the


total differential df when ∆x and ∆y are small.
This is very useful in error estimates for physical quantities
that rely on measurements that may themselves be in error.
It forms the basis of derivation of many numerical methods.

Advanced Engineering Mathematics Week 2 L7: 2 / 8


Application: estimate change
Example
The volume V cm3 of a circular cylinder of radius r cm and height
h cm is given by V = πr 2 h. If r = 1 ± 0.01 and h = 5 ± 0.005 find
the greatest error in the calculation of V .
Solution: To estimate the change in V = πr 2 h, we use
∆V ≈ dV = Vr (r0 , h0 )dr + Vh (r0 , h0 )dh,
where dr = ∆r = ±0.01, dh = ∆h = ±0.005, at (r0 , h0 ) = (1, 5).
With Vr = 2πrh and Vh = πr 2 , we get

dV = 2πr0 h0 dr + πr02 dh = πr0 (2h0 dr + r0 dh).

So at (r0 , h0 ) = (1, 5), ∆V ≈ dV = ±π(10 × 0.01 + 1 × 0.005)


giving
∆V ≈ ±0.105π.
Advanced Engineering Mathematics Week 2 L7: 3 / 8
Note: in the last example, we used the concept of the total
differential to find the estimated maximum error, not the exact
change.

The maximum positive change can be calculated by

∆V = π(1.012 × 5.005 − 5) = 0.1056π

The maximum negative change can be calculated by

∆V = π(0.992 × 4.995 − 5) = −0.1044π

From the above, we could see that the approximation of maximum


error of ±0.105π gives a good guide to the accuracy of the result.

It is important to know that we only need the first order partial


derivatives in the approximation using differentials.
Advanced Engineering Mathematics Week 2 L7: 4 / 8
Application: approximation of unknown function
The point of using total differential is not to approximate a known
function, but to approximate the values of an unknown function at
nearby points if we know the values of f , fx and fy at a particular
point without actually knowing the function f .
Example
Given that f (1, −2) = 5, fx (1, −2) = 1.2, and fy (1, −2) = −0.3,
approximate f (1.1, −2.05).
Solution:
The total differential approximates how much f changes from the
point (1, −2) to the point (1.1, −2.05).
With dx = ∆x = 0.1 and dy = ∆y = −0.05, we have
df = fx dx + fy dy = 1.2(0.1) − 0.3(−0.05) = 0.135
The change in z = f (x, y ) is approximately 0.135 so
f (1.1, −2.05) = f (1, −2) + ∆f ≈ f (1, −2) + df = 5.135.
Advanced Engineering Mathematics Week 2 L7: 5 / 8
Application: error estimate
Total differential can be used to calculate approximate values for
absolute error, relative error and percentage error:
the absolute error in f , ∆f :
∆f ≈ df

the relative error in f , ∆f /f :


∆f df

f (x0 , y0 ) f (x0 , y0 )

the percentage relative error in f , ∆f /f × 100%:


∆f df
× 100 ≈ × 100
f (x0 , y0 ) f (x0 , y0 )

Relative error or percentage error gives more information


about possible error than absolute error. (why?)
Advanced Engineering Mathematics Week 2 L7: 6 / 8
Estimating percentage error
Example
The volume V = πr 2 h of a right cylinder is to be calculated from
measured values of r and h. Suppose that r is measured with an
errot of no more than 2% and h with an error of no more than
0.5%. Estimate the resulting possible percentage error in the
calculation of V .
Solution: We are given the following information:
dr dh
× 100 ≤ 2 and × 100 ≤ 0.5.
r h

The maximum percentage error in the calculation of V is


∆V dV
× 100 ≈ × 100.
V V

dV = 2πrhdr + πr 2 dh, V = πr 2 h

Advanced Engineering Mathematics Week 2 L7: 7 / 8


dV 2πrhdr + πr 2 dh 2dr dh
= 2
= +
V πr h r h
So we have
dV dr dh
= 2 +
V r h
Recall that |a + b| ≤ |a| + |b|, where a and b are real numbers.

dV dr dh
≤ 2 +
V r h
≤ 2(0.02) + 0.005
= 0.045
= 4.5%

We estimate the error in the volume calculation to be at most


4.5%, if r is measured with an error of no more than 2% and h is
measured with an error of no more than 0.5%.

Advanced Engineering Mathematics Week 2 L7: 8 / 8

You might also like