I have the following situation:

I know $w$, $d$ and $t$. What I want to know is $\alpha$ respectively $\cos(\alpha)$.

I have to solve the following formula for $\alpha$:

$$d + t \cos(\alpha) = w \tan(\alpha)$$


$$d + t \cos(\alpha) = w \frac{\sqrt{1 - \cos(\alpha)^2}}{\cos(\alpha)}$$

That leads to a 4th degree equation.

$$d^2 + 2dt \cos(\alpha) + t^2 \cos^2(\alpha) = w^2\frac{1 - \cos^2(\alpha)}{\cos^2(\alpha)}$$

$$d^2 \cos^2(\alpha) + 2dt \cos^3(\alpha) + t^2 \cos^4(\alpha) = w^2 (1 - \cos^2(\alpha))$$

My question is

Do I miss something? Is there an alternative solution?

  • $\begingroup$ By the way, the issue is related to a roof editor in a CAD system YouTube - video $\endgroup$
    – Rabbid76
    Feb 1 '20 at 15:27
  • 1
    $\begingroup$ You were missing a coefficient of $t^2$ in your last two equations; I took the liberty of adding them in. That done, I get the same result as you. There are other ways of attacking the problem (say, with the half-angle substitution), but a quartic appears inevitable. $\endgroup$
    – Blue
    Feb 1 '20 at 15:40
  • 1
    $\begingroup$ I take it this is a roof rafter: you can probably set $t=0$ as a first approximation in order to develop an iterative solution. $\endgroup$
    – NickD
    Feb 1 '20 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.