# Unclear why the highest argument value for cosine function $\cos(x+\frac{\pi}{4})$ is $\frac{\pi}{2}$

The problem to solve is to find the values of $x$ with which the function $\sin(x)+\cos(x)$ will compute to its highest value. I checked the textbook's answers section: it has the function transformed to

$$\sqrt{2}\cos(x-\frac{\pi}{4})$$

Up to that point, it was all clear to me. But then the solution says,

This function will have the highest value with $\cos(x-\frac{\pi}{4}) = 1$ , that is, with $x-\frac{\pi}{4}=\frac{\pi}{2}+k\pi$, or with $x=\frac{3\pi}{4}+k\pi$, which means that $x=\pi-\frac{3\pi}{4}+(k-1)\pi$, or, finally, $x=\frac{\pi}{4}+n\pi$, with $n$ being a natural number of any value.

But why the argument $x-\frac{\pi}{4}$ should equal $\frac{\pi}{2}+k\pi$? Isn't the cosine maximal at zero? And isn't its period $2k\pi$? Shouldn't it be

The highest value of $\cos(x-\frac{\pi}{4})$ is 1, that is, with $x-\frac{\pi}{4}=2k\pi$

P.S. The textbook's answer ends with

The highest value of $\sin(x)+\cos(x)$ is $\sqrt{2}$.

.. so it's not "magnitude" I guess.

Here's the textbook's solution for this problem in full:

(Saveliy Tumanov, Basic Algebra, 1962)

• Need some clarification: so you want to maximize $\sin(x) + \cos(x)$. Over what interval(s)? Commented Aug 5, 2015 at 1:25
• @Clarinetist - The textbook says generally: "find the values of $x$ with which this function will compute to the maximum value". Commented Aug 5, 2015 at 1:29
• The question sounds poorly written. By "highest value," I assume it is meant "largest magnitude." Otherwise the $k \pi$ in the given answer should be $2 k \pi$.
– Ryan
Commented Aug 5, 2015 at 1:46
• @Ryan - judging by the concluding statement in the textbook's answer for that problem, it's not magnitude, since it says that the highest value of that expression would be $\sqrt{2}$ Commented Aug 5, 2015 at 1:50
• I guess the textbook's solution might be erroneous in some way.. Commented Aug 5, 2015 at 1:52

The maximum value for $\cos(\theta)$ occurs at $\theta = 2k\pi$ where $k\in \mathbb{Z}$ Thus, $x-\frac{\pi}{4} = 2k\pi \implies x= \frac{\pi}{4} + 2k\pi$.
• The $n$ should be $k$. I changed it to cover negative angles. Commented Aug 5, 2015 at 2:30