In geometry, there are many problems in which we want to find the largest or smallest value of a function. As a function, we can consider the perimeter or area of a figure or, for example, the volume of a body. As an independent variable of the function, we can take a parameter of the figure or body such as the length of a side, the angle between two sides, etc. Once the function is composed, it is necessary to investigate it for extreme values using derivatives. It is important to bear in mind that the functions in such problems usually exist on a finite interval, which is determined by the geometry of the system and/or the conditions of the problem.

In this topic, we consider optimization problems involving \(2D\) geometry.

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

The point \(A\left( {a,b} \right)\) is given in the first quadrant of the coordinate plane. Draw a straight line passing through this point, which cuts from the first quadrant the triangle with the smallest area (Figure \(1a\)).### Example 2

Find the base \(a\) of an isosceles triangle with the legs \(b\) such that the inscribed circle has the largest possible area (Figure \(2a\)).### Example 3

A farmer wants to enclose a rectangular field with a fence and divide it in half with a fence parallel to one of the sides (Figure \(3a\)). The total length of the fence is \(L.\) What is the largest area of the field?### Example 4

An isosceles trapezoid is circumscribed about a circle of radius \(R\) (Figure \(4a\)). At what base angle \(\alpha\) the area of the shaded region is the smallest?### Example 5

A windows has the shape of a rectangle and surmounted by a semicircle (Figure \(5a\)). The perimeter of the window is \(P.\) Determine the radius of the semicircle \(R\) that will allow the greatest amount of light to enter.### Example 6

A rectangle with sides parallel to the coordinate axes and with one side lying along the \(x\)-axis is inscribed in the closed region bounded by the parabola \(y = c – {x^2}\) and the \(x\)-axis (Figure \(6a\)). Find the largest possible area of the rectangle.### Example 7

Find the maximum possible area of a rectangle inscribed in a semicircle of radius \(R\) with one of its sides on the diameter of the semicircle (Figure \(7a\)).### Example 8

A point \(A\) is given on the circumference of a circle of radius \(R\) (Figure \(8a\)). The chord \(BC\) is parallel to the tangent at \(A.\) Determine the distance between the point \(A\) and the chord \(BC\) at which the triangle \(ABC\) has the largest area.### Example 9

\(A\left( {1,0} \right)\) and \(B\left( {5,0} \right)\) are points on the \(x-\)axis (Figure \(9a\)). Find the \(y-\)coordinate of the point \(M\left( {0,y} \right)\) on the \(y-\)axis such that the angle \(\theta = \angle AMB\) has the maximum possible value.### Example 10

Two channels of width \(a\) and \(b\) are connected to each other at right angles (Figure \(10a\)). Determine the maximum length of logs that can be floated through this system of channels.### Example 11

The bridge from \(A( – 2,4)\) to \(M\left( {x,y} \right)\) spans a gorge which has the shape of the parabola \(y = {x^2}\) (Figure \(11a\)). Find the \(x-\)coordinate of the point \(M\) such that the bridge \(AM\) has the smallest length.### Example 12

A rectangle with sides parallel to the coordinate axes is inscribed in an ellipse (Figure \(12a\)) defined by the equation \[\frac{{{x^2}}}{{{a^2}}} + \frac{{{y^2}}}{{{b^2}}} = 1.\] Find the sides of the rectangle with the greatest area.### Example 13

Find the point \(M\left( {x,y} \right)\) on the graph of \(f\left( x \right) = \sqrt x \) that is closest to \(A\left( {a,0} \right)\) where \(a\) is a positive real number (Figure \(13a\)).### Example 14

The length of the altitude drawn from the hypotenuse of a right triangle is \(h\) (Figure \(14a\)). Determine the shortest length of the median drawn to the longest leg.### Example 15

A picture of height \(a\) is hung on a wall in such a way that its bottom edge is \(h\) units above the eye level. At what distance \(x\) should the observer stand from the wall to be the most favourable for viewing the picture (Figure \(15a\))?### Example 16

