# Challenge I came up with: what is the maximum area of the rectangle inscribed between the line y=sintheta, x=theta and x=pi-theta?

## I conjured up this problem randomly, so I'm not sure if my wording is right. What is the maximum area for a rectangle inscribed in the curve $y = \sin x$? What value of $\theta$ would there be for this?

Feb 5, 2018

$\text{Area} \approx 1.12219267638209 \ldots$

#### Explanation:

Let us set up the following variables:

 { (x,"width of the rectangle"), (y, "height of the rectangle"), (A, "Area of the rectangle ") :}

Our aim is to find an area function, $A \left(x , y , \theta\right)$ and eliminate the variables so that we can find the critical points wrt to the single variable $\theta$.

The width of the rectangle is:

$x = \left(\pi - \theta\right) - \left(\theta\right) = \pi - 2 \theta$

The Height of the rectangle is:

$y = \sin \theta$

The Area of the rectangle is given by:

$A = \text{width" xx "height}$
$\setminus \setminus \setminus = x y$
$\setminus \setminus \setminus = \left(\pi - 2 \theta\right) \sin \theta$ ..... [*]

Differentiating wrt $\theta$, using the product rule, we get:

$\frac{\mathrm{dA}}{d \theta} = \left(\pi - 2 \theta\right) \left(\cos \theta\right) + \left(- 2\right) \left(\sin \theta\right)$

At a critical point (a minimum or a maximum) we require that the derivative, $\frac{\mathrm{dA}}{d \theta}$ vanish, thus we require:

$\left(\pi - 2 \theta\right) \cos \theta - 2 \sin \theta = 0$
$\therefore 2 \sin \theta = \left(\pi - 2 \theta\right) \cos \theta$

$\therefore 2 \sin \frac{\theta}{\cos} \theta = \pi - 2 \theta$

$\therefore 2 \tan \theta = \pi - 2 \theta$

We cannot solve this equation analytically and so we must use Numerical Techniques, the solution gainied is:

$\theta \approx 0.710462737775517 \ldots$

And so,

$A = \left(\pi - 2 \theta\right) \sin \theta$
$\setminus \setminus \setminus \approx 1.12219267638209$

We need to establish that this value of $\theta$ corresponds to a maximum. This should be intuitive, but we can validate via a graph of the result [*] (or we could perform the second derivative test):
graph{(pi-2x)sin x [-2, 3, -2, 2.2]}

And we can verify that a maximum when $x \approx 0.7$ of $\approx 1.1$ is consistent with the graph.