But before working out a couple of examples, let's see what steps should be taken prior to transforming a real-life problem into a mathematical one.
Read the problem and understand it clearly. Define the known and the unknown variables based on the given conditions.
In most cases (if not in all), it is useful to draw a diagram for understanding the problem better.
Assign a symbol to the quantity that is to be maximized or minimized (for example, let it be P). Also, select the symbols for other unknown quantities and label the diagram with these symbols. It may be helpful to use the initials as suggestive symbols: for example, A for area, h for height, or t for time.
Express P in terms of some other symbols from Step 3.
If P was expressed as a function of more than one variable in Step 4, use the given information to find the relationships (in the form of equations) between these variables. Then, use these equations to obtain P as a function of one variable. Thus, P will be expressed as a function of one variable x, say, P=f(x).
Write the real domain of the function f in compliance with the conditions of the problem.
Using differential calculus, find the absolute maximum (or minimum) value of f. In particular, if the domain of f is a closed interval, then the closed interval method can be used.
Interpret the obtained result.
Example 1. A man wants to fence off a rectangular field and use a wall as one side. He has 2000 ft of fencing. What are the dimensions of the field that has the largest area?
Let's start with the diagram. We wish to maximize the area of the rectangle A. Let x and y be the width and the length of the rectangle (in feet). Then, we express A terms of x and y: A=xy.
We want to express A as a function of just one variable; so, we eliminate y by expressing it in terms of x. To do this, we use the given information that the total length of the fencing is 2000 ft. Thus, 2x+y=2000, or y=2000−2x.
Therefore, A=xy=x(2000−2x)=2000x−2x2.
Note that x≥0 and x≤1000 (otherwise, A<0). So, the function that we wish to maximize is A(x)=2000x−2x2,0≤x≤1000.
The derivative is A′(x)=2000−4x.
To find the stationary points, we solve the equation A′(x)=2000−4x=0, which gives x=500.
The maximum value occurs either at this stationary point or at the endpoints of the interval.
Since A(0)=0, A(500)=500000, and A(1000)=0, the closed interval method gives the maximum value as A(500)=500000.
Thus, the width of the rectangular field should be x=500ft, and the length should be y=2000−2x=1000ft.
Let's work another example.
Example 2. Find the point on the parabola y=21x2 closest to the point (−4,1).
The distance between the point (x,y) and (−4,1) is d=(x−(−4))2+(y−1)2=(x+4)2+(y−1)2.
But since the point (x,y) lies on the parabola, we have that y=21x2 and d=(x+4)2+(21x2−1)2.
To make things easier, we minimize d2 instead of d (if d has a minimum, then d2 has a minimum at the same point).
So, f(x)=d2=(x+4)2+(21x2−1)2.
Using the chain rule, we obtain f′(x)=2(x+4)⋅(x+4)′+2(21x2−1)⋅(21x2−1)′=2(x+4)+2x(21x2−1)=
=x3+8.
So, f′(x)=0 when x3+8=0, or x=−2.
Since, f′(x)<0 when x<−2 and f′(x)>0 when x>−2, the first derivative test gives that x=−2 is the absolute minimum.
Now, y=21x2=21(−2)2=2.
Therefore, the point that lies on y=21x2 closest to the point (−4,1) is (−2,2). The corresponding minimum distance is d=(−2+4)2+(2−1)2=5.
Now, we are going to face a slightly more complex example.
Example 3. Suppose that a man is standing at the point A and wants to reach the point D as quickly as possible. He could row his boat directly across the river that is 4 km wide to the point B and then run to D, or he could row directly to D, or he could row to some point between B and D and then run to D. If he can row at 5hkm and run at 9hkm, where should he land to reach D as soon as possible? Assume that the speed of the water is 0. The distance between B and C is 8 km.
Let x be the distance in km from B to C; then, the running distance ∣CD∣=8−∣BC∣=8−x.
From the right-angled triangle ABC, using the Pythagorean theorem, we have ∣AC∣2=∣AB∣2+∣BC∣2, or ∣AC∣2=42+x2, which gives ∣AC∣=x2+16.
Since time equals distance divided by speed, the time to row the boat is 5x2+16, and the time to run is 98−x.
So, the total time is T(x)=5x2+16+98−x.
The domain of this function is [0,8]. Note that if x=0, the man rows to B, and if x=8, he rows directly to D.
T′(x)=51⋅2x2+161⋅(x2+16)′−91=5x2+16x−91.
T′(x)=0 when 5x2+16x−91=0, or 5x2+16x=91.
This gives 9x=5x2+16, or 81x2=25(x2+16).
Thus, x2=750, or x=572 (we don't take −572 because this value is not in the domain of T).
Now, using the closed interval method, we calculate that T(0)=4576≈1.69, T(572)=5972+91(8−572)≈1.55, and T(8)=54≈1.79.
Since the smallest of these values occurs when x=572, the absolute minimum value of T occurs there.
Thus, the man should land the boat at the point C, which is 572≈2.67 km from the point B.
You will find these tasks much easier with practice, so let's do some more work.
Example 4. A box with an open top is to be constructed from a square piece of metal with a side of a inches by cutting out equal squares of the side x at each corner and then folding up the sides. What should be x in order to maximize the volume of the box?
Since we cut out a piece of the length x, the side of the square box is a−2x, the height of the box is x (the part that we fold up); so, the volume of the box is V(x)=x(a−2x)2.
Thus, we need to maximize V(x)=x(a−2x)2 on the interval [0,2a] (note that x can't be greater than 2a).
We have that Vx′=(a−2x)2+2x(a−2x)⋅(−2)=(a−2x)(a−2x−4x)=
=(a−2x)(a−6x).
So, V′(x)=0 when x=2a (endpoint) and x=6a.
Now, calculate the values of the function at the endpoints and the stationary points:
V(0)=0, V(2a)=0, V(6a)=6a(a−26a)2=272a3.
The greatest value is 272a3; so, the maximum occurs when x=6a.
Now, let's solve our final example.
Example 5. Find the area of the largest rectangle that can be inscribed in a semicircle of the radius r.
Solution 1. Let's take the semicircle to be the upper half of a circle x2+y2=r2 with the center at the origin. Then, the word 'inscribed' means that the rectangle has two vertices on the semicircle and two vertices on the x-axis.
Let (x,y) be the vertex that lies in the first quadrant. Then, the rectangle has the sides of the lengths 2x and y; so, its area is A=2xy.
To eliminate y, we use the fact that the point (x,y) lies on the circle; so, x2+y2=r2, or y=r2−x2.
Therefore, A=2xr2−x2 for 0≤x≤r.
Using the product rule and the chain rule, we obtain that A′(x)=(2x)′r2−x2+2x(r2−x2)′=2r2−x2+r2−x2x⋅(r2−x2)′=
=2r2−x2−r2−x22x2=2r2−x2r2−2x2.
We have to find the maximum of A(x) on the closed interval [0,r].
So, A′(x)=0 when r2−2x2=0, or x=2r (we don't take −2r because x should be non-negative).
Now, check the endpoints: A(0)=0, A(r)=0.
Since A(2r)=2(2r)r2−(2r)2=r2>0, the maximum occurs when x=2r.
The largest possible area is r2.
Solution 2. There is another solution. Connect the center of the circle with the point (x,y). If θ is the angle between the drawn line and the positive direction of the x-axis, then x=rcos(θ) and y=rsin(θ).
The area can be rewritten as A=2xy=2rcos(θ)rsin(θ)=r2sin(2θ).
Since sin(2θ)≤1, the maximum occurs when sin(2θ)=1, or 2θ=2π, which gives θ=4π.
In this case, A=r2, x=rcos(4π)=2r, and y=rsin(4π)=2r, which are the same answers as in Solution 1.
Note that in Solution 2 we didn't use the derivatives and calculus at all.