# Solving for $\beta$ in $\tan\gamma = C \tan\beta$, $0 \leq C \leq 1$, where $\beta$ must be in same quadrant as $\gamma$

I am pretty weak with Mathematica, so please, nothing overly complicated. The ArcTan[x, y] function allows for a full range of $2 \pi$ in the output. However, for the equation $\beta = \tan^{-1} \left( \frac{\tan\gamma}{C} \right)$, $C$ is always positive, so I only get $\pi$ range in $\beta$. But I NEED $\beta$ to be in the same quadrant as $\gamma$. How can I rectify this?

Split the tangent:

ArcTan[c Cos[γ], Sin[γ]]


A quick Manipulate[] for fun:

Manipulate[Graphics[{{Opacity[1/2, ColorData[97, 1]], Disk[{0, 0}, 1, {0, γ}]},
{Opacity[1/2, ColorData[97, 2]],
Disk[{0, 0}, 1, {0, ArcTan[c Cos[γ], Sin[γ]]}]}}, PlotRange -> 1],
{{c, 1/2}, 0, 1}, {{γ, π/4}, -π, π}]

• GENIUS! You are a prodigy. – Johnver Aug 5 '16 at 2:03
• I believe I'm too old to qualify, but thank you. :) – J. M. will be back soon Aug 5 '16 at 2:06