A rectangle is inscribed in a semicircle of radius \(R\) with one of its sides on the diameter of the semicircle (Figure \(16a\)). Find the maximum perimeter of the rectangle.### Example 17

Find the point \(M\left( {x,y} \right)\) on the parabola \(y = {x^2}\) assuming \(x \gt 0\) that is closest to \(B\left( {0,b} \right)\) where \(b\) is a positive real number (Figure \(17a\)).### Example 18

Two sides of a parallelogram lie on the sides of a triangle, and one vertex of the parallelogram belongs to the third side of the triangle (Figure \(18a\)). Find the conditions under which the area of the parallelogram is greatest.### Example 19

An isosceles trapezoid has base angles of 45 degrees and a perimeter \(L\) (Figure \(19a\)). What is the largest area of the trapezoid?### Example 1.

The point \(A\left( {a,b} \right)\) is given in the first quadrant of the coordinate plane. Draw a straight line passing through this point, which cuts from the first quadrant the triangle with the smallest area (Figure \(1a\)).Solution.

Consider the triangles \(OBC\) and \(MBA.\) These triangles are similar. Consequently, the following relation holds:

\[{\frac{{OC}}{{MA}} = \frac{{OB}}{{MB}}\;\;}\kern0pt{\text{or}\;\;\frac{y}{b} = \frac{x}{{x – a}},}\]

where the coordinates \(x\) and \(y\) satisfy the inequalities \(x > a,\) \(y > b.\) From the last equation we express \(y\) in terms of \(x:\)

\[y = \frac{{bx}}{{x – a}}.\]

The area of the triangle is described by the function \(S\left( x \right):\)

\[

{S\left( x \right) = \frac{{xy}}{2} = \frac{x}{2} \cdot \frac{{bx}}{{x – a}} }

= {\frac{{b{x^2}}}{{2\left( {x – a} \right)}}.}

\]

Compute the derivative:

\[

{S’\left( x \right) = {\left( {\frac{{b{x^2}}}{{2\left( {x – a} \right)}}} \right)^\prime } }

= {\frac{b}{2}{\left( {\frac{{{x^2}}}{{x – a}}} \right)^\prime } }

= {\frac{b}{2} \cdot \frac{{2x\left( {x – a} \right) – {x^2}}}{{{{\left( {x – a} \right)}^2}}} }

= {\frac{b}{2} \cdot \frac{{2{x^2} – 2ax – {x^2}}}{{{{\left( {x – a} \right)}^2}}} }

= {\frac{{bx\left( {x – 2a} \right)}}{{{{2\left( {x – a} \right)}^2}}}.}

\]

The function \(S\left( x \right)\) has the critical points \(x = 0,\) \(x = a,\) \(x = 2a.\) Since \(x > a,\) the solution is the point \(x = 2a.\) When passing through it the derivative changes sign from minus to plus, i.e. \(x = 2a\) is the minimum point of the function \(S\left( x \right).\)

Find the other leg of the triangle:

\[\require{cancel}

y = \frac{{bx}}{{x – a}} = \frac{{b \cdot 2a}}{{2a – a}} = \frac{{2\cancel{a}b}}{\cancel{a}} = 2b.

\]

Thus, the triangle with the smallest area has legs equal to \(2a\) and \(2b.\)

### Example 2.

Find the base \(a\) of an isosceles triangle with the legs \(b\) such that the inscribed circle has the largest possible area (Figure \(2a\)).Solution.

Let the area \(A\) of the triangle be the objective function to be maximized.

From the similar triangles \(\triangle OMC\) and \(\triangle CDB\) we get

\[{\frac{{CB}}{{CO}} = \frac{{DB}}{{OM}}}\]

or

\[{\frac{b}{{h – r}} = \frac{{\frac{a}{2}}}{r}},\]

where \(a\) is the base, \(h\) is the altitude, \(b\) is the leg of the isosceles triangle, \(r\) is the radius of the inscribed circle.

By Pythagorean theorem,

