<s>[INST] $\cos\gamma+\sin\gamma$ in a 3-5-7 triangle ($\gamma$ is the greatest angle) Clearly $\gamma$ has to be the angle oposite to the side of lenght 7. The law of cosines gives me $$7^2 = 5^2+3^2 - 2\cdot 5\cdot3\cos{\gamma}\Longleftrightarrow\cos{\gamma}=-\frac{7^2-5^2-3^2}{2\cdot5\cdot 3}=-\frac{1}{2}.$$
This value of $\cos{\gamma}$ means there can be two values of $\gamma$ satisfying it in $0\leq\gamma \leq 2\pi$. So $\sin{\gamma}$ can be either negative or positive. Using the trigonometric identity $\sin^2{\theta}+\cos^2{\theta}=1$, I obtain $$\sin{\gamma}=\pm\sqrt{1-\cos{\gamma}}=\pm\sqrt{1-\left(-\frac{1}{2}\right)^2}=\pm\frac{\sqrt{3}}{2}.$$
Using the positive value I get the correct answer of $$\cos{\gamma} + \sin{\gamma}=-\frac{1}{2}+\frac{\sqrt{3}}{2}=\frac{\sqrt{3}-1}{2}.$$
Why is it incorrect to use the negative value of $\sin{\gamma}$ ?
 [/INST] For $0^\circ<\gamma<180^\circ$ – the range of an angle in a non-degenerate triangle – $\sin\gamma$ must be positive.
</s>