Maximum value of $f(x) = \cos x \left( \sin x + \sqrt {\sin^2x +\sin^2a}\right)$

HINT:

$$y=\cos x(\sin x+\sqrt{\sin^2x+\sin^2A})$$

$$\iff y\sec x-\sin x=\sqrt{\sin^2x+\sin^2A}$$

Squaring we get $$y^2\tan^2x-2y\tan x+y^2-\sin^2A=0$$

As $\tan x$ is real, the discriminant $$(2y)^2-4y^2(y^2-\sin^2A)\ge0$$


Let $$y=\cos x\left[\sin x+\sqrt{\sin^2 x+\sin^2 a}\right] = \sin x\cdot \cos x+\cos x\cdot \sqrt{\sin^2 x+\sin^2 a}$$

Now Using $\bf{Cauchy\; Schwartz\; Inequality}$

We get $$(\sin^2 x+\cos ^2 x)\cdot \left[\cos^2 x+\sin^2 x+\sin^2 a\right]\geq \left(\sin x\cdot \cos x+\cos x\cdot \sqrt{\sin^2 x+\sin^2 a}\right)^2$$

So we get $$y^2\leq (1+\sin^2 a)\Rightarrow |y| \leq\sqrt{1+\sin^2 a}$$