Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
2  
(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? –  whuber Apr 11 '13 at 3:39
2  
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. –  Jens Apr 11 '13 at 3:44
1  
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? –  ppkjref Apr 11 '13 at 3:45
    
the graph looks like Plot[x^2, {x, -2, 2}, GridLines -> {{1}, {0}}] –  ppkjref Apr 11 '13 at 4:14

2 Answers 2

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}}

share|improve this answer
    
Simple and instructive. +1 –  Mr.Wizard Apr 12 '13 at 17:53
    
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? –  BoLe Apr 12 '13 at 21:32
    
@BoLe. I imagine it's because there isn't a (local) minimum at $x=1$. –  m_goldberg Apr 12 '13 at 23:37
    
It is a minimum, and it's more local to x = 2/3. :) –  BoLe Apr 13 '13 at 0:31
    
@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. –  m_goldberg Apr 13 '13 at 6:45

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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