If $R \sin \psi = r \sin \phi$ and $R \cos \psi = -ar \cos \phi$, what are $R$ and $\psi$

algebra-precalculuscomputer-algebra-systemssystems of equationstrigonometry

Given $$-ar \cos \phi = R \cos \psi \\
r \sin \phi = R \sin \psi$$

how do I find $R, \psi$ in terms of $r, \phi$?

My work so far below:


$$\tan \psi = \frac 1 {-a} \tan \phi \\
\psi = \arctan(\frac {-1} a \tan \phi)$$
and $$R^2 = R^2 \cos^2 \psi + R^2 \sin^2 \psi = r^2 \sin^2 \phi + a^2 r^2 \cos^2 \phi \\
R = r \sqrt{a^2 \cos^2 \phi + \sin^2 \phi}.$$


UPDATE: I previously tried using Wolfram Alpha, but it's been pointed out that I used it incorrectly. For reference, my incorrect usage gave

$$R = -ar \\
\psi = -\arcsin \left ( \frac { \sin \phi} a \right ).$$

But even after correcting, we still get very different values for $\psi$.

Best Answer

Disregarding the "simpler" solutions (where at least one of $R$, $r$, $a$, $\sin(\phi)$ or $\cos(\phi)$ is equal to $0$), it's a matter of simplification. It seems that Wolfram|Alpha (for whatever reason) starts from the identity \begin{align} \tan\left(\frac{\psi}{2}\right)&=\csc(\psi)-\cot(\psi)\\ &=\frac{1}{\sin(\psi)}-\frac{\cos(\psi)}{\sin(\psi)}\\ &=\frac{R}{r\sin(\phi)}-\frac{\frac{-ar}{R}\cos(\phi)}{\frac{r}{R}\sin(\phi)}\\ &=\frac{1}{\sin(\phi)}\left(\frac{R}{r}+a\cos(\phi)\right)\\ &=\csc(\phi)\left(\sqrt{a^2\cos^2(\phi)+\sin^2(\phi)}+a\cos(\phi)\right) \end{align} where the positive root $R=r\sqrt{a^2\cos^2(\phi)+\sin^2(\phi)}$ is assumed (the negative root just changes the corresponding sign). Now, knowing that due to the periodicity of $\tan(\cdot)$, solving $\tan(x)=\tan(y)$ implies $x=y+\pi n,n\in\mathbb{Z}$, we have \begin{align} \Rightarrow\quad \frac{\psi}{2}&=\arctan\left[\csc(\phi)\left(\sqrt{a^2\cos^2(\phi)+\sin^2(\phi)}+a\cos(\phi)\right)\right]+\pi n\,,\quad n\in\mathbb{Z}\\ \Rightarrow\quad \psi&=2\left(\arctan\left[\csc(\phi)\left(\sqrt{a^2\cos^2(\phi)+\sin^2(\phi)}+a\cos(\phi)\right)\right]+\pi n\right)\,,\quad n\in\mathbb{Z}\,,\quad (1) \end{align} which is equivalent to the solution given by Wolfram|Alpha. The solution considering the negative root for $R$ is also correct, after a little algebra.

Moreover, and regardless of the derivation above, your solution is also correct, albeit considering the periodicity of $\tan(\cdot)$ as follows: \begin{align} \tan(\psi)=\frac{−1}{a}\tan(\phi)\quad\Rightarrow \quad \psi=\arctan\left(-\frac{1}{a}\tan(\phi)\right)+\pi m,\quad m\in\mathbb{Z}\,, \quad (2)\end{align} where the periodicity can yield another integer as the Wolfram expression.


However, the interesting question is to show that these two expressions yield the same solution set, that is, they are essentially the same but might differ by difference of an integer multiple of $\pi$ due to periodicity. So, for the sake of algebraic fun, I set to demonstrate that the arctangents in (1) and (2) are equal, up to a multiple of $\pi$ that would be absorbed by $m$ or $n$. This is equivalent to considering the required bias that operations and properties involving multiple $\arctan(\cdot)$ (like sums or products) require to ensure that every copy of $\arctan$ is still defined in the interval $(-\frac{\pi}{2},\frac{\pi}{2})$ (see, for example this question). Let $u=\tan(\phi)/a$, and we can rewrite \begin{align} \csc(\phi)\left(\sqrt{a^2\cos^2(\phi)+\sin^2(\phi)}+a\cos(\phi)\right)&=\sqrt{\frac{a^2\cos^2(\phi)}{\sin^2(\phi)}+1}+\frac{a}{\tan(\phi)}\\ &=\sqrt{\frac{1}{u^2}+1}+\frac{1}{u}\\ &=\left(\frac{u}{\sqrt{1+u^2}+1}\right)^{-1}\,, \end{align} and we aim to prove that \begin{align} 2\arctan\left[\left(\frac{u}{\sqrt{1+u^2}+1}\right)^{-1}\right]=\arctan\left(-u\right)+\pi k\,,\quad k\in\mathbb{Z}\,. \end{align}

Invoking the following identities: \begin{align} \arctan(-x)&=-\arctan(x)\,,\\ \arctan\left(\frac{1}{x}\right)&=\begin{cases}\frac{\pi}{2}-\arctan(x)&\text{for }x>0\\-\frac{\pi}{2}-\arctan(x)&\text{for }x<0\end{cases}\quad\,,\\ \arctan(x)&=2\arctan\left(\frac{x}{1+\sqrt{1+x^2}}\right)\,, \end{align} we can see that if $u>0$, then $\frac{u}{\sqrt{1+u^2}+1}>0$ and
\begin{align} 2\arctan\left[\left(\frac{u}{\sqrt{1+u^2}+1}\right)^{-1}\right] &=2\left(\frac{\pi}{2}-\arctan\left[\frac{u}{\sqrt{1+u^2}+1}\right]\right)\\ &=\pi-2\arctan\left[\frac{u}{\sqrt{1+u^2}+1}\right]\\ &=-\arctan\left[u\right]+\pi\\ &=\arctan\left[-u\right]+\pi\,, \end{align}

and for $u<0$ we see that $\frac{u}{\sqrt{1+u^2}+1}<0$, thus \begin{align} 2\arctan\left[\left(\frac{u}{\sqrt{1+u^2}+1}\right)^{-1}\right] &=2\left(-\frac{\pi}{2}-\arctan\left[\frac{u}{\sqrt{1+u^2}+1}\right]\right)\\ &=-\pi-2\arctan\left[\frac{u}{\sqrt{1+u^2}+1}\right]\\ &=-\arctan\left[u\right]-\pi\\ &=\arctan\left[-u\right]-\pi\,. \end{align}

Choosing $k=\pm 1$ according to the sign of $u$ proves the claim.

Related Question