Derivative of a right triangle’s area with respect to its height

areaderivativeseconomicstriangles

I want to find the first derivative of the area of a right triangle as its non-hypotenuse sides change as a function of a third variable. I try it two different ways and get two different answers. The question has arisen as part of calculating producer surplus (the area beneath a horizontal price curve, but above a marginal cost curve). The problem is:

Calculate
$\frac{\partial Area}{\partial z}$

where x and y, both functions of z, are sides of the triangle (let's let x be the base, and y be the height)

$Area = \frac{1}{2}x(z)y(z)$

Approach 1 — Geometric:
The change in the area of the triangle as z changes is the box formed by $x\frac{\partial y}{\partial z}$ plus the additional tiny triangle $1/2 \frac{\partial x}{\partial z} \frac{\partial y}{\partial z}$

Solution 1:

$\frac{\partial Area}{\partial z} = x\frac{\partial y}{\partial z} +1/2 \frac{\partial x}{\partial z} \frac{\partial y}{\partial z} $

Approach 2 — Algebraic:
Take the derivative of area with respect to z. Using product rule yields:

Solution 2:

$\frac{\partial Area}{\partial z} = 1/2(\frac{\partial y}{\partial z}x + y\frac{\partial x}{\partial z})$

if, as I think must be the case $\frac{\partial y}{\partial z}x =y\frac{\partial x}{\partial z} $, then this reduces to

$\frac{\partial Area}{\partial z} = \frac{\partial y}{\partial z}x$

which is just the "box" part of the above geometric approach.

What am I missing here? My instincts tell me the first one is correct, as the second seems wrong when thinking about it geometrically, but I can't tell how I screwed up the calculus.

Edit: heres a diagram showing where my geometric intuition is coming from: https://i.sstatic.net/67×81.jpg

Edit 2: I agree the second bit of solution 2 is incorrect

Best Answer

The geometric approach:

Easier to think of the triangle as half the rectangle rather than working with the triangle directly.

enter image description here

The area of the rectangle is $xy$

If we give x and y a little nudge, the area of the perturbed rectangle is $A = xy + y dx + x dy + dx\ dy$

But if $dx, dy$ are both small, then $dx\ dy$ will be very small and can be ignored.

$dA = x dy + y dx$ Which is the same thing the algebraic approach gives.

Now, if we are working with triangles then we can divide everything by 2.

$dA = \frac 12 (x\ dy + y\ dx)$

Related Question