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.
 A: $f(x)=4\sin x+48\sin x\cos x+3\cos x+14\sin^2x$
Step 1: Take derivative and equate it to zero
$f'(x)=4\cos x+48(\cos^x-\sin^2 x)-3\sin x+14(2\sin x\cos x)$
$\implies 4\cos x + 48\cos 2x-3\sin x+14\sin 2x=0$
Step 2: Find the solution to above equation. 
Step 3: It will attain a maxima if $f''(x)<0$, that means second derivative of the function.
Follow this wolfram Alpha link for solutions.
A: 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 $
A: Hint: Let $a = \cos x, b = \sin x \Rightarrow f(x,y) = f(a,b) = 4a + 48ab + 3b + 14a^2, a^2+b^2 = 1$.
One way out is to use the Lagrange Multiplier:
$\nabla(f) = \lambda \nabla(g) \to (4+48b+28a, 48a+3) = \lambda(2a,2b)$.
Can you solve for $a,b$ from this?
