# Finding an angle of a triangle as function of another angle

Tags:
1. Jun 5, 2017

### McFluffy

1. Find α(β) given that the sum of the 2 sides= $(x+y)$ and its third, $z$ is a constant for 0<β<180.

You can imagine that there's two pieces of string connected between two points. One string is as long as the distance between the two points while the other string is longer. If you stretch the longer string such that it will form a triangle like in the diagram, you'll notice that $x, y$ varies but their sum is a constant. The question is how would you find the angle of α given that you know what β, z and the sum of $x+y$ are.

2. My attempt.

Before we do it, let’s identify the third angle of the triangle, call it $n$ (in radians)$=\pi-\alpha-\beta=\pi-(\alpha+\beta)$. This will be useful later. We could just apply law of sine straightforwardly but nah. Let’s try and find it instead.

Let’s call the dashed line $h$. So, $\sin{\alpha}=\dfrac{h}{y}$ and that $\sin{\beta}=\dfrac{h}{x}$. Solve for $h$ in those two equations so we can get the law of sine. You’ll get the following : $x\sin{\beta}=y\sin{\alpha}=h$. From this, divide across the equations by $\sin{\beta}\sin{\alpha}$ to get: $\dfrac{x}{\sin{\alpha}}=\dfrac{y}{\sin{\beta}}=\dfrac{h}{\sin{\alpha}\sin{\beta}}$. You can invert those equations if you want, either way there’s the law of sine. We’d found ourselves a connection between the angle $\alpha$ and $\beta$, but what about the third angle, $n$? Let’s try it out, From the law of sine: $\dfrac{z}{\sin{n}}=\dfrac{z}{\sin{(\pi-(\alpha+\beta))}}$. From symmetry of how the sine function works, that last equation is the same as: $\dfrac{z}{\sin{(\alpha+\beta)}}$.

So far, we’ve found 4 equations that are equal to each other; a result from the law of sine:$\dfrac{x}{\sin{\alpha}}=\dfrac{y}{\sin{\beta}}=\dfrac{h}{\sin{\beta}\sin{\alpha}}=\dfrac{z}{\sin{(\alpha+\beta)}}$. This is good because we have this: $\dfrac{h}{\sin{\beta}\sin{\alpha}}=\dfrac{z}{\sin{(\alpha+\beta)}}.$ Now all we need to do is find what $h$ is and plug it in. After that, I can now solve for $\alpha$.

If you had figured out what $x+y$ is in terms of trig functions, sine function to be more specific, it’ll be: $x=\dfrac{h}{\sin{\beta}},y=\dfrac{h}{\sin{\alpha}}$. If you add $x+y$, it should give you $x+y=c =\dfrac{h(\sin{\alpha}+\sin{\beta})}{\sin{\alpha}\sin{\beta}}$. We’d define $x+y=c$ so it can be less messy. Solve for $h$, $h=c\dfrac{\sin{\alpha}\sin{\beta}}{\sin{\alpha}+\sin{\beta}}$.Plug this into $\dfrac{h}{\sin{\beta}\sin{\alpha}}=\dfrac{z}{\sin{(\alpha+\beta)}}$ and you’ll get:$\dfrac{z}{\sin{(\alpha+\beta})}=\dfrac{c}{\sin{\alpha}+\sin{\beta}}$. We have gathered all the important variables into this one neat equation. Now to solve for $\alpha$ ….

Well this is where I'm stuck.

To find $\alpha$ in $\dfrac{z}{\sin{(\alpha+\beta})}=\dfrac{c}{\sin{\alpha}+\sin{\beta}}$, we could expand the terms by using angle addition rule for sine and gather all the $\alpha$ terms on the other side:$c\sin{\alpha}\cos{\beta}-z\sin{\alpha}+c\sin{\beta}\cos{\alpha}=z\sin{\beta}$, factor out $\sin{\alpha}$ on the left side to get: $\sin{\alpha}(c\cos{\beta}-z)+c\sin{\beta}\cos{\alpha}=z\sin{\beta}$ And notice that the left hand side of the equation can be represented as the expansion of the angle addition sine rule of $\alpha+k$ where $k$ is well the one we need to figure out too. But I don't know how to proceed now.

2. Jun 5, 2017

### ehild

It is correct so far, but the left side is not simply sin(α+κ), but you have to multiply it with a constant A.
So the equation is Asin(α+κ)=z sin(β)
Apply the addition rule for sin(α+κ) : A cos(κ)=c cos(β)-z, Asin(k)=c sin(β). Determine κ and A.

