"Say these two rays R (including P) and S (including A and B), and let the angle between them be α.
I tried to use Cartesian form, but geometry might be better.
WLOG, select the origin o and r as the +x axis.
These points are A(a, 0) B(b, 0).
We scale by 1/a, so that a' maps to (1, 0) and b' maps to (b/a, 0). We call it (k, 0). K is a constant. )
Let p be the distance r along r (strictly speaking, the distance is also scaled by 1/a).
We try to find r (r will depend on α and K).
Therefore, the coordinate of APB is A( 1, 0) P(r cos α, r sin α) B(k, 0).
Let the angle APB = θ and apply the cosine rule.
The side length is
|PA| = √((r cos α -k)? + (r sin α)? )= √(r? +k? -2kr cos α)
|PB| = √((r cos α - 1)? + (r sin α)? )= √(r? + 1 -2r cos α)
|AB| = (k- 1)
You can use the parameter r and the constant k, α to get a (annoying) expression of cos θ.
Then by minimizing cos θ (regardless of 0 < θ <; π/2 or π/2 <; θ& lt; π (cosine de -ve)).
This will get the right answer, but it's a little embarrassing.
Changing the symbol may make it clearer.
Anyway, anyway:
cos θ = |PA|? +|PB|? -|AB|? / 2|PA||PB|
= ((r? +k? -2kr cos α) +(r? + 1 -2r cos α) -(k- 1)? )/ (r? +k? -2kr cos α)*(r? + 1 -2r cos α)
Wait. "