Here is a way of obtaining the result that you want.
Define the expression to be maximised, using a + b + c == Pi
to eliminate c
.
expr = r Cos[a] + s Cos[b] + t Cos[Pi - a - b];
Solve for the stationary points w.r.t. a
and b
.
sol = Solve[D[expr, a] == 0 && D[expr, b] == 0, {a, b}]
(* Lots of ConditionalExpression due to the periodicity of the expression being maximised *)
Substitute the solutions back into the expression. Then post-process the result in several stages: (1) FullSimplify
using that {r, s, t} > 0
, (2) Refine
to remove the degeneracy due to periodicity, and (3) Expand
to write the results nicely.
expr0 = expr /. sol //
FullSimplify[#, {r, s, t} > 0] & //
Refine[#, C[1] \[Element] Integers && C[2] \[Element] Integers] & //
Expand
(*
{
r + s - t,
r - s + t,
-r + s + t,
-r - s - t,
(r s)/(2 t) + (r t)/(2 s) + (s t)/(2 r),
(r s)/(2 t) + (r t)/(2 s) + (s t)/(2 r)
}
*)
Check all of these stationary values against the conjectured upper bound.
ForAll[{r, s, t}, {r, s, t} > 0,
expr0 <= (r s)/(2 t) + (r t)/(2 s) + (s t)/(2 r)] // Resolve
(* True *)
=
is not equivalent to==
. $\endgroup$