Hello, G-Rex!

Imagine a fenced-in area composed of a rectangle with one side being a semicircle.

The perimeter of this fence is 498 feet.

Maximize the area of this pen. Code:

* * *
* *
* *
* *
* - - - - * - - - - *
| r r |
| |
x | | x
| |
| |
*-------------------*
2r

The radius of the semicircle is $\displaystyle r.$

Hence, the length of the rectangle is $\displaystyle 2r.$

Let the width of the rectangle be $\displaystyle x.$

The semicircle has perimeter $\displaystyle \pi r.$

The rectangular portion of the pen has perimeter $\displaystyle 2r + 2x$

We have: .$\displaystyle \pi r + 2r + 2x \:=\:498\quad\Rightarrow\quad x \:=\:\frac{498-(\pi+2)r}{2}\;\;{\color{blue}[1]}$

The area of the semicircle is: .$\displaystyle \frac{1}{2}\pi r^2$

The area of the rectangle is: .$\displaystyle (2r)(x) \:=\:2rx$

The area of the pen is: .$\displaystyle A \;=\;\frac{1}{2}\pi r^2 + 2rx\;\;{\color{blue}[2]} $

Substitute [1] into [2]: .$\displaystyle A \;=\;\frac{1}{2}\pi r^2 + 2r\left(\frac{498-(\pi+2)r}{2}\right)$

. . which simplifies to: .$\displaystyle A \;=\;498r - \left(\frac{\pi+4}{2}\right)r^2$

And that is the function we must maximize . . .