1. ## Determining tan(x) from gradients

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

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

and the law of cosines:

$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$

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

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

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

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

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

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

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

Simple approach:

$\alpha ={\measuredangle OPt}$

$\theta ={\measuredangle OPQ}$

Solve the following two equations:

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

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

to obtain:

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

or in terms of t:

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