Jump to content

Maximizing ab

Featured Replies

Suppose a, b, and n are positive integers and a + b = n. For what values of a and b maximize ab?

 

The only way I know of maximizing ab is by drawing a table of values and comparing numbers. It seems though that if n = 2k, then the maximum is obtained when a = b = k. If n = 2k + 1, the maximum is obtain when a = k and b = k + 1. Is there an intuitive way of showing/deriving this though. I can't seem to think of anything.

Is there an intuitive way of showing/deriving this though. I can't seem to think of anything.
Yes, I believe there is, using Calculus.

 

We wish to maximize [math]x \cdot y[/math] subject to the constraint [math]x+y=n[/math]. Therefore, [math]y=n-x[/math], so our problem is equivalent to maximizing [math]f(x)=x(n-x)=nx-x^2[/math].

 

Taking the first derivative, (and noting that [math]f(x)[/math] is a downward pointing parabola, and thus, has only one local extrema, a global maximum), we get that [math]f'(x)=n-2x[/math], therefore the local maxima is at [math]x=n/2[/math].

 

Thus, if [math]x=2k[/math] ([math]k[/math] an integer), the maxima is at [math]x=k[/math], and substituting [math]x[/math] into the constraint equation implies that [math]y=k[/math] as well. However, if [math]n=2k+1[/math], then the maxima is achieved at [math]x = (2k+1)/2=k+1/2[/math], which is not an integer. Therefore, the closest integers are [math]x=k[/math] and [math]x=k+1[/math], which are both a distance of [math]1/2[/math] away from [math]x[/math], and thus, both optimal integer solutions. Again, applying the constraint equation shows that these [math]x[/math]-values correspond to [math]y=k+1[/math] and [math]y=k[/math] respectively.

 

If you have any questions about my explanation, I will gladly expound any requested points.

Haven't learnt any calculus.

what's the difference between calculus and function?

Haven't learnt any calculus.

what's the difference between calculus and function?

Calculus is the name of a particular area of Mathematics, like Algebra, or Geometry, or Analysis. A decent definition of the term "function" is located here http://mathworld.wolfram.com/Function.html
  • Author

I feel very ashamed now. This problem was so easy. Maybe it's a sign that I'm getting dumber.

If you solve too many complicated problems you sometimes tend to overlook the obvious ones.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.