Partial Derivatives

Ordinary derivatives in one-variable calculus

Your heating bill depends on the average temperature outside. If all other factors remain constant, then the heating bill will increase when the temperature drops. Let's denote the average temperature by tt and define a function h:RRh:\mathbb{R}\to\mathbb{R} where h(t)h(t) is the heating bill as a function of tt.

We can then interpret the ordinary derivative as indicating how much the heating bill will change as you change the temperature:

dhdt(a)=change in hchange in t(at t = a)\frac{dh}{dt}(a) = \frac{\text{change in h}}{\text{change in t}}(\text{at t = a})

If we plot hh as a function of tt then dhdt(a)\frac{dh}{dt}(a) gives the slope of the graph at the point where t=at = a. We say that dhdt\frac{dh}{dt} is the derivative of hh with respect to tt. If tt is given in degrees Celsius then dhdt(a)\frac{dh}{dt}(a) is the change in the heating cost per degree Celsius of temperature increase when the temperature is aa. Since hh decreases as tt increases, we would expect dhdt\frac{dh}{dt} to be negative (the rate of change in heating cost per degree of Celsius of temperature decrease is positive. But this positive rate is equal to dhdt-\frac{dh}{dt}).

Example

In this example we have a curve:

h(t)=0.05t22t+50h(t) = -0.05t^2 - 2t + 50

where tt is the average temperature in degrees Celsius.

The derivative of this curve is:

dhdt=0.1t2\frac{dh}{dt} = -0.1t - 2

The derivative gives us the slope of the curve at any point. Since we would like to plot the tangent of the curve where t=1t = 1, we plug that in and get the slope of the tangent line m=0.112=2.1m = -0.1 \cdot 1 - 2 = -2.1.

To find the y-intercept of the tangent line, we first find the value of hh at t=1t = 1:

h(1)=0.051221+50=47.95\begin{aligned} h(1) &= -0.05 \cdot 1^2 - 2 \cdot 1 + 50 \\ &= 47.95 \end{aligned}

We can find then the y-intercept by using the formula:

(yy1)=m(xx1)(y - y_1) = m(x - x_1)

Therefore:

h47.95=2.1(t1)h=2.1t+2.1+47.95h=2.1t+50.05\begin{aligned} h - 47.95 &= -2.1(t - 1) \\ h &= -2.1t + 2.1 + 47.95 \\ h &= -2.1t + 50.05 \end{aligned}

Partial derivatives are analogous to ordinary derivatives

Writing the heating bill as a function of temperature is a gross oversimplification. The heating bill will depend on other factors. For instance, the amount of insulation in your house, which we'll denote by ii. We can define a new function h:R2Rh:\mathbb{R}^2\to\mathbb{R} where h(t,i)h(t,i) gives the heating bill as a function of both temperature tt and insulation ii.

Suppose you aren't changing the amount of insulation in your house so we view ii as a fixed number. Then, if we look at how the heating bill changes as temperature changes, we're back to our first case above. The only difference is that we now view hh as a function of both tt and ii, and we are explicitly leaving one of the variables (ii) constant. In this case, we call the change in hh the partial derivative of hh with respect to tt, a term that reflects the fact some variables remain constant. We also change our notation by writing the dd as a \partial, so that

ht(a,b)=change in hchange in t(at t = a while holding i constant at b)\frac{\partial h}{\partial t}(a, b) = \frac{\text{change in h}}{\text{change in t}}(\text{at t = a while holding i constant at b})

If tt is given in degrees Celsius, then ht(a,b)\frac{\partial h}{\partial t}(a, b) is the change in heating cost per degree Celsius of temperature increase when the outside temperature is aa and the amount of insulation is bb.

Now, imagine you are considering the possibility of lowering your heating bill by installing additional insulation. To help you decide if it will be worth your money, you may want to know how much adding insulation will decrease the heating bill, assuming the temperature remains constant. In other words, you want to know the partial derivative of hh with respect to ii:

hi(a,b)=change in hchange in i(at i = b while holding t constant at a)\frac{\partial h}{\partial i}(a, b) = \frac{\text{change in h}}{\text{change in i}}(\text{at i = b while holding t constant at a})

If ii is given in centimetres of insulation, then hi(a,b)\frac{\partial h}{\partial i}(a, b) is the change in heating cost per added centimetre of insulation when the outside temperature is aa and the amount of insulation is bb.