3. Jun 5, 2017

### McFluffy

How are you so sure that it's being multiplied by a constant?

Or I guess to rephrase it differently, what's the justification behind it?

Assuming it's true, I tried graphing the solution which is $\alpha(\beta)=\arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$, where $c>z$ and this is what I got:

How does one interpret the solutions being negative in the $(0, \pi)$ interval?

Last edited: Jun 5, 2017
4. Jun 5, 2017

### Buffu

Negative suggests how you measure the angle.
If positive is clockwise then anticlockwise is negative.

5. Jun 5, 2017

### ehild

The magnitudes of both c cos(β)-z and c sin(β) can be greater than 1, thus can not be cosine or sine of an angle κ.

The solution for alpha can not be negative. The range of both the arcsin and arctan functions is (-pi/2, pi/2) Choose angle κ in the appropriate quarter, and alpha between 0 and pi.

6. Jun 6, 2017

### McFluffy

I don't understand. It's true that the inverse trig functions' range are $(\frac{-\pi}{2}, \frac{\pi}{2})$ but why do I need to choose k in the appropriate quarter? I know why $\alpha$ should be between $(0, \pi)$ because there's 180 degrees in total in a triangle.

Also, I made an error: $\alpha(\beta)=\arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ should be $\alpha(\beta)=\arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$. I didn't multiply the $cz\cos \beta$ term by 2 and the graph of it is more straighter:

How do you explain that if $\alpha$ is an angle of a triangle?

Last edited: Jun 6, 2017
7. Jun 6, 2017

### ehild

I did not check your derivations, but remember: if tan(a/b)= m, than θ, the appropriate angle,is in the first quadrant, if a>0, b>0 so θ=arctan(m).
if a>0, b<0, it is the second quadrant, θ=arctan(m)+pi. If a<0, b<0 it is the third quadrant, θ=arctan(m)+pi, if a>0, b<0 it is the fourth quadrant, θ=arctan(m)+2pi.

In case of arcsin, if m <0 than θ=arcsin(m) <0 or θ= pi - arcsin(m), as sin(θ)=sin(pi-θ) But the angle of a triangle must be positive, θ= pi - arcsin(m).

Last edited: Jun 6, 2017
8. Jun 6, 2017

### McFluffy

Why did you define $\theta=\frac{a}{b}$? Are you talking about the $\arctan$ function? Because I think if the $\frac{a}{b}$ you are talking about are the triangle side ratios then it should be $\arctan$ because it maps side ratios to the appropriate angle.

After taking some time thinking about the terms in the equation, I noticed that $\arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)$ will always be $(+)$ for $0<\beta<\pi$ but for $\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ however, it can be $(+)$ or $(-)$ for $0<\beta<\pi$ which I'm having problem interpreting it because of the $-z$ term in the denominator of the argument.

Because of that $-z$ term, when $0<\beta<\frac{\pi}{2}$, $\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ can be $(+)$ or $(-)$ because as $\beta$ → $\frac{\pi}{2}$, $c\cos \beta$ becomes smaller and smaller and it'll eventually get overpowered by the $-z$ term. But for $\frac{\pi}{2}<\beta<\pi$ it's less complicated because it will always of the form of $\arctan{(\frac{a}{-b})}$.

So my problem is how do I adjust $\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ for $0<\beta<\pi$ such that it doesn't make $\alpha(\beta)$ become negative?

Last edited: Jun 6, 2017
9. Jun 6, 2017

### ehild

I did not. Read my previous post. It was m=a/b = tan(θ).

10. Jun 6, 2017

### McFluffy

My bad. I had edited the post above you by the way.

11. Jun 6, 2017

### McFluffy

My bad. I had edited the post above you by the way.

12. Jun 6, 2017

### ehild

The angle which tangent is given as m, can have multiple values, so it is θ=arctan(m) ± k pi, where k is any integer. Choose k so as 0<alpha<pi.

13. Jun 6, 2017

### McFluffy

Alright! It seems that I've figured it out thanks to you. So the solution should be a piecewise function:
$\alpha(\beta)=\begin{cases} \arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)+\pi & \text{ if } 0<\beta<\arccos{(\frac{z}{c})} \\ \arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right) & \text{ if } \arccos{(\frac{z}{c})}<\beta<\pi \end{cases}$

The reason why it's defined as a piecewise function is because of the original solution which is: $\alpha(\beta)=\arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ is defined to be from $(-)$ to $(+)$ during the $0<\beta<\frac{\pi}{2}$ interval. I tried finding at what value of $\beta$ when $\alpha(\beta)$ starts to change from being $(-)$ to $(+)$.

