# How do I find the angle of the second right triangle?

(This is actually an electrical engineering problem. I just simplified it to a math problem. The three triangles actually represent three complex numbers, which, as you know, can also be viewed as 2D vectors. The third triangle is the resultant vector of the first two triangles/vectors)

Problem statement

Given that $$\cos\theta_1=0.8$$ and $$\cos\theta_3=0.9$$, find $$\cos\theta_2$$ if $$BC+EF=HI$$ and $$AC+DF=GI$$.

My attempt

Let $$HG=S$$. Now,

For the first equation,

$$2000\cdot\cos\theta_{1}+500\cdot\cos\theta_2=S\cos\theta_3$$

$$\implies 2000\cdot0.8+500\cdot\cos\theta_2=S\cdot0.9$$

$$\implies 1600+500\cos\theta_2=0.9S\tag{1}$$

For the second equation,

$$2000\cdot\sin\theta_{1}+500\cdot\sin\theta_2=S\sin\theta_3$$

$$\implies 2000\cdot0.6+500\sin\theta_2=S\cdot \sin(\arccos(0.9))$$

$$[\text{Let \sin(\arccos(0.9))=k}]$$

$$\implies 1200+500\sin\theta_2=kS\tag{2}$$

Now,

$$\text{(1)/(2)}$$

$$\frac{1600+500\cos\theta_2}{1200+500\sin\theta_2}=\frac{0.9S}{kS}$$

$$\implies\frac{1600+500\cos\theta_2}{1200+500\sin\theta_2}=\frac{0.9}{k}$$

$$\implies1080+450\sin\theta_2=1600k+500k\cos\theta_2$$

$$\implies 450\sin\theta_2=(1600k-1080)+500k\cos\theta_2$$

$$\implies 450^2\sin^2\theta_2=(1600k-1080)^2+2\cdot(1600k-1080)\cdot500k\cos\theta_2+(500k)^2\cos^2\theta_2\tag{3}$$

$$\implies 450^2(1-\cos^2\theta_2)=(1600k-1080)^2+2\cdot(1600k-1080)\cdot500k\cos\theta_2+(500k)^2\cos^2\theta_2$$

$$\implies450^2-450^2\cos^2\theta_2=(1600k-1080)^2+2\cdot(1600k-1080)\cdot500k\cos\theta_2+(500k)^2\cos^2\theta_2$$

$$\implies((500k)^2+450^2)\cos^2\theta_2+2\cdot(1600k-1080)\cdot500k\cos\theta_2+((1600k-1080)^2-450^2)=0$$

$$\implies \cos\theta_2=0.91, -0.2459$$

Verification

Although I have found two values for $$\cos\theta_2$$, there could be extraneous roots due to $$(3)$$. So, I have to verify the solutions.

One way to verify would be to construct the third triangle, and find $$\cos\theta_3$$, and see if it equals $$0.9$$. Let's do that.

Using $$\cos\theta_2=0.91$$,

$$HI=1600+500\cdot0.91=2055$$

$$IG=1200+500\sin(\arccos(0.91))=1407.304$$

$$HG=\sqrt{2055^2+1407.304^2}=2490.6866$$

Now,

$$\cos\theta_3=\frac{2055}{2490.6886}=0.825\ne0.9$$

So, 0.91 is not a solution. Let's use $$\cos\theta_2=-0.2459$$ then.

Using $$\cos\theta_2=-0.2459$$,

$$HI=1600+500\cdot-0.2459=1477.05$$

$$IG=1200+500\sin(\arccos(-0.2459))=1684.6476$$

$$HG=\sqrt{1477.05^2+1684.6476^2}=2240.47$$

Now,

$$\cos\theta_3=\frac{1477.05}{2240.47}=0.659\ne0.9$$

I am surprised. None of the solutions I got are correct. Was $$(3)$$ a wrong thing to do? What mistake did I make?

Related

In your verifications, you assume that $$(x,y)=(\cos\theta,\sin\theta)\implies y=\sin(\arccos x)=\sqrt{1-x^2}$$ This amounts to assuming that $$\sin^2\theta=1-\cos\theta^2\implies \sin\theta=\sqrt{1-\cos\theta}$$. But this ignores the possibility of $$\sin\theta$$ being negative, so in the first case we should also consider

\begin{align} IG&=1200-500\sin(\arccos(0.91))=992.7,\\ HG&=\sqrt{2055^2+992.7^2}=2282.2 \end{align} This yields $$\cos\theta_3=2055/2282.2=0.900$$, so the first solution is valid. The second solution is verified similarly.

Here is an alternative solution which leverages complex numbers. As implied by the OP's diagrams, we want three complex numbers $$(z_1,z_2,z_3)=(r_1 e^{i\theta_1},r_2e^{i\theta_2},r_3e^{i\theta_3})$$ where