The partial derivative hi\frac{\partial h}{\partial i} indicates how much effect additional insulation will have on the heating bill. Since additional insulation will presumably lower the heating bill, hi\frac{\partial h}{\partial i} will be negative. If additional insulation will have a large effect, then hi\frac{\partial h}{\partial i} will be a large, negative number. If, for your house, hi\frac{\partial h}{\partial i} is large and negative, you may be inclined to add insulation to save money.

In the graph of h(t,i)h(t,i), the partial derivatives can be viewed as the slopes of the graphs in the tt direction and in the ii direction.

Examples of calculating partial derivatives

Once you understand the concept of a partial derivative as the rate at which something is changing, calculating partial derivatives usually isn't difficult. (Unfortunately, there are special cases where calculating the partial derivatives is hard.) As these examples show, calculating a partial derivative is usually just like calculating an ordinary derivative in one-variable calculus. You just have to remember which variable you are taking the derivative of.

Example 1

Let f(x,y)=y3x2f(x,y) = y^3x^2. Calculate fx(x,y)\frac{\partial f}{\partial x}(x,y)

Solution:

We view yy as being a fixed number and calculate the ordinary derivative with respect to xx. x2x^2 becomes 2x2x so we are left with:

fx(x,y)=2y3x\frac{\partial f}{\partial x}(x,y) = 2y^3x

Example 2

Also for f(x,y)=y3x2f(x,y) = y^3x^2. Calculate fy(x,y)\frac{\partial f}{\partial y}(x,y)

Solution:

Because this time we are finding the derivative with respect to yy we treat xx as a constant. y3y^3 becomes 3y23y^2 so we have:

fy(x,y)=3x2y2\frac{\partial f}{\partial y}(x,y) = 3x^2y^2

Example 3

Also for f(x,y)=y3x2f(x,y) = y^3x^2. Calculate fy(1,2)\frac{\partial f}{\partial y}(1,2)

Solution:

fx(x,y)=2y3xfx(1,2)=2×23×1=16\begin{aligned} \frac{\partial f}{\partial x}(x,y) &= 2y^3x \\ \frac{\partial f}{\partial x}(1,2) &= 2 \times 2^3 \times 1 \\ &= 16 \end{aligned}

Example 4

For

f(x1,x2,x3,x4)=3(cos(x1x4)sin(x25)ex2+(1+x22)x1x2x4)+5x1x3x4f(x_1, x_2, x_3, x_4) = 3(\frac{cos(x_1x_4)sin(x_2^5)}{\frac{e^{x_2} + (1 + x_2^2)}{x_1x_2x_4}}) + 5x_1x_3x_4

calculate fx3(a,b,c,d)\frac{\partial f}{\partial x_3}(a,b,c,d)

Solution:

Although this initially looks hard, it's an easy problem. The ugly term does not depend on x3x_3, so in calculating the partial derivative with respect to x3x_3, we treat it as a constant. The derivative of a constant is 0, so that term drops out. The derivative is just the derivative of the last term with respect to x3x_3, which is

fx3(x1,x2,x3,x4)=5x1x4\frac{\partial f}{\partial x_3}(x_1, x_2, x_3, x_4) = 5x_1x_4

Substituting the values (x1,x2,x3,x4)=(a,b,c,d)(x_1, x_2, x_3, x_4)=(a,b,c,d), we obtain the final answer

fx3(a,b,c,d)=5ad\frac{\partial f}{\partial x_3}(a,b,c,d) = 5ad

Example 5

Given

p(y1,y2,y3)=9(y1,y2,y3y1+y2+y3)p(y_1, y_2, y_3) = 9(\frac{y_1, y_2, y_3}{y_1 + y_2 + y_3})

calculate py3(y1,y2,y3)\frac{\partial p}{\partial y_3}(y_1, y_2, y_3) at the point (y1,y2,y3)=(1,2,4)(y_1, y_2, y_3) = (1, -2, 4)

Solution:

In calculating partial derivatives, we can use all the rules for ordinary derivatives. We can calculate py3\frac{\partial p}{\partial y_3} using the quotient rule:

py3(y1,y2,y3)=9((y1+y2+y3)(y1+y2+y3)2)\frac{\partial p}{\partial y_3}(y_1, y_2, y_3) = 9(\frac{(y_1 + y_2 + y_3)}{(y_1 + y_2 + y_3)^2})

TODO: finish this example

References

Tags: Mathematics