I noticed that the term: $\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ can be undefined for a certain value of $\beta$ that makes the denominator equal to 0. Thus, setting ${c\cos \beta-z}=0$ to had enabled me to conclude that
$\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ is undefined when $\beta=\arccos{(\frac{z}{c})}$. What's useful from this is that I can now determine at which interval does
$\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ starts to change its sign. I managed to construct a sign diagram and conclude that
$\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)>0$ in $(0, \arccos{(\frac{z}{c}}))$ interval and
$\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)<0$ in $(\arccos{(\frac{z}{c}}), \pi)$ interval. This allowed me to adjust $\alpha(\beta)$ better so I can prevent it from being $(-)$.

Since $\arcsin{m}=\theta\pm k\pi$, I can adjust the value of
$\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)$ in the $(0, \arccos{(\frac{z}{c}}))$ interval such that $\alpha(\beta)$ is not defined to be negative and that it manages to merge with the original function to make $\alpha(\beta)$ "continuous"(You could use calculus to figure out what value is $\alpha(\beta)$ when $\beta=\arccos{(\frac{z}{c}})$). Here's the graph of it:

Anyways, how is my explanation of the solution? Is this enough to justify that
$\alpha(\beta)=\begin{cases} \arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)+\pi & \text{ if } 0<\beta<\arccos{(\frac{z}{c})} \\ \arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right) & \text{ if } \arccos{(\frac{z}{c})}<\beta<\pi \end{cases}$ is indeed a solution to this problem?

14. Jun 6, 2017

### McFluffy

Oh no. I forgot that $\alpha(\beta)$ has to be defined for all values in $(0, \pi)$. Which means the solution should be this:$\alpha(\beta)=\begin{cases} \arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)+\pi & \text{ if } 0<\beta<\arccos{(\frac{z}{c})} \\ \lim_{\beta\rightarrow \arccos{(\frac{z}{c})}}\alpha(\beta) & \text{ if } \beta=\arccos{(\frac{z}{c})} \\ \arcsin \left(\frac{z\sin {\beta}}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right) & \text{ if } \arccos{(\frac{z}{c})}<\beta<\pi \end{cases}$

But how do I determine the limit of $\alpha(\beta)$ as $\beta \rightarrow \arccos{(\frac{z}{c})}$?

15. Jun 6, 2017

### ehild

Instead of arctan, use arc cos to determine the angle θ, knowing that $\cos(θ)=\frac{c \cos(β)-z}{A}$ Then you have no trouble with zero denominator. The range for θ is (0, pi). If cos(β)=z/c, θ=pi/2. If c cos(β)-z<0 θ>pi/2.
I tried to calculate alpha with z=8 and c=10. To avoid negative alpha values, I had to choose α+θ=pi-arcsin(z sin(β)/A) in the whole interval .
The vertex of the triangle moves along an ellipse, (the major axis is c and the distance between the focal points is z) . If beta increases from 0 to pi, alpha decreases from pi to 0.

Last edited: Jun 6, 2017
16. Jun 7, 2017

### McFluffy

Forget my answer because I noticed that $\alpha$ and $\beta$ always add up to $\pi$ which doesn't make any sense because two angles in triangle doesn't add up to $\pi$. I had graphed $\alpha(\beta)=\pi -\left(\arcsin \left(\frac{z\sin x}{\sqrt{c^2-2cz\cos x+z^2}}\right)+\arccos \left(\frac{\left(c\cos x-z\right)}{\sqrt{c^2-2cz\cos x+z^2}}\right)\right)$ for $0<\beta<\pi$:

And it seems to make sense, at least in my eyes. Is this the solution? I'm beginning to doubt myself considering I've made a huge error.

Last edited: Jun 7, 2017
17. Jun 7, 2017

### McFluffy

During halfway of the problem, I was presented with a system of trigonometric equation that you presented to me which is: $\begin{cases} A\cos{k}=c\cos{\beta}-z \\ A\sin{k}=c\sin{\beta} \end{cases}$

Initially, I found $k$(or the angle $\theta$ that we spoke of) using the $\arctan$ function but upon closer inspection of the graph, I concluded that it's false. Later, you suggested that $k=\arccos \left(\frac{\left(c\cos x-z\right)}{\sqrt{c^2-2cz\cos x+z^2}}\right)$. What if I were to find it using the $\arcsin$ function? To be more specific, can I find $\theta$ by using one of these three inverse functions or is there just one correct function and that I have to keep verifying my choice of functions by graphing, plugging in values, etc.?

