# Trigonometric derivation using Solve

Background: I'm trying to derive the relation between two variables in an optical system. The derivation is simple and well-known in the limiting case ($$H \to \infty$$, see figure), but rather tricky in the general case of finite $$H$$.

The physical situation is this: A shiny cone of fixed base radius $$r$$ and fixed height $$h$$ sits on a horizontal plane. A light ray (green) from directly above the apex of the cone a fixed height $$H$$ from the plane sends a light ray toward a point on the plane a variable distance $$s$$ from the cone's axis ($$s < r$$). The ray strikes the cone, obeys the law of reflection ($$\theta = \theta$$, measured with respect to the perpendicular line or normal to the plane, $${\bf n}$$ in the figure); the ray then strikes the plane an unknown distant $$R$$ from the axis.

Clearly when $$s \to r$$, then $$R \to r$$. When $$s$$ becomes small, then $$R$$ becomes large.

Although not labeled in the figure, I let $$\beta$$ be the angle between the vertical red axis and the green light ray, as measured at the top of the figure. I let $$\alpha$$ be the full apex angle of the cone. I let the height of the intersection point of the green light ray and the cone be $$h0$$ (where $$h0 < h$$) and its radial distance be $$k$$ (where $$k < r)$$.

I am seeking the function $$R(s)$$, that is, the relation between the radial "target" position within the cone to that of the ray's final position on the plane outside the cone.

Question: Here are the relevant equations:

• $$\tan \beta = s/H$$
• $$\tan \beta = k/(H-h0)$$
• $$\tan (\alpha/2) = r/h$$
• $$\tan (\alpha - \beta) = (R-k)/h0$$

I would like to derive the function R[s] using Solve.

If I put in a single above equation, I can get an (incomplete) solution:

Solve[{
Tan[\[Alpha] - \[Beta]] == (R - k)/h0}, R ]


(* {{R -> k + h0 Tan[[Alpha] - [Beta]]}} *)

But as I put in even one more equation, I do not get a solution (only an empty {}).

Here is what I thought would work:

Assuming[h0 < h && s < r,
Solve[{Tan[\[Beta]] == s/H,
Tan[\[Beta]] == k/(H - h0),
Tan[\[Alpha]/2] == r/h,
Tan[\[Alpha] - \[Beta]] == (R - k)/h0}, R ]]


This is not a physics question, but instead a Mathematica question: What syntax, what constraints, what methods will solve to give R as a function of s?

• Solve[{Tan[β] == s/H, Tan[β] == k/(H - h0), Tan[α/2] == r/h, Tan[α - β] == (R - k)/h0}, {R,α, β, k}]? – AccidentalFourierTransform Jul 2 at 0:16
• @AccidentalFourierTransform: Hah! That worked! But why shouldn't just solving for a single variable work? After all, it did for the single equation. – David G. Stork Jul 2 at 0:18
• @AccidentalFourierTransform - For a cleaner result, include assumptions and remove unnecessary conditions: Simplify[Solve[{Tan[β] == s/H, Tan[β] == k/(H - h0), Tan[α/2] == r/h, Tan[α - β] == (R - k)/h0, 0 < h0 < h < H, s < r}, {R, α, β, k}], {0 < h0 < h < H, s < r}] /. (ConditionalExpression[expr_, Element[var_, Integers]] /; FreeQ[expr, var]) :> expr – Bob Hanlon Jul 2 at 2:21