1
$\begingroup$

I am trying to find the area of the largest rectangle (whose sides are parallel to the coordinate axes) contained in the region bounded by the graphs of $y = 0, y = x^2,$ and $x = 1$ using Mathematica. I am not sure where to begin other than that the area of a rectangle is $l w$. Any ideas?

$\endgroup$
  • 2
    $\begingroup$ (1) Have you plotted the graphs yet? (2) The easier version of this problem assumes the rectangle's sides are parallel to the coordinate axes. The harder version does not make this assumption. Which version do you want to solve? $\endgroup$ – whuber Apr 11 '13 at 3:39
  • 2
    $\begingroup$ In a situation where you're not sure how to begin, it's usually best to try doing it by hand instead of jumping straight into Mathematica. $\endgroup$ – Jens Apr 11 '13 at 3:44
  • 1
    $\begingroup$ whuber - The problem assumes the rectangle's sides are parallel to the coordinate axis. Jens - writing it down by hand I believe I would just substitute y with x^2 and then find the derivative? $\endgroup$ – ppkjref Apr 11 '13 at 3:45
  • $\begingroup$ the graph looks like Plot[x^2, {x, -2, 2}, GridLines -> {{1}, {0}}] $\endgroup$ – ppkjref Apr 11 '13 at 4:14
8
$\begingroup$

There are several ways to investigate this problem in Mathematica. The first thing I might do would be to build a Manipulate panel that lets me explore the problem space.

Manipulate[
  Plot[t^2, {t, 0., 1.},
    AspectRatio -> Automatic,
    Epilog -> {Red,
      Line[{{x, 0}, {x, x^2}}],
      Line[{{1, 0}, {1, x^2}}],
      Line[{{x, x^2}, {1, x^2}}]}],
  {{x, N[2/3]}, 0., 1., Appearance -> "Labeled"}]

Manipulate image

The red rectangle has dimensions x^2 by 1 - x, so it is a good idea to plot the expression (x^2) (1 - x), which represents the area.

Plot[(x^2) (1 - x), {x, 0., 1.}]

Plot image

This shows a maximum near 0.66, which suggests the answer might be something like (2/3)^2 (1 - 2/3) = 4/27.

To confirm this, use Maximize.

Maximize[{(x^2 ) (1 - x), x > 0 && x <= 1}, {x}]

{4/27, {x -> 2/3}}

| improve this answer | |
$\endgroup$
  • $\begingroup$ Simple and instructive. +1 $\endgroup$ – Mr.Wizard Apr 12 '13 at 17:53
  • $\begingroup$ In an analogous manner Minimize[{(1 - x) x^2, 0 <= x <= 1}, x] searches for minimum area x's. Do you have any idea why it doesn't return x -> 1 too? $\endgroup$ – BoLe Apr 12 '13 at 21:32
  • $\begingroup$ @BoLe. I imagine it's because there isn't a (local) minimum at $x=1$. $\endgroup$ – m_goldberg Apr 12 '13 at 23:37
  • $\begingroup$ It is a minimum, and it's more local to x = 2/3. :) $\endgroup$ – BoLe Apr 13 '13 at 0:31
  • $\begingroup$ @BoLe. The expression (x^2) (1 - x) has no minimum at $x=1$. Don't confuse the algebraic expression with its interpretation as an area. $\endgroup$ – m_goldberg Apr 13 '13 at 6:45
0
$\begingroup$

For starter try and see that any rectangle will have first corner at some 0 <= x <= 1. That makes its area P(x) = (1 - x) * x^2 which has two extreme values:

Solve[D[(1 - x) x^2, x] == 0, x]

(* {{x -> 0}, {x -> 2/3}} *)

Mminimum, ie. zero at x = 0 (rectangle as a line; also at x = 1) and maximum at x = 2/3 with area 1/3 * (2/3)^2.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.