# Find the Maximum and Minimum of a Function

### Solution 1

The domain of $f$ is $x\in [0,13].$ We have

\begin{align} f(x)&=\sqrt{x+27}+\sqrt{13-x}+\sqrt{x}\\ &=\sqrt{x+27}+\sqrt{13+2\sqrt{x(13-x)}}\\ &\ge\sqrt{27}+\sqrt{13}=3\sqrt{3}+\sqrt{13}, \end{align}

with equality for $x=0.$ Therefore, the minimum of the function is $3\sqrt{3}+\sqrt{13}.$

For the maximum, the Cauchy-Schwarz inequality gives

\displaystyle\begin{align} f^2(x)&=(\sqrt{x+27}+\sqrt{13-x}+\sqrt{x})^2\\ &\le \left(\frac{1}{2}+1+\frac{1}{3}\right)[2x+(x+27)+3(13-x)]\\ &=121.\end{align}

Equality holds when $4x=9(13-x)=x+27,$ with the only solution $x=9.$ Therefore, the maximum of $f(x)$ is $f(9)=11.$

### Solution 2

Define $r=\sqrt{x+27},$ $s=\sqrt{13-x},$ $t=\sqrt{x}.$ Then $r^2+s^2=40$ and $s^2+t^2=13.$ Use Lagrange multipliers:

\displaystyle\begin{align}F(r,s,t,\lambda,\mu)&=r+s+t-\lambda(r^2+s^2)-\mu(s^2+t^2)\\ F_r&=1-2\lambda r=0\\ F_s&=1-2\lambda s-2\mu s=0\\ F_t&=1-2\mu t=0\end{align}

It follows that $\displaystyle \frac{1}{4\lambda^2}+\frac{1}{4(\lambda+\mu)^2}=40$ and $\displaystyle \frac{1}{4\mu^2}+\frac{1}{4(\lambda+\mu)^2}=13.$ Thus $\displaystyle \lambda=\frac{1}{12}$ and $\displaystyle \mu=\frac{1}{6}.$ Further, $r=6,$ $s=2,$ $t=3$ and $F_{max}=6+3+2=11,$ attained at $x=t^2=9.$

### Acknowledgment

This is a problem from a 2009 Chinese Mathematical Competition I found in a book Mathematical Olympiad in China (2009-2010): Problems and Solutions by Xiong Bin and Lee Peng Yee(World Scientific, 2013, 27-28).

Solution 2 is by Sam Walters.

### A Sample of Optimization Problems

• Mathematicians Like to Optimize
• Reshuffling knights - castle defenders
• Isoperimetric Theorem and Inequality
• Viewing a Statue: the Problem of Regiomontanus
• Fagnano's Problem
• Minimax Principle Demonstration
• Maximum Perimeter Property of the Incircle
• Extremal Problem in a Circular Segment
• Optimization in Four Variables with Two Constraints
• Daniel Dan's Optimization in Three Variables
• Problem in a Special Trapezoid
• Cubic Optimization with Linear Constraints
• Cubic Optimization with Partly Linear Constraints
• Problem M317 from Crux Mathematicorum
• Area of Isosceles Triangle
• Minimum of Cotangents from Saint Petersburg