# Maximize $f(x) = x^3-3x$ subject to constraints

I would like to understand more about how to maximise functions of one variable subject to constraints.

How can you find the maximum value of $f(x) = x^3 - 3x$ subject to $x^4+36 \leq 13x^2$?

The answer is apparently $f(x) = 18$ at $x=3$, but if this is true, how can you derive it without a computer?

-
Do you know how to take a derivative? – Ross Millikan Apr 15 '13 at 18:04
@RossMillikan Yes. It is the constraint I don't know how to handle. – user66151 Apr 15 '13 at 18:07
The derivative won't help here. The values that give zero violate the constraint. – John Douma Apr 15 '13 at 18:10
@user69810: The derivative does help, because without computing the derivative (or something similar), you don't know if there are any critical points in the feasible region. – Hurkyl Apr 15 '13 at 18:28
@Hurkyl This is a simple function. $x^{3}$ dominates $3x$ for values of $x>1$. Thus, to maximize this function you take the farthest value to the right which is allowed. In this case that is $x = 3$. – John Douma Apr 15 '13 at 18:40

The extreme value for a differentiable function can either come at a point where the derivative is zero or at the end of the interval of definition. You can take the derivative, getting $f'(x)=3x^2-3$ and find it is zero at $x = \pm 1$, then check those points and find $f(-1)=2, f(1)=-2$. Unfortunately, as we will see, these violate the constraint. Then you need to check the ends of the interval of definition. To have $x^4+36 \le 13x^2$ we need $(x-3)(x-2)(x+2)(x+3) \le 0$ so the function is defined on $[2,3]$ and $[-3,-2]$ You need to evaluate $f(x)$ at those four endpoints and take the greatest.

-
Thanks. That's very clear. Just on a formal note, is this fact about differentiable functions taking extreme values either where the derivative is zero or at the end of the interval of definition stated in a known theorem? The extreme value theorem seems not to cover it exactly unless I am misreading it. – user66151 Apr 15 '13 at 18:22
@motl737: I don't find a name for it. There is a discussion here but it doesn't give a name. – Ross Millikan Apr 15 '13 at 19:27

So the difficult part is the constrain:
$x^4-13x^2+36\leq0\iff(x^2-4)(x^2-9)\leq0\iff(x-2)(x+2)(x-3)(x+3)\leq0\ldots$

-

There are two parts to this.

The first part would be to rearrange the constraint equation to be $x^4-13x^2+36 \leq 0$. By using derivitves, we can find the zeroes of this function, and they occur at $x = \pm 2$ and $x = \pm 3$. Also by using derivatives, we can find the function is decreasing on the intervals $(-\infty, -\sqrt{\frac{13}{2}})$ and $(0, \sqrt{\frac{13}{2}})$ and increasing on the intervals $(-\sqrt{\frac{13}{2}},0)$ and $(\sqrt{\frac{13}{2}},\infty)$. Thus we know that the function satisfies the constraint on the intervals $[-3,-2]$ and $[2,3]$.

The second part is simply finding the maximum values of the function on these intervals, which you can do with derivatives, which you stated you know how to calculate. See here if you don't already know how to do this.

-

Hint: $x^4 - 13x^2 + 36 = (x^2 - 9)(x^2 - 4)$

Use this and the fact extrema for continuous functions defined on a closed interval occur at critical points or on the boundary of the interval

-