Maximum of a trigonometric expression Maximize $f(x)=4\sin x+48\sin x\cos x+3\cos x+14\sin^2x$ I broke it in 2 parts but then realized they don't have their maxima at the same points. So I am stuck. This is what I did. I wrote it as $$3\cos x+4\sin x+2\sin x(24\cos x+7\sin x)$$ Now we can maximize the first two terms and the terms inside the bracket.

Note that if $ \tan (x) = \frac {3}{4} $, then $ \tan (2x) = \frac {24}{7} $
With $ 48 \sin x \cos x = 24 \sin (2x) $ and $ 14 \sin^2 x = 7 - 7 \cos (2x) $
And consider the Pythagoras Triplets $ (3,4,5), (7,24,25) $
We have
$ f(x) = ( 4 \sin x + 3 \cos x ) + (24 \sin (2x) - 7 \cos (2x) ) + 7 $
Express them in terms of $ R \sin (\theta \pm \alpha ) $, link for reference
$ \text{max} (f(x)) = 5 + 25 + 7 = 37 $