\[{{h^2} = {b^2} – {\left( {\frac{a}{2}} \right)^2} }={ {b^2} – \frac{{{a^2}}}{4} }={ \frac{{4{b^2} – {a^2}}}{4},\;}\Rightarrow {h = \frac{{\sqrt {4{b^2} – {a^2}} }}{2}.}\]

Then we have

\[{\frac{b}{{\frac{a}{2}}} = \frac{{h – r}}{r},\;} \Rightarrow {2br = a\left( {h – r} \right),\;} \Rightarrow {2br = a\left( {\frac{{\sqrt {4{b^2} – {a^2}} }}{2} – r} \right),\;} \Rightarrow {2br + ar = \frac{{\sqrt {4{b^2} – {a^2}} }}{2},\;} \Rightarrow \cssId{element11}{r = \frac{{a\sqrt {4{b^2} – {a^2}} }}{{2\left( {2b + a} \right)}} }={ r\left( a \right).}\]

The area of the triangle is given by

\[{A = \pi {r^2} }={ \pi {\left( {\frac{{a\sqrt {4{b^2} – {a^2}} }}{{2\left( {2b + a} \right)}}} \right)^2} }={ \frac{{\pi {a^2}\left( {4{b^2} – {a^2}} \right)}}{{4{{\left( {2b – a} \right)}^2}}} }={ \frac{{\pi {a^2}\left( {2b – a} \right)\left( {2b + a} \right)}}{{4{{\left( {2b – a} \right)}^2}}} }={ \frac{{\pi \left( {2{a^2}b + {a^3}} \right)}}{{4\left( {2b – a} \right)}} }={ f\left( a \right).}\]

The derivative \(f^\prime\left( a \right)\) can be calculated using the quotient rule. It is written in the form

\[{f^\prime\left( a \right) }={ \left( {\frac{{\pi \left( {2{a^2}b + {a^3}} \right)}}{{4\left( {2b – a} \right)}}} \right)^\prime }={ \frac{{a\left( {4{b^2} – 2ab – {a^2}} \right)}}{{2\left( {2b + a} \right)}}.}\]

Determine the critical points:

