# Find the maximum and minimum values

Find the maximum and minimum values of: $$4 \sin x + \frac{9}{1+\sin x}$$ For $0 \le x \le \pi$.

What I have done:

$$\frac{dy}{dx} = 4\cos x-\frac{9\cos x}{(1+\sin x)^2}$$

After equating the above to $0$, I found that $x=\pi/6$.

I do not know what to do next to find the maximum and minimum values. Any help would be appreciated.

-
The extreme values must occur at critical points or at endpoints of the interval. Calculate $f(\pi/6)$, $f(0)$, and $f(\pi)$, and compare the values. –  Brian M. Scott Jan 8 '13 at 18:19
Draw a picture first. The constraint $x \in [0,\pi]$ may be important, in which case you cannot just look for zeros of the derivative. –  copper.hat Jan 8 '13 at 18:19
If not sure on such questions it can be very useful to sketch a graph. –  Mark Bennet Jan 8 '13 at 18:19
@BrianM.Scott - you are assuming the function is continuous, which should probably be mentioned given the form it takes (ie note that discontinuities are outside the interval) –  Mark Bennet Jan 8 '13 at 18:22
@Mark: Not to worry: I was actually more amused than annoyed. This might have been better conveyed by ‘No, I know that the function is continuous, and I’m assuming (possibly incorrectly) that the OP will check this’! –  Brian M. Scott Jan 8 '13 at 18:37

First, notice that $\dfrac{\pi}{2}$ and $\dfrac{5\pi}{6}$ work as well. You can then use The Extreme Value Theorem. You merely plug in the critical values and the endpoints. The largest is the max, the smallest the min.

-
See Brian's comment above. Either the constraints are relevant or not at a solution. If not, using the derivative can characterize a solution, but if a constraint is active, care must be taken. A trivial example is to maximize $x^3$ subject to $|x|=1$. Clearly the solution is $x=1$, but the derivative is of no help here. –  copper.hat Jan 8 '13 at 18:25