Trigonometric System of Quadratic Equations
Given the system of equations below with variables x, y, beta and r, my goal is to eliminate x, y and beta in order to have a polynomial equation which admits r as one of its roots.
$$4r^2 = \left(\cos(\beta)+2\cos\left(-\frac{7\pi}{12}\right)\right)^2 r^2+\left(\frac{1}{2}+\left(\sin(\beta)+2\sin\left(\frac{-7\pi}{12}\right)\right)r\right)^2$$
$$ 4r^2 = \left(\frac{1}{2}-2\cos\left(\frac{-7\pi}{12}\right)r-x\right)^2+\left(-2\sin\left(\frac{-7\pi}{12}\right)r-y\right)^2$$
$$4r^2 = \left(\frac{1}{2}-\cos(\beta)r-2\cos\left(\frac{5\pi}{12}\right)r-x\right)^2+\left(\frac{1}{2}-\sin(\beta)r-2\sin\left(\frac{5\pi}{12}\right)r-y\right)^2$$
$$16r^2 = \left(x+1/2-2\cos\left(\frac{\pi}{12}\right)r\right)^2+\left(y-2\sin\left(\frac{\pi}{12}\right)r\right)^2$$
I tried to successively use solve in sage:
var('beta, r, x, y')
a = (x+1/2-cos(pi/12)*2*r)^2+(y-sin(pi/12)*2*r)^2-(1/2-cos(pi/12)*r*2-x)^2-(-sin(pi/12)*r*2-y)^2-12*r^2
a = a.full_simplify()
show(a)
b = (1/2-cos(pi/12)*r*2-x)^2+(-sin(pi/12)*r*2-y)^2-((1/2-cos(beta)*r-2*cos(5*pi/12)*r-x)^2+(1/2-sin(beta)*r-
2*sin(5*pi/12)*r-y)^2)
b = b.full_simplify()
show(b)
eq1 = a==0
eq2 = b==0
sol=solve([eq1, eq2], x, y)
show(sol)
eq3 = (1/2-cos(pi/12)*r*2-sol[0][0].rhs())^2+(-sin(pi/12)*r*2-sol[0][1].rhs())^2-4*r^2==0
eq4 = ((cos(beta)+2*cos(-7*pi/12))*r)^2+(1/2+(sin(beta)+2*sin(-7*pi/12))*r)^2-4*r^2==0
show(eq3)
show(eq4)
sol=solve([eq4], r)
show(sol[0].rhs().full_simplify())
f(beta) = sol[0].rhs()
show(f(-0.42806907644466885).n())
eq5 = sol[0]
show(eq5)
sol=solve([eq4], cos(beta))
show(sol)
f(beta, r) = sol[1].rhs()
show(f(-0.42806907644466885, 0.11605914696138518).n())
eq6 = sol[1]
show(eq6)
sol = solve([eq3, eq6], r)
show(sol)
Sadly however I am left with two equations in r and beta. I cannot seem to find a way to perform the final step of eliminating beta. I suppose this is due to the fact that beta appears as an argument of trigonometric functions.
$$4 r^{2} = \frac{1}{16} {\left(2 r {\left(\sqrt{6} + \sqrt{2}\right)} - \frac{4 {\left(\sqrt{6} {\left(2 \sqrt{2}
\cos\left(\beta\right) - 1\right)} + 13 \, \sqrt{2} - 8 \cos\left(\beta\right) + 8 \sin\left(\beta\right)\right)} r^{3} - 4 {\left(\sqrt{6} {\left(\sqrt{2} - \cos\left(\beta\right) - \sin\left(\beta\right)\right)} + \sqrt{2} {\left(\cos\left(\beta\right)
+ \sin\left(\beta\right)\right)} + 2\right)} r^{2} - r {\left(\sqrt{6} - \sqrt{2}\right)}}{2 {\left(\sqrt{6} {\left(2 \sqrt{2} -
\cos\left(\beta\right) + \sin\left(\beta\right)\right)} + \sqrt{2} {\left(\cos\left(\beta\right) +
\sin\left(\beta\right)\right)}\right)} r^{2} - r {\left(\sqrt{6} + 3 \sqrt{2} + 2 \, \sin\left(\beta\right)\right)} + 1} -
2\right)}^{2} + \frac{1}{16} {\left(2 r {\left(\sqrt{6} - \sqrt{2}\right)} - \frac{4 {\left(\sqrt{6} {\left(2 \, \sqrt{2}
\sin\left(\beta\right) + 1\right)} + 13 \sqrt{2} - 8 \cos\left(\beta\right) + 8 \sin\left(\beta\right)\right)} r^{3} - 4
{\left(2 \sqrt{6} {\left(\cos\left(\beta\right) + \sin\left(\beta\right)\right)} + 2 \sqrt{2} \sin\left(\beta\right) +
3\right)} r^{2} + r {\left(3 \sqrt{6} - \sqrt{2} + 4 \cos\left(\beta\right) + 4 \, \sin\left(\beta\right)\right)} - 1}{2
{\left(\sqrt{6} {\left(2 \sqrt{2} - \cos\left(\beta\right) + \sin\left(\beta\right)\right)} + \sqrt{2}
{\left(\cos\left(\beta\right) + \sin\left(\beta\right)\right)}\right)} r^{2} - r {\left(\sqrt{6} + 3 \, \sqrt{2} + 2
\sin\left(\beta\right)\right)} + 1}\right)}^{2}$$
$$ r = -\frac{\sqrt{6} + \sqrt{2} - \sqrt{4 \, {\left(\sqrt{6} - \sqrt{2}\right)} \cos\left(\beta\right) - 4 \, \cos\left(\beta\right)^{2} + 2 \, \sqrt{6} \sqrt{2} + 8} - 2 \, \sin\left(\beta\right)}{4 \, {\left({\left(\sqrt{6} - \sqrt{2}\right)} \cos\left(\beta\right) - \cos\left(\beta\right)^{2} + {\left(\sqrt{6} + \sqrt{2}\right)} \sin\left(\beta\right) - \sin\left(\beta\right)^{2}\right)}}$$
I know the approximate numerical solutions are as follows:
x= 0.17943518672220243 y= 0.15109739303031233 beta= -0.42806907644466885 r= 0.11605914696138518
Any idea how to perform the last step, eliminate the variable beta and obtain a minimum polynomial for r?
In advance thanks a lot for your Help!