So far the partial derivatives have told us what a single step brings: one degree more, one baker more. Now the question is a different one: where do you stop so that the result is as large as possible?
A pottery workshop makes two things, mugs and plates. Right now it makes 10 of each a day and earns 90 € profit. There is enough clay and room in the kiln for any plan, so it can choose freely. How many of each should it make for the largest profit?
The owner works out a few plans. The best of them is 12 mugs and 14 plates, 98 € a day. From there, any step in one of the two, up or down, lowers the profit:
Mugs
Plates
Profit a day
10
10
90 €
12
14
98 €
13
14
96 €
11
14
96 €
12
15
97 €
12
13
97 €
This is what a peak looks like: there, a small step in one quantity adds nothing. So at this point both partial derivatives are zero. That is why the method does not try out plans but goes straight for the point where both derivatives are zero. It is called a stationary point (“stationärer Punkt”). The formula of this profit and the peak found from it are in example 2 of the section “Stationary point: maximum, minimum or saddle point”.
A flat spot is not enough, though. There are three kinds of flat spot:
Where it is flat
Where a step from there leads
a peak
downhill in every direction
the bottom of a hollow
uphill in every direction
a pass between two mountains
uphill one way, downhill the other
A point like the pass is called a saddle point (“Sattelpunkt”). Whether you have a peak, a hollow or a saddle is decided by a single number made from the second derivatives, the determinant of the Hessian matrix (“Hesse-Matrix”).
The second task of the article is the same, only you choose two prices instead of two quantities. Partial and second derivatives are explained in the article “Functions of two variables”. The Hessian matrix at a point is covered in the section “Hessian matrix at a point: four second derivatives” of the article “Partial derivatives and the chain rule”. In both tasks of this article the two numbers can be chosen freely. If the choice is limited, for example by a budget or a set quantity (“Nebenbedingung”), you need the Lagrange method.
At a glance
The workshop chose two quantities. The second task of the article chooses two prices, but the way to the answer is the same: a flat spot, then a check that it is a peak. The overview shows it for both:
You need a maximum, minimum or saddle of a function of x and y (“stationäre Stelle”, stationary point). There both partial derivatives are zero, and D from fxx, fyy and fxy decides the type.
D==fxx⋅⋅fyy−−(fxy)2
Trap:forgetting the square on fxy or calling it a maximum when D<0; a negative D means a saddle.
A seller sets two prices p1 and p2, and the demand for each good depends on both. The margin p1−k1 times the quantity x1, the same for the second good, minus the fixed cost F.
G==(p1−−k1)x1++(p2−−k2)x2−−F
Trap:forgetting the second good when differentiating by p1; x2 depends on p1 too.
Stationary point: maximum, minimum or saddle point
The owner of the workshop found the peak by trial, stepping one item in each direction. The first exam task gives a formula, and the peak is found from it without trial:
Exam-style task
Die Funktion
g(x,y)==−x2−−2xy−−2y2++2x++10y−−6
hat ein lokales Maximum. Welche Koordinaten (x,y) hat es?
a)(3,−4)
b)(−3,4)
c)(−7,6)
d)(8,−3)
e)(7,−6)
How to recognise the task. “Stationäre Stelle” (stationary point), “lokales Maximum” (local maximum), “Sattelpunkt” (saddle point), “Gewinnmaximum” (maximum profit) for two products without a constraint. Sometimes the point is already given, and only its type is asked for.
The meaning of D follows right below the list.
Steps: Set both derivatives to zero → Solve the system → Hessian determinant → Type and value.
Formula sheet (“Formelsammlung”, the printed sheet): not on it.
Memorise:D>0 and fxx<0 maximum, D>0 and fxx>0 minimum, D<0 saddle point.
On a peak or in a hollow the surface is level in both directions, therefore fx=0 and fy=0. Such a point is called stationary. What lies there is decided by the determinant of the Hessian matrix:
D=fxx⋅fyy−(fxy)2
D>0 and fxx<0: maximum. D>0 and fxx>0: minimum. D<0: saddle point (in one direction the function rises, in the other it falls, like a saddle). At D=0 the test says nothing.
Setting both derivatives to zero gives the coordinates of the maximum.
gx=−2x−2y+2=0 and gy=−2x−4y+10=0.
Subtract the first equation from the second: −2y+8=0, y=4. From the first, x=1−y=−3.
gxx=−2, gyy=−4, gxy=−2: D=(−2)⋅(−4)−(−2)2=4>0.
D>0 and gxx<0: a maximum. The answer is (−3,4).
The profit of two products is G(x,y)=−2x2−y2+2xy+20x+4y−50. Where is the maximum profit, and how large is it? The figure shows the two lines on which Gx=0 and Gy=0; the stationary point is where they cross.
Gx=−4x+2y+20=0, Gy=2x−2y+4=0.
From the second y=x+2; into the first: −2x+24=0, x=12, y=14.
Gxx=−4, Gyy=−2, Gxy=2; D=8−4=4>0.
Gxx<0: maximum, G(12,14)=98 €.
For a quadratic function the second derivatives are numbers. With higher powers they depend on the point. Then they are worked out at each stationary point separately, as in the example with two such points just below.
Two stationary points. For f=x3−27x+y2−6y: fx=3x2−27=0 gives x2=9, x=3 or x=−3; fy=2y−6=0 gives y=3. The second ones: fxx=6x, fyy=2, fxy=0, so D=12x. At (3,3), D=36>0 and fxx=18>0: minimum, f=−63. At (−3,3), D=−36<0: saddle point. Check each point on its own.
Trap. Forgetting the square: in example 2 this gives D=8−2=6, which happens to be positive too, but in other tasks the sign flips. Answering with the point (12,14) when the profit 98 is asked for.
Your turn1 of 2
The function f(x,y)=x3−6xy+3y2 has a stationary point at (2,2). What lies there?
Which two prices give the largest profit
In the first task the firm decided how much to make. In the second it sets two prices. How much of each good is bought depends on both prices at once:
Exam-style task
Ein Fahrradverleih bietet Stadträder (Gut 1) und E-Bikes (Gut 2) an. Die Nachfrage hängt von beiden Preisen ab (p1, p2 in GE, Mengen in ME pro Monat):
{x1=520−8p1+p2x2=559+p1−5p2
Jede Einheit kostet 31 GE (Gut 1) bzw. 30 GE (Gut 2), dazu kommen Fixkosten von 800 GE im Monat. Wie hoch ist der größte Monatsgewinn, den die Firma mit gut gewählten Preisen erreichen kann?
a)2975
b)11605
c)13045
d)13755
e)13406
How to recognise the task. The seller sets the prices of two products (“zwei Güter”, two goods; “Preispaar (p1,p2)”, pair of prices). Given are two demand functions of the form x1=a−bp1+cp2, the unit cost of each product and the fixed costs.
The profit from one product is the margin per piece times the quantity. Both quantities depend on both prices, so the product rule (article on the derivative) gives:
Gp2 likewise. The fixed costs F give 0 when differentiated.
Steps: Set up the profit from the demand functions → Differentiate with respect to both prices → Solve the linear system → Check the maximum.
Formula sheet:R(p)=p⋅D(p) (price p times demand D(p)) and π(p)=R(p)−C(D(p)) for one product (in the part on differential calculus). On the formula sheet the profit is π, the revenue R, the cost C; here the profit is G (from “Gewinn”), the unit costs k1, k2 and the fixed cost F.
Memorise:G=(p1−k1)x1+(p2−k2)x2−F; Gp1 has three terms.
The fixed costs 800 do not change the prices; they are subtracted only at the end.
G=(p1−31)⋅x1+(p2−30)⋅x2−800 with x1=520−8p1+p2 and x2=559+p1−5p2.
Gp1=x1+(p1−31)⋅(−8)+(p2−30)⋅1=738−16p1+2p2 and Gp2=(p1−31)⋅1+x2+(p2−30)⋅(−5)=678+2p1−10p2.
From 16p1−2p2=738 and −2p1+10p2=678 we get p1=56 and p2=79.
Gp1p1=−16<0 and D=(−16)⋅(−10)−22=156>0: a maximum. The quantities x1=520−448+79=151 and x2=559+56−395=220, the profit 25⋅151+49⋅220−800=13755.
A firm sells two products with demand x1=44−2p1+p2 and x2=20+p1−2p2, unit costs 4 and 2 €, fixed costs 100 €. Which prices give the largest profit?
Trap. Forgetting the cross term (p2−k2)⋅∂p1∂x2, so working out each product on its own, or leaving out the unit costs and maximising the revenue. Give the pair in the order in which it is asked for.
Your turn2 of 2
For two products x1=50−2p1+p2 and x2=40+p1−3p2. The unit costs are 5 and 4 €, the fixed costs 300 €. Which price p2 gives the maximum profit?
Formula sheet and what to memorise
From this article a single line made it onto the formula sheet, the one on revenue and profit. The stationary point and the Hessian test you have to know by heart.
On the formula sheet:
revenue and profit as functions of the price: section “Which two prices give the largest profit”
Memorise yourself:
stationary point: fx=0 and fy=0 (section “Stationary point”)
D=fxxfyy−(fxy)2; D>0 and fxx<0 maximum, D>0 and fxx>0 minimum, D<0 saddle, at D=0 the test says nothing (section “Stationary point”)
two prices: G=(p1−k1)x1+(p2−k2)x2−F, every derivative with respect to a price has three terms (section “Which two prices give the largest profit”)