\[{f^\prime\left( a \right) = 0,\;} \Rightarrow {\frac{{a\left( {4{b^2} – 2ab – {a^2}} \right)}}{{2\left( {2b + a} \right)}} = 0,\;} \Rightarrow {\left[ {\begin{array}{*{20}{l}} {{a_1} = 0}\\ {4{b^2} – 2ab – {a^2} = 0} \end{array}} \right..}\]

Solve the quadratic equation:

\[{4{b^2} – 2ab – {a^2} = 0,\;} \Rightarrow {{a^2} + 2ba – 4{b^2} = 0,\;} \Rightarrow {D = 4{b^2} + 4 \cdot 4{b^2} = 20{b^2},\;} \Rightarrow {{a_{2,3}} = \frac{{ – 2b \pm \sqrt {20{b^2}} }}{2} }={ – b \pm b\sqrt 5 .}\]

There is only one non-trivial positive root:

\[a = b\sqrt 5 – b = {b\left( {\sqrt 5 – 1} \right)}.\]

Using the first derivative test, we find that \(a = b\left( {\sqrt 5 – 1} \right)\) is a point of maximum. Hence, the isosceles triangle has the largest area when \(a = b\left( {\sqrt 5 – 1} \right).\)

### Example 3.

A farmer wants to enclose a rectangular field with a fence and divide it in half with a fence parallel to one of the sides (Figure \(3a\)). The total length of the fence is \(L.\) What is the largest area of the field?Solution.

The length of the fence is given by the formula

\[L = 3y + 2x,\]

where \(x\) and \(y\) are the sides of the rectangle.

It follows from here that

\[y = \frac{{L – 2x}}{3}.\]

Then the area of the rectangle is written as a function of one variable:

\[{A = xy }={ x \cdot \frac{{L – 2x}}{3} }={ \frac{L}{3}x – \frac{2}{3}{x^2}.}\]

Take the derivative:

\[{A^\prime\left( x \right) = \left( {\frac{L}{3}x – \frac{2}{3}{x^2}} \right)^\prime }={ \frac{L}{3} – \frac{4}{3}x.}\]

Determine the critical point:

\[{A^\prime\left( x \right) = 0,\;} \Rightarrow {\frac{L}{3} – \frac{4}{3}x = 0,\;} \Rightarrow {x = \frac{L}{4}.}\]

We can use the Second Derivative Test to classify this critical point:

\[{A^{\prime\prime}\left( x \right) }={ \left( {\frac{L}{3} – \frac{4}{3}x} \right)^\prime }={ – \frac{4}{3} \lt 0.}\]

Hence, we have a maximum here. The other side of the rectangle is equal

\[{y = \frac{{L – 2x}}{3} }={ \frac{{L – 2 \cdot \frac{L}{4}}}{3} }={ \frac{{L – 2 \cdot \frac{L}{4}}}{3} }={ \frac{L}{6}.}\]

The maximum area of the field is given by

\[{{A_{\max }} = xy }={ \frac{L}{4} \cdot \frac{L}{6} }={ \frac{{{L^2}}}{{24}}.}\]

### Example 4.

An isosceles trapezoid is circumscribed about a circle of radius \(R\) (Figure \(4a\)). At what base angle \(\alpha\) the area of the shaded region is the smallest?Solution.

The area of an isosceles trapezoid is determined by the formula

\[{S_T} = \frac{{a + b}}{2} \cdot h,\]

where \(a, b\) are the bases of the trapezoid, \(h\) is its height. Obviously, \(h = 2R.\) The area of the circle is \({S_K} = \pi {R^2}.\) Then the area of the shaded region is

\[

{S = {S_T} – {S_K}} = {\frac{{a + b}}{2} \cdot 2R – \pi {R^2} }

= {\left( {a + b} \right)R – \pi {R^2}.}

\]

Since the trapezoid is circumscribed about a circle, the sum of opposite sides is the same, that is

\[

{a + b = 2\ell\;\;\text{or}\;\;}\kern0pt

{a + b = 2 \cdot \frac{{2R}}{{\sin \alpha }} }

= {\frac{{4R}}{{\sin \alpha }}.}

\]

Here \(\ell\) indicates the leg of the trapezoid. Substituting \(\left( {a + b} \right)\) in the previous relation, we get

\[

{S = S\left( \alpha \right) = \frac{{4R}}{{\sin \alpha }} \cdot R – \pi {R^2} }

= {{R^2}\left( {\frac{4}{{\sin \alpha }} – \pi } \right).}

\]

Investigate the area \(S\left( \alpha \right)\) for extreme values. Calculate the derivative \(S’\left( \alpha \right):\)

\[

{S’\left( \alpha \right) = {\left[ {{R^2}\left( {\frac{4}{{\sin \alpha }} – \pi } \right)} \right]^\prime } }

= {4{R^2}\left( { – \frac{1}{{{{\sin }^2}\alpha }}} \right) \cdot \cos \alpha }

= { – \frac{{4{R^2}\cos \alpha }}{{{{\sin }^2}\alpha }}.}

\]

It is evident that the derivative is zero provided

\[\cos \alpha = 0,\;\; \Rightarrow \alpha = \frac{\pi }{2},\]

and when passing through this point (with increasing \(\alpha\)) the derivative changes sign from minus to plus. Consequently, \(\alpha = \large\frac{\pi }{2}\normalsize\) is the minimum of the function \(S\left( \alpha \right).\) In this case, the trapezoid becomes a square. The minimum value of the area is determined by the formula

\[{S_{\min }} = {R^2}\left( {4 – \pi } \right).\]

### Example 5.

A windows has the shape of a rectangle and surmounted by a semicircle (Figure \(5a\)). The perimeter of the window is \(P.\) Determine the radius of the semicircle \(R\) that will allow the greatest amount of light to enter.Solution.

Obviously, one side of the rectangle is equal to \(2R.\) We denote the other side by \(y.\) The perimeter of the window is given by

\[P = \pi R + 2R + 2y.\]

Hence, we find \(y:\)

\[y = \frac{1}{2}\left[ {P – \left( {\pi + 2} \right)R} \right].\]

The area of the window is as follows:

\[

{S = \frac{{\pi {R^2}}}{2} + 2Ry }

= {\frac{{\pi {R^2}}}{2} + 2R \cdot \frac{1}{2}\left[ {P – \left( {\pi + 2} \right)R} \right] }

= {\frac{{\pi {R^2}}}{2} + PR – \pi {R^2} – 2{R^2} }

= {PR – \frac{{\pi {R^2}}}{2} – 2{R^2}.}

\]

The resulting expression is a function \(S\left( R \right).\) We investigate its extreme points. Find the derivative:

\[

{S’\left( R \right) = {\left( {PR – \frac{{\pi {R^2}}}{2} – 2{R^2}} \right)^\prime } }

= {P – \pi R – 4R }

= {P – \left( {\pi + 4} \right)R.}

\]

Determine the stationary points:

\[

{S’\left( R \right) = 0,\;\;}\Rightarrow

{P – \left( {\pi + 4} \right)R = 0,\;\;}\Rightarrow

{R = \frac{P}{{\pi + 4}}.}

\]

Since the second derivative is negative:

\[

{S^{\prime\prime}\left( R \right) = {\left[ {P – \left( {\pi + 4} \right)R} \right]^\prime } }

= { – \left( {\pi + 4} \right) \lt 0,}

\]

then this point is a maximum, i.e. the area of the window will be the greatest at this value of \(R.\)

The maximum value of the area is equal to

\[

{{S_{\max }} = PR – \frac{{\pi {R^2}}}{2} – 2{R^2} }

= {P\left( {\frac{P}{{\pi + 4}}} \right) – \left( {\frac{\pi }{2} + 2} \right){\left( {\frac{P}{{\pi + 4}}} \right)^2} }

= {\frac{{{P^2}}}{{\pi + 4}} – \frac{{\left( {\cancel{\pi + 4}} \right){P^2}}}{{2{{\left( {\pi + 4} \right)}^{\cancel{2}}}}} }

= {\frac{{2{P^2} – {P^2}}}{{2\left( {\pi + 4} \right)}} }

= {\frac{{{P^2}}}{{2\left( {\pi + 4} \right)}}.}

\]

### Example 6.

A rectangle with sides parallel to the coordinate axes and with one side lying along the \(x\)-axis is inscribed in the closed region bounded by the parabola \(y = c – {x^2}\) and the \(x\)-axis (Figure \(6a\)). Find the largest possible area of the rectangle.Solution.

Let \(M\left( {x,y} \right)\) be the vertex of the rectangle belonging to the parabola (Figure \(6a\)).

The lengths of the sides of the rectangle are \(2x\) and \(y.\) Its area is

\[

{S\left( x \right) = 2xy }

= {2x\left( {c – {x^2}} \right) }

= {2cx – 2{x^3}.}

\]

Investigate extreme values of the function \(S\left( x \right).\) The derivative is written as

\[S’\left( x \right) = {\left( {2cx – 2{x^3}} \right)^\prime } = 2c – 6{x^2}.\]

Equating the derivative to zero, we find the stationary points:

\[

{S’\left( x \right) = 0,\;\;}\Rightarrow

{2c – 6{x^2} = 0,\;\;}\Rightarrow

{{x^2} = \frac{c}{3},\;\;}\Rightarrow

{x = \pm \sqrt {\frac{c}{3}}.}

\]

Obviously, both roots correspond to the same rectangle. Make sure that the point \(\sqrt {\large\frac{c}{3}\normalsize} \) is a maximum point of the function \(S\left( x \right).\) We check this by using the second derivative:

\[S^{\prime\prime}\left( x \right) = {\left( {2c – 6{x^2}} \right)^\prime } = – 12x \lt 0.\]

Since \(S^{\prime\prime}\left( x \right) \lt 0,\) then \(\sqrt {\large\frac{c}{3}\normalsize} \) is the maximum point.

Calculate the maximum area of the inscribed rectangle:

\[

{{S_{\max }} = 2\sqrt {\frac{c}{3}} \left[ {c – {{\left( {\sqrt {\frac{c}{3}} } \right)}^2}} \right] }

= {2\sqrt {\frac{c}{3}} \cdot \frac{{2c}}{3} }

= {4\sqrt {{{\left( {\frac{c}{3}} \right)}^3}}.}

\]

### Example 7.

Find the maximum possible area of a rectangle inscribed in a semicircle of radius \(R\) with one of its sides on the diameter of the semicircle (Figure \(7a\)).Solution.

Suppose that the area of the rectangle \(A = ab\) is the objective function. By Pythagorean theorem,

\[{{R^2} = {\left( {\frac{a}{2}} \right)^2} + {b^2},\;} \Rightarrow {{R^2} = \frac{{{a^2}}}{4} + {b^2},\;} \Rightarrow {b = \sqrt {{R^2} – \frac{{{a^2}}}{4}} .}\]

Hence, the area of the rectangle is given by

\[{A = ab }={ a\sqrt {{R^2} – \frac{{{a^2}}}{4}} }={ \frac{a}{2}\sqrt {4{R^2} – {a^2}} .}\]

Check for the values at the endpoints:

\[{A\left( 0 \right) }={ \frac{0}{2}\sqrt {4{R^2} – {0^2}} }={ 0;}\]

\[\require{cancel}{A\left( {2R} \right) }={ \frac{{\cancel{2}R}}{\cancel{2}}\sqrt {4{R^2} – {{\left( {2R} \right)}^2}} }={ 0.}\]

Find the derivative using the product rule:

\[{A^\prime\left( a \right) }={ \left( {\frac{a}{2}\sqrt {4{R^2} – {a^2}} } \right)^\prime }={ \left( {\frac{a}{2}} \right)^\prime \cdot \sqrt {4{R^2} – {a^2}} }+{ \frac{a}{2} \cdot \left( {\sqrt {4{R^2} – {a^2}} } \right)^\prime }={ \frac{1}{2} \cdot \sqrt {4{R^2} – {a^2}} }+{ \frac{a}{2} \cdot \frac{{\left( { – 2a} \right)}}{{2\sqrt {4{R^2} – {a^2}} }} }={ \frac{{\sqrt {4{R^2} – {a^2}} }}{2} – \frac{{{a^2}}}{{2\sqrt {4{R^2} – {a^2}} }} }={ \frac{{4{R^2} – {a^2} – {a^2}}}{{2\sqrt {4{R^2} – {a^2}} }} }={ \frac{{2{R^2} – {a^2}}}{{\sqrt {4{R^2} – {a^2}} }}.}\]

Determine the critical point(s):

\[{A^\prime\left( a \right) = 0,\;} \Rightarrow {\frac{{2{R^2} – {a^2}}}{{\sqrt {4{R^2} – {a^2}} }} = 0,\;} \Rightarrow {\left\{ {\begin{array}{*{20}{l}} {2{R^2} – {a^2} = 0}\\ {\sqrt {4{R^2} – {a^2}} \ne 0} \end{array}} \right.,\;} \Rightarrow {\left\{ {\begin{array}{*{20}{l}} {a = \sqrt 2 R}\\ {a \ne 2R} \end{array}} \right..}\]

We have two critical points \(a = \sqrt{2}R\) and \(a = 2R,\) but as at the second point \(a = 2R\) the area of the rectangle is zero, further we will consider only the first point \(a = \sqrt{2}R.\)

The derivative is positive to the left of this point, and negative to the right. Therefore \(a = \sqrt{2}R\) is a point of maximum. The maximum value of the area of the rectangle is given by

\[{{A_{\max }} }={ A\left( {\sqrt 2 R} \right) }={ \frac{{\sqrt 2 R}}{2}\sqrt {4{R^2} – {{\left( {\sqrt 2 R} \right)}^2}} }={ \frac{{\sqrt 2 R}}{2}\sqrt {4{R^2} – 2{R^2}} }={ \frac{{\sqrt 2 R}}{2} \cdot \sqrt 2 R }={ {R^2}.}\]