1. ## Determining tan(x) from gradients

So I'm given the points $\displaystyle O(0,0), Q(1,0) ,P(t,t+1$) and I'm supposed to find $\displaystyle tan(OPQ)$.
As the slope of $\displaystyle OP$ is $\displaystyle \frac{t+1}{t}$ and the slope of $\displaystyle QP$ is $\displaystyle \frac{t+1}{t-1}$, apparently, the answer is: $\displaystyle \frac{t+1}{2t^2+t+1}$ or equivalently $\displaystyle \frac{t+1}{(t+1)^2+t(t-1)}$

So my question is, how was this determined and in general, how does one determine the tan of an angle given three points?

2. ## Re: Determining tan(x) from gradients

We could employ the Pythagorean identity:

$\displaystyle \tan^2\theta+1=\sec^2\theta$

and the law of cosines:

$\displaystyle 1=\left(2t^2+2t+1 \right)+\left(2t^2+2 \right)-2\sqrt{\left(2t^2+2t+1 \right)\left(2t^2+2 \right)}\cos\theta$

$\displaystyle \cos^2\theta=\frac{\left(2t^2+t+1 \right)^2}{\left(2t^2+2t+1 \right)\left(2t^2+2 \right)}$

$\displaystyle \sec^2\theta=\frac{\left(2t^2+2t+1 \right)\left(2t^2+2 \right)}{\left(2t^2+t+1 \right)^2}$

$\displaystyle \tan^2\theta=\frac{\left(2t^2+2t+1 \right)\left(2t^2+2 \right)}{\left(2t^2+t+1 \right)^2}-1$

$\displaystyle \tan^2\theta=\left(\frac{t+1}{2t^2+t+1} \right)^2$

Assuming $\displaystyle 0\le\tan\theta$ we then have:

$\displaystyle \tan\theta=\frac{t+1}{2t^2+t+1}$

3. ## Re: Determining tan(x) from gradients

Simple approach:

$\displaystyle \alpha ={$\measuredangle $OPt}$

$\displaystyle \theta ={$\measuredangle $OPQ}$

Solve the following two equations:

$\displaystyle \text{Tan}[\alpha ]=\frac{t}{t+1}$

$\displaystyle \text{Tan}[\alpha -\theta ]=\frac{t-1}{t+1}$

to obtain:

$\displaystyle \theta \to \alpha +\text{ArcTan}[1-2 \text{Tan}[\alpha ]]$

or in terms of t:

$\displaystyle \theta \to \alpha +\text{ArcTan}\left[1-\frac{2 t}{1+t}\right]$