# Why use the Weierstrass Substitution to solve $a = -x \sin\gamma + z \cos\gamma$ for $\gamma$?

I've come across a deceptively simple algebraic equation involving trig functions.

Solve the following for $$\gamma$$: $$a = -x \sin(\gamma) + z \cos(\gamma)$$ where $$a$$, $$x$$, $$z$$ are constants.

After realizing that I didn't know how to solve it, I plugged it into Wolfram Alpha. The step-by-step solutions mention something called Weierstrass ("tangent half-angle") Substitution. After researching this method, I've learned that most examples are methods for solving integrals.

My question is: Why does the Weierstrass Substitution work for the above equation?

• "Why does it work?" It works because it works. "Why use it?" It can be a hassle to invoke a host of identities to manipulate a trig eqn into a solvable form. The Weierstrass Substitution cuts through the clutter to provide a purely-mechanical way of writing trig functions in terms of a common quantity, with an added benefit of converting what could be a convoluted trig eqn into a straightforward polynomial one. Polynomials are "easy" to solve, after all. The trade-off is that you might miss an insightful trig-specific approach; see, eg, here.
– Blue
Commented Feb 11, 2020 at 17:19

$$a = -x \sin \gamma + z \cos \gamma$$ $$\frac{a}{\sqrt{x^2 + z^2}} = \sin \gamma \frac{-x}{\sqrt{x^2 + z^2}} + \cos \gamma \frac{z}{\sqrt{x^2 + z^2}}$$ so take $$\delta$$ with $$\tan \delta = \frac{-z}{x},$$ $$\cos \delta = \frac{-x}{\sqrt{x^2 + z^2}}$$ and $$\sin \delta = \frac{z}{\sqrt{x^2 + z^2}}.$$ Now $$\delta$$ is solvable and $$\frac{a}{\sqrt{x^2 + z^2}} = \sin (\gamma + \delta)$$