2013 Mock AIME I Problems/Problem 6

Problem 6

Find the number of integer values $k$ can have such that the equation \[7\cos x+5\sin x=2k+1\] has a solution.

Solution

$f(x)=7\cos x+5\sin x$ is a continuous function, so every value between its minimum and maximum is attainable. By Cauchy-Schwarz, \[(7\cos x+5\sin x)^2 \le (7^2+5^2)(\cos^2 x+\sin^2 x)=74\] Giving a maximum of $\sqrt{74}$, which is achievable when $\frac{\cos x}{7}=\frac{\sin x}{5}$. Note that a minimum of $-\sqrt{74}$ can be attained at $f(x+\pi)$. Thus the values of $k$ that work are the integers from $-4$ to $3$, inclusive, giving a total of $\boxed{8}$.