18. Jun 7, 2017

### Ray Vickson

This problem becomes straightforward if you use cosines instead of sines. Let $b$ be the base of the triangle having hypotenuse $x$ and let $h$ be its height. The triangle with hypotenuse $y = c - x$ has base $z-b$, so we have $x^2 = b^2 + h^2$ and $y^2 = (z-b)^2 + h^2$. Therefore, $x^2-y^2 = b^2 - (z-b)^2 = 2bz - z^2$. However, we also have $x^2 - y^2 = (x+y)(x-y) = c (x -(c-x)) = c(2x - c),$ so $c(2x-c) = 2bz - z^2$. Solving for $b$ we get
$$b = \frac{z^2 + 2 c x - c^2}{2z}$$
Therefore, $\cos(\beta) = b/x = (z^2 + 2 c x - c^2)/(2 x z),$
and so
$$x =\frac{1}{2} \frac{c^2-z^2}{c - z \cos(\beta)}.$$
We also have
$$b = \frac{1}{2} \frac{\cos(\beta) (c^2-z^2)}{c - z \cos(\beta)}.$$
Therefore, we can obtain $\cos(\alpha) = (b-z)/y = (b-z)/(c-x)$ in terms of $\cos(\beta)$:
$$\cos(\alpha) = \frac{2cz - (c^2+z^2) \cos(\beta)}{c^2+z^2 - 2 c z \cos(\beta)}.$$

19. Jun 7, 2017

### McFluffy

Ah. I was too invested in the method I'd chose to consider this. This was a very straightforward approach like you said!

20. Jun 7, 2017

### McFluffy

No doubt that Ray's proposed approach is much more better than the approach I was going with. But I felt much more intrigued on investigating the method I was going with. Ever since ehild had suggested me a different function to find angle $\theta$ with the $\arccos$ function and that using it had enabled me to find the correct solution that Ray had laid out for me, I wondered if it is possible to obtain the same solution with the other inverse functions, $\arcsin,\arctan$ in particular. I was waiting for ehild to respond to my question but I couldn't wait any longer. I'm pleased to conclude that I can find the solution to this problem by using one of these inverse functions. With the help of Ray, I had some general idea to adjust the functions so it will conform to.the correct solution. Interestingly enough, I found that the other two solution can only be defined as a piecewise function. Here they are:

With $\arcsin$:

$\alpha(\beta)=\begin{cases} \pi -\arcsin \left(\frac{z\sin \beta}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arcsin \left(\frac{c\sin \beta}{\sqrt{c^2-2cz\cos \beta+z^2}}\right) & \text{ if } 0<\beta<\arccos{(\frac{z}{c})} \\ \lim_{\beta\to\arccos{(\frac{z}{c})}}\alpha(\beta) & \text{ if } \beta=\arccos{(\frac{z}{c})} \\ \pi -\arcsin \left(\frac{z\sin \beta}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\left(\pi -\arcsin \left(\frac{c\sin \beta}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)\right) & \text{ if } \arccos{(\frac{z}{c})}<\beta<\pi \end{cases}$

It's graph:

Which is the same as ehild and Ray's solution except that I left one point not included because:
The values of these two separate functions are not equal to each other when I set $\beta=\arccos{(\frac{z}{c})}$ but from the graph it seems to approach to some finite value so I'd defined it as the limit of $\alpha(\beta)$ as $\beta \to \arccos{(\frac{z}{c})}$. I think it's approaching $\arccos{(\frac{z}{c})}$.

The last one would be: $\alpha(\beta)= \begin{cases} \pi -\arcsin \left(\frac{z\sin \beta}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)-\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right) & \text{ if } 0<\beta<\arccos \left(\frac{z}{c}\right) \\ \lim_{\beta\to\arccos \left(\frac{z}{c}\right)}\alpha(\beta) & \text{ if } \beta=\arccos \left(\frac{z}{c}\right) \\ -\left(\arcsin \left(\frac{z\sin \beta}{\sqrt{c^2-2cz\cos \beta+z^2}}\right)+\arctan \left(\frac{c\sin \beta}{c\cos \beta-z}\right)\right) & \text{ if } \arccos \left(\frac{z}{c}\right)<\beta<\pi \end{cases}$ The graph being identical as the last one.

Overall, I think ehild and Ray's solution is better because $\alpha(\beta)$ wasn't defined to be a piecewise function for them. Thank you for helping, I learned more things from this.