Problem 444
Hard Curve Sketching

Find the minimum and maximum values of f(x) = (cos

Find the minimum and maximum values of $\displaystyle f(x) = \frac{\cos x-1}{\cos x-\sin x}$ on $\bigl[0,2\pi\bigr]$.

Explanation of Method

Two poles split the interval, and the function is unbounded on each side.

Step 1: Where the function is defined

The denominator vanishes when $\tan x = 1$, that is at $x = \dfrac{\pi}{4}$ and $x = \dfrac{5\pi}{4}$. These two points are excluded, leaving

\[ \left[0,\frac{\pi}{4}\right)\cup\left(\frac{\pi}{4},\frac{5\pi}{4}\right)\cup\left(\frac{5\pi}{4},2\pi\right]. \]

Step 2: The derivative

With $u = \cos x-1$, $v = \cos x-\sin x$, the numerator of $f'$ is

\[ -\sin x\bigl(\cos x-\sin x\bigr)+\bigl(\cos x-1\bigr)\bigl(\sin x+\cos x\bigr) = \sin^{2}x+\cos^{2}x-\sin x-\cos x = 1-\sin x-\cos x, \]

\[ f'(x) = \frac{1-\sin x-\cos x}{\bigl(\cos x-\sin x\bigr)^{2}}. \tag{1} \]

Step 3: Critical points

The denominator is positive wherever it is defined, so $f' = 0$ requires

\[ \sin x+\cos x = 1 \;\Longleftrightarrow\; \sqrt2\sin\left(x+\frac{\pi}{4}\right) = 1 \;\Longleftrightarrow\; x+\frac{\pi}{4} = \frac{\pi}{4} \ \text{ or } \ \frac{3\pi}{4}, \] giving $x = 0$ (an endpoint) and $x = \dfrac{\pi}{2}$, the only interior critical point.

Step 4: Sign of the derivative

The numerator $1-\sqrt2\sin\bigl(x+\tfrac{\pi}{4}\bigr)$ is negative exactly when $\sin\bigl(x+\tfrac{\pi}{4}\bigr)\gt \tfrac{1}{\sqrt2}$, i.e. for $x\in\bigl(0,\tfrac{\pi}{2}\bigr)$, and positive for $x\in\bigl(\tfrac{\pi}{2},2\pi\bigr)$. Hence $f$ decreases on $\bigl(0,\tfrac{\pi}{2}\bigr)$ and increases on $\bigl(\tfrac{\pi}{2},2\pi\bigr)$ — in each case interrupted by a pole — and $x = \dfrac{\pi}{2}$ is a local minimum, with

\[ f\!\left(\frac{\pi}{2}\right) = \frac{0-1}{0-1} = 1. \]

Step 5: The poles

\[ \lim_{x\to(\pi/4)^{-}}f = -\infty, \qquad \lim_{x\to(\pi/4)^{+}}f = +\infty, \]

\[ \lim_{x\to(5\pi/4)^{-}}f = +\infty, \qquad \lim_{x\to(5\pi/4)^{+}}f = -\infty. \]

The function is unbounded above and below, so on $\bigl[0,2\pi\bigr]$ there are no global extrema.

Step 6: The four pieces

\[ \left[0,\tfrac{\pi}{4}\right):\ 0\searrow-\infty; \qquad \left(\tfrac{\pi}{4},\tfrac{\pi}{2}\right]:\ +\infty\searrow1; \]

\[ \left[\tfrac{\pi}{2},\tfrac{5\pi}{4}\right):\ 1\nearrow+\infty; \qquad \left(\tfrac{5\pi}{4},2\pi\right]:\ -\infty\nearrow0. \]

Useful values: $f(0) = 0$, $f(\pi) = 2$, $f\!\left(\tfrac{3\pi}{2}\right) = -1$, $f(2\pi) = 0$.

Step 7: Verification

\[f(1) = 1.5263795 \gt f\!\left(\tfrac{\pi}{2}\right) = 1 \lt f(2) = 1.0684318 \;\;\checkmark\ \text{(a minimum)}\]

\[f(0.1) = -0.0055809 \;\;\checkmark\ \text{(falling from } f(0) = 0 \text{ towards } -\infty)\]

\[f(6) = -0.0321315,\ \text{rising from } -\infty \text{ towards } f(2\pi) = 0 \;\;\checkmark\]


Result

Final answer:

\[\boxed{\,\text{no global extrema on } \bigl[0,2\pi\bigr] \text{ (poles at } \tfrac{\pi}{4},\ \tfrac{5\pi}{4})\,}\]

Final answer:

\[\boxed{\,\text{the only interior extremum: a local minimum } f\!\left(\frac{\pi}{2}\right) = 1\,}\]

Remark

Remark. The half-angle identities make the structure transparent: $\cos x-1 = -2\sin^{2}\tfrac{x}{2}$ and $\cos x-\sin x = \sqrt2\cos\bigl(x+\tfrac{\pi}{4}\bigr)$, so the numerator is non-positive everywhere and all the drama comes from the sign changes of the cosine in the denominator. Problem 445 is the same expression with $\sin$ and $\cos$ interchanged, and its single interior extremum is a maximum instead.