[Math] Optimization calculus Problem

calculusoptimization

I have a calculus final coming up and was going over a practice exam my professor gave me and I came across a problem I was struggling with. I would post a picture but I am having trouble posting a picture So the problem reads.

The rectangle shown here has one side on the positive $x$-axis, one side on the positive $y$-axis, and its upper right hand vertex on the curve $y=e^{-x^2}$. What dimensions give the rectangle its largest area?

Keep In mind I already have the answer that’s not what I’m looking for, I’m searching for the process to arrive at the answer and the necessary work. BTW The answer is $x=1/\sqrt{2}$ and $y=e^{-1/2}$. Thank you for the help.

Best Answer

Your rectangle is defined by the four points (0,0), (x,0), (x,y) and (0,y). The area of the rectangle i defined by A = x y but the right corner must be along the curve y = Exp[-x^2]. So, the area is given by A = x Exp[-x^2] and this must be maximized. Then, as usual, we go to the derivative which is
dA/dx = Exp[-x^2] (1 - 2 x^2)
At the extremum, the derivative must be zero and then this happens for x = 1 / Sqrt[2] and x = -1 / Sqrt[2]. Since the problem is symetric, we shall only consider the positive value. For this value of x, then y = Exp[-x^2] gives Exp[-1/2] and the maximum area is 1 / Sqrt[2 e].
We finally need to confirm that this is a maximum; so, as usual, we go to the second derivative which is
d2A/dx2 = x Exp[-x^2] (2 x^2 - 3)
For x = 1 / Sqrt[2], the second derivative is then negative and this confirms that we obtained a maximum value.