# Solution-ception

Algebra Level 4

If $$A$$ is the maximum value of

$\displaystyle \sqrt { \cos { \theta } +\sqrt { \cos { \theta } +\sqrt { \cos { \theta } +\sqrt { \cos { \theta } +\dots } } } }$

and $$B$$ is the maximum value of

$\displaystyle \sqrt { \sin { \theta } +\sqrt { \sin { \theta } +\sqrt { \sin { \theta } +\sqrt { \sin { \theta } +\dots } } } },$

what is the value of $$2A-B?$$

Details and Assumptions

• $$\theta \in \left[-\frac{ \pi}{2},\frac{\pi}{2}\right]$$