How to find max integer value of $6\sin(x)-8\cos(x)$ without using derivative I have $6\sin(x)-8\cos(x)$ and want to find its maximum value. If we use derivative and assuming that it is equal to 0, we get $6\cos(x)+8\sin(x)=0$ which implies that $\tan(x)=-\cfrac{3}{4}$ and $x = 143^\circ$ and we can conclude that the maximum value is equal to $10$ . How can I find the maximum integer value of $6\sin(x)-8\cos(x)$ without using derivative?

Suppose,
$$a\cos(\theta)-b\sin (\theta)=R \cos (\theta+y)$$
Expanding out the right hand side using the trigonometric angle addition theorem we have,
$$R\cos (\theta)\cos(y)-R\sin (\theta)\sin(y)$$
Than all we need to make sure is that,
$$a=R\cos (y)$$
$$b=R \sin (y)$$
Squaring both equations and adding gives,
$$R^2=a^2+b^2$$
But we need to chose $y$ so both the previous conditions are satisfied.
In the case $a=6$ and $b=8$ then $R^2=6^2+8^2=100$. Let us chose $R=10$.
Then we need to satisfy,
$$6=10\cos (y)$$
$$8=10 \sin (y)$$
Dividing the second equation by the third first $\tan (y)=\frac{8}{6}=\frac{4}{3}$. It is easy to check that $\arctan (\frac{4}{3}) \in [0,\frac{\pi}{2}]$ solves both equations, so it is a valid one. And we have,
$$6\cos (\theta)-8 \sin (\theta)=10 \cos( \theta+\arctan (\frac{4}{3}))$$