$$r_1=2000, \quad r_2=500, \theta_2=\cos^{-1}0.8\approx 36.87^\circ,\quad \theta_3=\cos^{-1}0.9\approx 25.84^\circ$$ subject to the constraint $$z_3=z_1+z_2$$. If we divide both sides of th e constraint by $$e^{i\theta_3}$$, we get

$$r_3=r_1 e^{i(\theta_1-\theta_3)}+r_2 e^{i(\theta_2-\theta_3)}$$ Taking imaginary parts of both sides then yields

$$0=r_1\sin(\theta_1-\theta_3)+r_2\sin(\theta_2-\theta_3)$$ which we can rearrange to obtain

$$\sin(\theta_2-\theta_3)=-\frac{r_1}{r_2}\sin(\theta_1-\theta_3)$$ The RHS can be further expanded using the angle-addition formula but this seems unproductive. We can invert sine, but must bear in mind that $$\sin(\pi-\theta)=\sin(\theta)$$. This yields two solutions:

\begin{align} \theta_{2,1} &=\theta_3-\arcsin\left(\frac{r_1}{r_2}\sin(\theta_1-\theta_3)\right)\approx -24.08^\circ\\ \theta_{2,2} &=\theta_3-\pi+\arcsin\left(\frac{r_1}{r_2}\sin(\theta_1-\theta_3)\right)\approx -104.24^\circ \end{align} where for personal taste I've picked representatives in $$\theta_2\in (-\pi,0)$$ rather than in $$(\pi,2\pi)$$.

This yields $$\cos\theta_2\approx 0.913, -0.246$$ respectively in agreement with the OP. If we do insist on an exact answer, tedious but straightforward use of trig identities yields

$$\cos\theta_2 = \frac{27 \sqrt{19}}{125}\pm \left(\frac{9}{10} \sqrt{1-\left(\frac{54}{25}-\frac{8 \sqrt{19}}{25}\right)^2}-\frac{76}{125}\right)$$

This isn't a correction of your calculations, but I just wanted to offer a different, more visual approach to solving this.

In the image above, the red triangle is $$\triangle ABC$$ whose angle $$\theta_1$$ is touching the origin. The blue triangle is $$\triangle DEF$$ whose angle $$\theta_2$$ (value currently unknown) is touching $$\angle BAC$$. It's important to note that $$BC \parallel EF$$ and $$AC \parallel DF$$, because this allows us to construct the green triangle $$\triangle GHI$$ whose side lengths $$HI$$ and $$GI$$ are obtained by adding the corresponding side length vectors of the first two triangles, and whose angle $$\theta_3$$ is touching the origin. With this setup, $$\angle HGI$$ will always be touching $$\angle EDF$$, which means a change in $$\theta_2$$ will cause a corresponding change in $$\theta_3$$.

Now, our goal is to find a value of $$\theta_2$$ where $$\cos(\theta_3)=0.9$$. We can express $$\cos(\theta_3)$$ as the ratio $$\frac{HI}{GH}$$. We can go even further and express the ratio in terms of $$\triangle ABC$$ and $$\triangle DEF$$:

$$HI=1600+500\cos(\theta_2)\\ GH=\sqrt{(1600+500\cos(\theta_2))^2+(1200+500\sin(\theta_2))^2}$$

$$\frac{HI}{GH}=\frac{1600+500\cos(\theta_2)}{\sqrt{(1600+500\cos(\theta_2))^2+(1200+500\sin(\theta_2))^2}}=0.9$$

Now we have to solve the above equation for $$\theta_2$$:

$$\frac{1600+500\cos(\theta_2)}{\sqrt{(1600+500\cos(\theta_2))^2+(1200+500\sin(\theta_2))^2}}=0.9$$

$$\frac{(1600+500\cos(\theta_2))^2}{(1600+500\cos(\theta_2))^2+(1200+500\sin(\theta_2))^2}=0.81\;\;\Leftarrow\;\;\text{Squared both sides}$$

$$(1600+500\cos(\theta_2))^2=0.81(1600+500\cos(\theta_2))^2+0.81(1200+500\sin(\theta_2))^2$$

$$0.19(1600+500\cos(\theta_2))^2=0.81(1200+500\sin(\theta_2))^2$$

By this point, I realized that the equation couldn't be solved analytically, so I decided to approximate the roots by graphing and observation. I ended up with $$\theta_2\approx-24.079^\circ , -104.238^\circ$$, which means $$\cos(\theta_2)\approx0.913,-0.246$$. Below is a visual representation:

$$\Leftarrow\;\theta_2=-24.079^\circ, \cos(\theta_2)\approx0.913$$

$$\Leftarrow\;\theta_2=-104.238^\circ, \cos(\theta_2)\approx-0.246$$