Putnam 2003, Problem A-3

Find the minimum value of
\[
|\sin x + \cos x + \tan x + \cot x + \sec x + \csc x|
\]
for real numbers \( x \).

Solution:
### First solution:  
Write  
\[
f(x) = \sin x + \cos x + \tan x + \cot x + \sec x + \csc x = \sin x + \cos x + \frac{1}{\sin x \cos x} + \frac{\sin x + \cos x}{\sin x \cos x}.
\]  
We can write \( \sin x + \cos x = \sqrt{2} \cos(\pi/4 - x) \); this suggests making the substitution \( y = \pi/4 - x \). In this new coordinate,  
\[
\sin x \cos x = \frac{1}{2} \sin 2x = \frac{1}{2} \cos 2y,
\]  
and writing \( c = \sqrt{2} \cos y \), we have  
\[
f(y) = (1 + c) \left( 1 + \frac{2}{c^2 - 1} \right) - 1 = c + \frac{2}{c - 1}.
\]  
We must analyze this function of \( c \) in the range \( [-\sqrt{2}, \sqrt{2}] \). Its value at \( c = -\sqrt{2} \) is \( 2 - 3\sqrt{2} < -2.24 \), and at \( c = \sqrt{2} \) is \( 2 + 3\sqrt{2} > 6.24 \). Its derivative is \( 1 - \frac{2}{(c - 1)^2} \), which vanishes when \( (c - 1)^2 = 2 \), i.e., where \( c = 1 \pm \sqrt{2} \). Only the value \( c = 1 - \sqrt{2} \) is in bounds, at which the value of \( f \) is \( 1 - 2\sqrt{2} > -1.83 \). As for the pole at \( c = 1 \), we observe that \( f \) decreases as \( c \) approaches from below (so takes negative values for all \( c < 1 \)) and increases as \( c \) approaches from above (so takes positive values for all \( c > 1 \)); from the data collected so far, we see that \( f \) has no sign crossings, so the minimum of \( |f| \) is achieved at a critical point of \( f \). We conclude that the minimum of \( |f| \) is \( 2\sqrt{2} - 1 \).  


### Second solution:  
Write  
\[
f(a,b) = a + b + \frac{1}{ab} + \frac{a + b}{ab}.
\]  
Then the problem is to minimize \( |f(a,b)| \) subject to the constraint \( a^2 + b^2 - 1 = 0 \). Since the constraint region has no boundary, it is enough to check the value at each critical point and each potential discontinuity (i.e., where \( ab = 0 \)) and select the smallest value (after checking that \( f \) has no sign crossings).  

We locate the critical points using the Lagrange multiplier condition: the gradient of \( f \) should be parallel to that of the constraint, which is to say, to the vector \( (a,b) \). Since  
\[
\frac{\partial f}{\partial a} = 1 - \frac{1}{a^2 b} - \frac{1}{a^2}
\]  
and similarly for \( b \), the proportionality yields  
\[
a^2 b^3 - a^3 b^2 + a^3 - b^3 + a^2 - b^2 = 0.
\]  
The irreducible factors of the left side are \( 1 + a \), \( 1 + b \), \( a - b \), and \( ab - a - b \). So we must check what happens when any of those factors, or \( a \) or \( b \), vanishes.  

If \( 1 + a = 0 \), then \( b = 0 \), and the singularity of \( f \) becomes removable when restricted to the circle. Namely, we have  
\[
f = a + b + \frac{1}{a} + \frac{b + 1}{ab}
\]  
and \( a^2 + b^2 - 1 = 0 \) implies \( (1 + b)/a = a/(1 - b) \). Thus we have \( f = -2 \); the same occurs when \( 1 + b = 0 \).  

If \( a - b = 0 \), then \( a = b = \pm \sqrt{2}/2 \) and either \( f = 2 + 3\sqrt{2} > 6.24 \), or \( f = 2 - 3\sqrt{2} < -2.24 \).  

If \( a = 0 \), then either \( b = -1 \) as discussed above, or \( b = 1 \). In the latter case, \( f \) blows up as one approaches this point, so there cannot be a global minimum there.  

Finally, if \( ab - a - b = 0 \), then  
\[
a^2 b^2 = (a + b)^2 = 2ab + 1
\]  
and so \( ab = 1 \pm \sqrt{2} \). The plus sign is impossible since \( |ab| \leq 1 \), so \( ab = 1 - \sqrt{2} \) and  
\[
f(a,b) = ab + \frac{1}{ab} + 1 = 1 - 2\sqrt{2} > -1.83.
\]  
This yields the smallest value of \( |f| \) in the list (and indeed no sign crossings are possible), so \( 2\sqrt{2} - 1 \) is the desired minimum of \( |f| \).  

**Note:** Instead of using the geometry of the graph of \( f \) to rule out sign crossings, one can verify explicitly that \( f \) cannot take the value 0. In the first solution, note that \( c + 2/(c - 1) = 0 \) implies \( c^2 - c + 2 = 0 \), which has no real roots. In the second solution, we would have  
\[
a^2 b + ab^2 + a + b = -1.
\]  
Squaring both sides and simplifying yields  
\[
2a^3 b^3 + 5a^2 b^2 + 4ab = 0,
\]  
whose only real root is \( ab = 0 \). But the cases with \( ab = 0 \) do not yield \( f = 0 \), as verified above.