One centimenter is 0.01 meters. So, you can write the measures as

Once this rewriting is done, getting the total length
is quite trivial, since all measurements are in the same unit, and we can simply sum everything:

You're looking for the extreme values of
subject to the constraint
.
The target function has partial derivatives (set equal to 0)


so there is only one critical point at
. But this point does not fall in the region
. There are no extreme values in the region of interest, so we check the boundary.
Parameterize the boundary of
by


with
. Then
can be considered a function of
alone:



has critical points where
:



but
for all
, so this case yields nothing important.
At these critical points, we have temperatures of


so the plate is hottest at (1, 0) with a temperature of 14 (degrees?) and coldest at (-1, 0) with a temp of -12.
S(p) = 400 - 4p + 0.00002p^4
D(p) = 2800 - 0.0012p^3
S(p) = D(p)
400 - 4p + 0.00002p^4 = 2800 - 0.0012p^3
0.00002p^4 + 0.0012p^3 - 4p - 2400 = 0
p = $96.24
He had 40 pencils left after he gave away 8, so originally he had 40 + 8 pencils, which is 48.
Now, he bought 4 packages, which had a total of 48 pencils, so divide 48 by 4, which is 12. He had 12 pencils in each package.
To determine the solution arithmetically, first add 8 to 40, then divide 48 by 4.
To determine the solution algebraically, set up and solve the equation 40 = 4x - 8.
Each package contained 12 pencils.
Hope this helps