Optimization Problems

Perhaps the most important application of the derivatives is solving the optimization problems.

With the help of derivatives, we can find the minimum and maximum values. That's exactly what we need in optimization problems.

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.

  1. Read the problem and understand it clearly. Define the known and the unknown variables based on the given conditions.
  2. In most cases (if not in all), it is useful to draw a diagram for understanding the problem better.
  3. Assign a symbol to the quantity that is to be maximized or minimized (for example, let it be P{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{A} for area, h{h} for height, or t{t} for time.
  4. Express P{P} in terms of some other symbols from Step 3.
  5. If P{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 PP as a function of one variable. Thus, PP will be expressed as a function of one variable xx, say, P=f(x)P=f\left({x}\right).
  6. Write the real domain of the function ff in compliance with the conditions of the problem.
  7. Using differential calculus, find the absolute maximum (or minimum) value of ff. In particular, if the domain of ff is a closed interval, then the closed interval method can be used.
  8. 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?maximum area of fence

Let's start with the diagram. We wish to maximize the area of the rectangle A{A}. Let x{x} and y{y} be the width and the length of the rectangle (in feet). Then, we express A{A} terms of x{x} and y{y}: A=xy{A}={x}{y}.

We want to express A{A} as a function of just one variable; so, we eliminate y{y} by expressing it in terms of x{x}. To do this, we use the given information that the total length of the fencing is 2000 ft. Thus, 2x+y=2000{2}{x}+{y}={2000}, or y=20002x{y}={2000}-{2}{x}.

Therefore, A=xy=x(20002x)=2000x2x2{A}={x}{y}={x}{\left({2000}-{2}{x}\right)}={2000}{x}-{2}{{x}}^{{2}}.

Note that x0{x}\ge{0} and x1000{x}\le{1000} (otherwise, A<0{A}<{0}). So, the function that we wish to maximize is A(x)=2000x2x2,{A}{\left({x}\right)}={2000}{x}-{2}{{x}}^{{2}}, 0x1000{0}\le{x}\le{1000}.

The derivative is A(x)=20004x{A}'{\left({x}\right)}={2000}-{4}{x}.

To find the stationary points, we solve the equation A(x)=20004x=0{A}'{\left({x}\right)}={2000}-{4}{x}={0}, which gives x=500{x}={500}.

The maximum value occurs either at this stationary point or at the endpoints of the interval.

Since A(0)=0{A}{\left({0}\right)}={0}, A(500)=500000{A}{\left({500}\right)}={500000}, and A(1000)=0{A}{\left({1000}\right)}={0}, the closed interval method gives the maximum value as A(500)=500000{A}{\left({500}\right)}={500000}.

Thus, the width of the rectangular field should be x=500ftx=500ft, and the length should be y=20002x=1000ft{y}={2000}-{2}{x}={1000}{f{{t}}}.

Let's work another example.

Example 2. Find the point on the parabola y=12x2{y}=\frac{{1}}{{2}}{{x}}^{{2}} closest to the point (4,1)(-4,1).

The distance between the point (x,y){\left({x},{y}\right)} and (4,1){\left(-{4},{1}\right)} is d=(x(4))2+(y1)2=(x+4)2+(y1)2{d}=\sqrt{{{{\left({x}-{\left(-{4}\right)}\right)}}^{{2}}+{{\left({y}-{1}\right)}}^{{2}}}}=\sqrt{{{{\left({x}+{4}\right)}}^{{2}}+{{\left({y}-{1}\right)}}^{{2}}}}.

But since the point (x,y){\left({x},{y}\right)} lies on the parabola, we have that y=12x2{y}=\frac{{1}}{{2}}{{x}}^{{2}} and d=(x+4)2+(12x21)2{d}=\sqrt{{{{\left({x}+{4}\right)}}^{{2}}+{{\left(\frac{{1}}{{2}}{{x}}^{{2}}-{1}\right)}}^{{2}}}}.

To make things easier, we minimize d2{{d}}^{{2}} instead of d{d} (if d{d} has a minimum, then d2{{d}}^{{2}} has a minimum at the same point).

So, f(x)=d2=(x+4)2+(12x21)2{f{{\left({x}\right)}}}={{d}}^{{2}}={{\left({x}+{4}\right)}}^{{2}}+{{\left(\frac{{1}}{{2}}{{x}}^{{2}}-{1}\right)}}^{{2}}.

Using the chain rule, we obtain f(x)=2(x+4)(x+4)+2(12x21)(12x21)=2(x+4)+2x(12x21)={f{'}}{\left({x}\right)}={2}{\left({x}+{4}\right)}\cdot{\left({x}+{4}\right)}'+{2}{\left(\frac{{1}}{{2}}{{x}}^{{2}}-{1}\right)}\cdot{\left(\frac{{1}}{{2}}{{x}}^{{2}}-{1}\right)}'={2}{\left({x}+{4}\right)}+{2}{x}{\left(\frac{{1}}{{2}}{{x}}^{{2}}-{1}\right)}=

=x3+8={{x}}^{{3}}+{8}.

So, f(x)=0{f{'}}{\left({x}\right)}={0} when x3+8=0{{x}}^{{3}}+{8}={0}, or x=2{x}=-{2}.

Since, f(x)<0{f{'}}{\left({x}\right)}<{0} when x<2{x}<-{2} and f(x)>0{f{'}}{\left({x}\right)}>{0} when x>2{x}>-{2}, the first derivative test gives that x=2{x}=-{2} is the absolute minimum.

Now, y=12x2=12(2)2=2{y}=\frac{{1}}{{2}}{{x}}^{{2}}=\frac{{1}}{{2}}{{\left(-{2}\right)}}^{{2}}={2}.

Therefore, the point that lies on y=12x2{y}=\frac{{1}}{{2}}{{x}}^{{2}} closest to the point (4,1){\left(-{4},{1}\right)} is (2,2){\left(-{2},{2}\right)}. The corresponding minimum distance is d=(2+4)2+(21)2=5{d}=\sqrt{{{{\left(-{2}+{4}\right)}}^{{2}}+{{\left({2}-{1}\right)}}^{{2}}}}=\sqrt{{{5}}}.

Now, we are going to face a slightly more complex example.

Example 3. Suppose that a man is standing at the point AA and wants to reach the point DD as quickly as possible. He could row his boat directly across the river that is 4 km wide to the point BB and then run to DD, or he could row directly to DD, or he could row to some point between BB and DD and then run to DD. If he can row at 5kmh{5}\frac{{{k}{m}}}{{h}} and run at 9kmh{9}\frac{{{k}{m}}}{{h}}, where should he land to reach DD as soon as possible? Assume that the speed of the water is 00. The distance between BB and CC is 8 km.minimum boating time

Let x{x} be the distance in km from BB to CC; then, the running distance CD=8BC=8x{\left|{C}{D}\right|}={8}-{\left|{B}{C}\right|}={8}-{x}.

From the right-angled triangle ABCABC, using the Pythagorean theorem, we have AC2=AB2+BC2{{\left|{A}{C}\right|}}^{{2}}={{\left|{A}{B}\right|}}^{{2}}+{{\left|{B}{C}\right|}}^{{2}}, or AC2=42+x2{{\left|{A}{C}\right|}}^{{2}}={{4}}^{{2}}+{{x}}^{{2}}, which gives AC=x2+16{\left|{A}{C}\right|}=\sqrt{{{{x}}^{{2}}+{16}}}.

Since time equals distance divided by speed, the time to row the boat is x2+165\frac{{\sqrt{{{{x}}^{{2}}+{16}}}}}{{5}}, and the time to run is 8x9\frac{{{8}-{x}}}{{9}}.

So, the total time is T(x)=x2+165+8x9{T}{\left({x}\right)}=\frac{{\sqrt{{{{x}}^{{2}}+{16}}}}}{{5}}+\frac{{{8}-{x}}}{{9}}.

The domain of this function is [0,8]{\left[{0},{8}\right]}. Note that if x=0{x}={0}, the man rows to BB, and if x=8{x}={8}, he rows directly to DD.

T(x)=1512x2+16(x2+16)19=x5x2+1619{T}'{\left({x}\right)}=\frac{{1}}{{5}}\cdot\frac{{1}}{{{2}\sqrt{{{{x}}^{{2}}+{16}}}}}\cdot{\left({{x}}^{{2}}+{16}\right)}'-\frac{{1}}{{9}}=\frac{{x}}{{{5}\sqrt{{{{x}}^{{2}}+{16}}}}}-\frac{{1}}{{9}}.

T(x)=0{T}'{\left({x}\right)}={0} when x5x2+1619=0\frac{{x}}{{{5}\sqrt{{{{x}}^{{2}}+{16}}}}}-\frac{{1}}{{9}}={0}, or x5x2+16=19\frac{{x}}{{{5}\sqrt{{{{x}}^{{2}}+{16}}}}}=\frac{{1}}{{9}}.

This gives 9x=5x2+16{9}{x}={5}\sqrt{{{{x}}^{{2}}+{16}}}, or 81x2=25(x2+16){81}{{x}}^{{2}}={25}{\left({{x}}^{{2}}+{16}\right)}.

Thus, x2=507{{x}}^{{2}}=\frac{{50}}{{7}}, or x=527{x}={5}\sqrt{{\frac{{2}}{{7}}}} (we don't take 527-{5}\sqrt{{\frac{{2}}{{7}}}} because this value is not in the domain of T{T}).

Now, using the closed interval method, we calculate that T(0)=76451.69{T}{\left({0}\right)}=\frac{{76}}{{45}}\approx{1.69}, T(527)=9527+19(8527)1.55{T}{\left({5}\sqrt{{\frac{{2}}{{7}}}}\right)}=\frac{{9}}{{5}}\sqrt{{\frac{{2}}{{7}}}}+\frac{{1}}{{9}}{\left({8}-{5}\sqrt{{\frac{{2}}{{7}}}}\right)}\approx{1.55}, and T(8)=451.79{T}{\left({8}\right)}=\frac{{4}}{\sqrt{{{5}}}}\approx{1.79}.

Since the smallest of these values occurs when x=527{x}={5}\sqrt{{\frac{{2}}{{7}}}}, the absolute minimum value of T{T} occurs there.

Thus, the man should land the boat at the point CC, which is 5272.67{5}\sqrt{{\frac{{2}}{{7}}}}\approx{2.67} km from the point BB.

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{a} inches by cutting out equal squares of the side x{x} at each corner and then folding up the sides. What should be x{x} in order to maximize the volume of the box?biggest volume of box with given side

Since we cut out a piece of the length x{x}, the side of the square box is a2x{a}-{2}{x}, the height of the box is x{x} (the part that we fold up); so, the volume of the box is V(x)=x(a2x)2{V}{\left({x}\right)}={x}{{\left({a}-{2}{x}\right)}}^{{2}}.

Thus, we need to maximize V(x)=x(a2x)2{V}{\left({x}\right)}={x}{{\left({a}-{2}{x}\right)}}^{{2}} on the interval [0,a2]{\left[{0},\frac{{a}}{{2}}\right]} (note that x{x} can't be greater than a2\frac{{a}}{{2}}).

We have that Vx=(a2x)2+2x(a2x)(2)=(a2x)(a2x4x)={V}_{{x}}'={{\left({a}-{2}{x}\right)}}^{{2}}+{2}{x}{\left({a}-{2}{x}\right)}\cdot{\left(-{2}\right)}={\left({a}-{2}{x}\right)}{\left({a}-{2}{x}-{4}{x}\right)}=

=(a2x)(a6x)={\left({a}-{2}{x}\right)}{\left({a}-{6}{x}\right)}.

So, V(x)=0{V}'{\left({x}\right)}={0} when x=a2{x}=\frac{{a}}{{2}} (endpoint) and x=a6{x}=\frac{{a}}{{6}}.

Now, calculate the values of the function at the endpoints and the stationary points:

V(0)=0{V}{\left({0}\right)}={0}, V(a2)=0{V}{\left(\frac{{a}}{{2}}\right)}={0}, V(a6)=a6(a2a6)2=2a327{V}{\left(\frac{{a}}{{6}}\right)}=\frac{{a}}{{6}}{{\left({a}-{2}\frac{{a}}{{6}}\right)}}^{{2}}=\frac{{{2}{{a}}^{{3}}}}{{27}}.

The greatest value is 2a327\frac{{{2}{{a}}^{{3}}}}{{27}}; so, the maximum occurs when x=a6{x}=\frac{{a}}{{6}}.

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{r}.

Solution 1. Let's take the semicircle to be the upper half of a circle x2+y2=r2{{x}}^{{2}}+{{y}}^{{2}}={{r}}^{{2}} 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. maximum inscribed rectangle into semicircle

Let (x,y){\left({x},{y}\right)} be the vertex that lies in the first quadrant. Then, the rectangle has the sides of the lengths 2x{2}{x} and y{y}; so, its area is A=2xy{A}={2}{x}{y}.

To eliminate y{y}, we use the fact that the point (x,y){\left({x},{y}\right)} lies on the circle; so, x2+y2=r2{{x}}^{{2}}+{{y}}^{{2}}={{r}}^{{2}}, or y=r2x2{y}=\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}.

Therefore, A=2xr2x2{A}={2}{x}\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}} for 0xr{0}\le{x}\le{r}.

Using the product rule and the chain rule, we obtain that A(x)=(2x)r2x2+2x(r2x2)=2r2x2+xr2x2(r2x2)={A}'{\left({x}\right)}={\left({2}{x}\right)}'\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}+{2}{x}{\left(\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}\right)}'={2}\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}+\frac{{x}}{{\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}}}\cdot{\left({{r}}^{{2}}-{{x}}^{{2}}\right)}'=

=2r2x22x2r2x2=2r22x2r2x2={2}\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}-\frac{{{2}{{x}}^{{2}}}}{{\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}}}={2}\frac{{{{r}}^{{2}}-{2}{{x}}^{{2}}}}{{\sqrt{{{{r}}^{{2}}-{{x}}^{{2}}}}}}.

We have to find the maximum of A(x){A}{\left({x}\right)} on the closed interval [0,r]{\left[{0},{r}\right]}.

So, A(x)=0{A}'{\left({x}\right)}={0} when r22x2=0{{r}}^{{2}}-{2}{{x}}^{{2}}={0}, or x=r2{x}=\frac{{r}}{{\sqrt{{{2}}}}} (we don't take r2-\frac{{r}}{{\sqrt{{{2}}}}} because x{x} should be non-negative).

Now, check the endpoints: A(0)=0{A}{\left({0}\right)}={0}, A(r)=0{A}{\left({r}\right)}={0}.

Since A(r2)=2(r2)r2(r2)2=r2>0{A}{\left(\frac{{r}}{\sqrt{{{2}}}}\right)}={2}{\left(\frac{{r}}{\sqrt{{{2}}}}\right)}\sqrt{{{{r}}^{{2}}-{{\left(\frac{{r}}{\sqrt{{{2}}}}\right)}}^{{2}}}}={{r}}^{{2}}>{0}, the maximum occurs when x=r2{x}=\frac{{r}}{{\sqrt{{{2}}}}}.

The largest possible area is r2{{r}}^{{2}}.

Solution 2. There is another solution. Connect the center of the circle with the point (x,y){\left({x},{y}\right)}. If θ\theta is the angle between the drawn line and the positive direction of the x-axis, then x=rcos(θ){x}={r}{\cos{{\left(\theta\right)}}} and y=rsin(θ){y}={r}{\sin{{\left(\theta\right)}}}.

The area can be rewritten as A=2xy=2rcos(θ)rsin(θ)=r2sin(2θ){A}={2}{x}{y}={2}{r}{\cos{{\left(\theta\right)}}}{r}{\sin{{\left(\theta\right)}}}={{r}}^{{2}}{\sin{{\left({2}\theta\right)}}}.

Since sin(2θ)1{\sin{{\left({2}\theta\right)}}}\le{1}, the maximum occurs when sin(2θ)=1{\sin{{\left({2}\theta\right)}}}={1}, or 2θ=π2{2}\theta=\frac{\pi}{{2}}, which gives θ=π4\theta=\frac{\pi}{{4}}.

In this case, A=r2{A}={{r}}^{{2}}, x=rcos(π4)=r2{x}={r}{\cos{{\left(\frac{\pi}{{4}}\right)}}}=\frac{{r}}{{\sqrt{{{2}}}}}, and y=rsin(π4)=r2{y}={r}{\sin{{\left(\frac{\pi}{{4}}\right)}}}=\frac{{r}}{{\sqrt{{{2}}}}}, which are the same answers as in Solution 1.

Note that in Solution 2 we didn't use the derivatives and calculus at all.