# Math Help - Using calculus to prove cosine inequality

1. ## Using calculus to prove cosine inequality

I’m not very good with the calculus of functions of two variables so I need someone to check my working below.

Prove that if x, y, z are the interior angles of a triangle, then $\cos{x}+\cos{y}+\cos{z}\leq\frac{3}{2}$.

I decided to use calculus to prove the result, so I defined a function of two variables

$\mathrm{f}(x,y)\ =\ \cos{x}+\cos{y}+\cos{(\pi-x-y)}\ =\ \cos{x}+\cos{y}-\cos{(x+y)}$

So

$\frac{\partial f}{\partial x}\ =\ -\sin{x}+\sin{(x+y)}$

$\frac{\partial f}{\partial y}\ =\ -\sin{y}+\sin{(x+y)}$

$\frac{\partial f}{\partial x}\ =\ \frac{\partial f}{\partial y}\ =\ 0\ \Rightarrow\ \sin{(x+y)}\ =\ \sin{x}\ =\ \sin{y}$

Since $0\lneqq x,y\lneqq\pi$, we must have $x+y\ =\ \pi-x\ =\ \pi-y\ \Rightarrow\ x\ =\ y\ =\ \frac{\pi}{3}$.

Now

$\frac{\partial^2f}{\partial x^2}\ =\ -\cos{x}+\cos{(x+y)}$

$\frac{\partial^2f}{\partial y^2}\ =\ -\cos{y}+\cos{(x+y)}$

$\frac{\partial^2f}{\partial x\partial y}\ =\ \cos{(x+y)}$

$\therefore\ \left(\frac{\partial^2f}{\partial x^2}\right)\left(\frac{\partial^2f}{\partial y^2}\right)-\left(\frac{\partial^2f}{\partial x\partial y}\right)^2\ =\ \cos{x}\cos{y}-\cos{(x+y)}(\cos{x}+\cos{y})$

When $x=y=\frac{\pi}{3}$,

$\frac{\partial^2f}{\partial x^2}\ =\ -\frac{1}{4}\ <\ 0$ and

$\frac{\partial^2f}{\partial x^2}\frac{\partial^2f}{\partial y^2}-\left(\frac{\partial^2f}{\partial x\partial y}\right)^2\ =\ \frac{3}{8}\ >\ 0$

Hence f(x,y) has a maximum at $x=y=\frac{\pi}{3}\ (=z)$, which is $\frac{3}{2}$.

$\therefore\ \cos{x}+\cos{y}+\cos{z}\leq\frac{3}{2}$ for all the angles x, y, z of a triangle. Is my working all okay?

2. I do not like this approach. Because this only tells you if have a local minimum.
We have that $0\leq x,y,z\leq \pi$ and $x+y+z = \pi$.
Thus, you need to minimize $f(x,y,z) = \cos x + \cos y + \cos z$ on the surface in the first octant bounded by the pane $x+y+z=\pi$. By Extreme Value Theorem there will exists a minimimum now use partial derivatives to find all the critical points and just compute their values to see which one is the smallest one (no 2nd partials test here). But the problem is you also need to check the boundary of this surface which is going to take a lot of time.

Have you tried doing this without any calculus let $a,b,c$ be sides of the triangle then $\cos x = \frac{a^2 + b^2 - c^2}{2ab}$ and so on. And proving it from there?

3. Originally Posted by JaneBennet

$\frac{\partial f}{\partial x}\ =\ -\sin{x}+\sin{(x+y)}$

$\frac{\partial f}{\partial y}\ =\ -\sin{y}+\sin{(x+y)}$

$\frac{\partial f}{\partial x}\ =\ \frac{\partial f}{\partial y}\ =\ 0\ \Rightarrow\ \sin{(x+y)}\ =\ \sin{x}\ =\ \sin{y}$
Wouldn't
$\frac{\partial f}{\partial x}\ =\ \frac{\partial f}{\partial y}\ =\ 0$

Imply
$-sin(x) + sin(x + y) = -sin(y) + sin(x + y)$

$sin(x) = sin(y)$

How did you get
$sin(x + y) = sin(x) = sin(y)$?

-Dan