Ask Your Question

aobara's profile - activity

2024-05-02 14:21:33 +0200 received badge  Famous Question (source)
2024-02-05 16:43:36 +0200 received badge  Notable Question (source)
2024-01-09 08:21:54 +0200 commented answer Large System of Quadratic Trigonometric Equations

Yes it worked! Thanks a lot Max!!

2024-01-08 20:10:53 +0200 received badge  Nice Answer (source)
2024-01-08 18:53:42 +0200 received badge  Self-Learner (source)
2024-01-08 18:53:42 +0200 received badge  Necromancer (source)
2024-01-08 18:28:40 +0200 commented answer Large System of Quadratic Trigonometric Equations

Yes indeed! Thanks for pointing that out. Luckily it did return the correct root but by chance I guess. Did not notice t

2024-01-08 18:18:01 +0200 commented answer Large System of Quadratic Trigonometric Equations

Yes indeed! Thanks for pointing that up. Luckily it did return the correct root but by chance I guess. Did not notice th

2024-01-06 16:17:55 +0200 commented answer Large System of Quadratic Trigonometric Equations

As an example take equation (1) and (2) from the original set of equations. Add (1) + l i * (2) yields: $$ 0 = l (4 e^

2024-01-05 16:31:39 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:24:43 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:21:23 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:11:29 +0200 marked best answer Large System of Quadratic Trigonometric Equations

Following the answers provided in 2 previous posts https://ask.sagemath.org/question/706... and https://ask.sagemath.org/question/726..., we tried to apply the proposed methods to a yet more complex system of trigonometric equations.

We are now considering a system with one distance variable $l$, and 10 angle variables $\alpha$, $\beta$, $\gamma$, $\delta$, $\rho$, $a$, $b$, $c$, $d$ and $e$. The said trigonometric system of equations is consistuted of 11 equations as described below:

$$ 0 = l \left( {4} \cos{\left({{\alpha}}\right)} + \cos{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} + \cos{\left({{\beta}}\right)} + \cos{\left({{\alpha} - \frac{{2} {\pi}}{{3}}}\right)} \right) - {1} $$ $$ 0 = {4} \sin{\left({{\alpha}}\right)} + \sin{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} + \sin{\left({{\beta}}\right)} + \sin{\left({{\alpha} - \frac{{2} {\pi}}{{3}}}\right)} $$ $$ 0 = {2} \cos{\left({{\alpha}}\right)} - \cos{\left({{\gamma}}\right)} - \cos{\left({{\delta}}\right)} - \cos{\left({{\rho}}\right)} + \cos{\left({{\alpha} + \frac{{2} {\pi}}{{3}}}\right)} $$ $$ 0 = l \left( {2} \sin{\left({{\alpha}}\right)} - \sin{\left({{\gamma}}\right)} - \sin{\left({{\delta}}\right)} - \sin{\left({{\rho}}\right)} + \sin{\left({{\alpha} + \frac{{2} {\pi}}{{3}}}\right)} \right) - {1} $$ $$ 0 = \cos{\left({a}\right)} - \cos{\left({b}\right)} - \cos{\left({c}\right)} + \cos{\left({{\gamma}}\right)} + \cos{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} $$ $$ 0 = \sin{\left({a}\right)} - \sin{\left({b}\right)} - \sin{\left({c}\right)} + \sin{\left({{\gamma}}\right)} + \sin{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} $$ $$ 0 = \cos{\left({c}\right)} + \cos{\left({e}\right)} - \cos{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} - \cos{\left({{\alpha}}\right)} + \cos{\left({{\delta}}\right)} $$ $$ 0 = \sin{\left({c}\right)} + \sin{\left({e}\right)} - \sin{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} - \sin{\left({{\alpha}}\right)} + \sin{\left({{\delta}}\right)} $$ $$ 0 = \cos{\left({b}\right)} + \cos{\left({d}\right)} - \cos{\left({{\rho}}\right)} - \cos{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} - \cos{\left({e}\right)} $$ $$ 0 = \sin{\left({b}\right)} + \sin{\left({d}\right)} - \sin{\left({{\rho}}\right)} - \sin{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} - \sin{\left({e}\right)} $$ $$ 0 = \cos{\left({{\rho}}\right)} + \cos{\left({{\alpha} - \frac{{\pi}}{{3}}}\right)} + \cos{\left({{\alpha}}\right)} - \cos{\left({{\gamma}}\right)} - \cos{\left({{\delta}}\right)} - \cos{\left({d}\right)} - \cos{\left({a}\right)} $$

as usual, we are interested in finding the minimal polynomial of the root $l$ between 0 and 1 for which a numerical appriximation is $l \approx 0.2226926944766917$.

Below is my (unsuccessfull) attempt to use to solve this problem:

#numerical values
l = 0.2226926944766917
alpha = 0.6331728275782392
beta = -1.3273875824789818
gamma = -1.4524093897328
delta = -1.226349124695996
rho = -1.3273875824743633
a = 0.9747473834353503
b = -0.9033592481852397
c = 0.2194297013449713
d = 0.33163441038029523
e = 1.1505721363111867

# conversion to non trig variables

c0 = cos(alpha)
s0 = sin(alpha)
c1 = cos(beta)
s1 = sin(beta)
c2 = cos(gamma)
s2 = sin(gamma)
c3 = cos(delta)
s3 = sin(delta)
c4 = cos(rho)
s4 = sin(rho)
c5 = cos(a)
s5 = sin(a)
c6 = cos(b)
s6 = sin(b)
c7 = cos(c)
s7 = sin(c)
c8 = cos(d)
s8 = sin(d)
c9 = cos(e)
s9 = sin(e)

# system of equations
eq1 = 4*c0+(c0+sqrt(3)*s0)/2+c1+(-c0+sqrt(3)*s0)/2-1/l
eq2 = 4*s0+(-sqrt(3)*c0+s0)/2+s1+(-sqrt(3)*c0-s0)/2
eq3 = 2*c0-c2-c3-c4-(c0+sqrt(3)*s0)/2
eq4 = 2*s0-s2-s3-s4+(sqrt(3)*c0-s0)/2-1/l
eq5 = c5-c6-c7+c2+(c0+sqrt(3)*s0)/2
eq6 = s5-s6-s7+s2+(-sqrt(3)*c0+s0)/2
eq7 = c7+c9-(c0+sqrt(3)*s0)/2-c0+c3
eq8 = s7+s9-(-sqrt(3)*c0+s0)/2-s0+s3
eq9  = c6+c8-c4-(c0+sqrt(3)*s0)/2-c9
eq10 = s6+s8-s4-(-sqrt(3)*c0+s0)/2-s9
eq11 = c4+(c0+sqrt(3)*s0)/2+c0-c2-c3-c8-c5




#numerical check
show(eq1.numerical_approx())
show(eq2.numerical_approx())
show(eq3.numerical_approx())
show(eq4.numerical_approx())
show(eq5.numerical_approx())
show(eq6.numerical_approx())
show(eq7.numerical_approx())
show(eq8.numerical_approx())
show(eq9.numerical_approx())
show(eq10.numerical_approx())
show(eq11.numerical_approx())


reset()
from time import time as stime
RR.<l, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, str3 >=AA[]
Sys = [ # linear equations
    l*(4*c0+(c0+str3*s0)/2+c1+(-c0+str3*s0)/2)-1,
    4*s0+(-str3*c0+s0)/2+s1+(-str3*c0-s0)/2,
    2*c0-c2-c3-c4-(c0+str3*s0)/2,
    l*(2*s0-s2-s3-s4+(str3*c0-s0)/2)-1,
    c5-c6-c7+c2+(c0+str3*s0)/2,
    s5-s6-s7+s2+(-str3*c0+s0)/2,
    c7+c9-(c0+str3*s0)/2-c0+c3,
    s7+s9-(-str3*c0+s0)/2-s0+s3,
    c6+c8-c4-(c0+str3*s0)/2-c9,
    s6+s8-s4-(-str3*c0+s0)/2-s9,
    c4+(c0+str3*s0)/2+c0-c2-c3-c8-c5,
    # Trigonometrics
    str3^2-3,
    s0^2 + c0^2 -1,
    s1^2 + c1^2 -1, 
    s2^2 + c2^2 -1, 
    s3^2 + c3^2 -1, 
    s4^2 + c4^2 -1, 
    s5^2 + c5^2 -1, 
    s6^2 + c6^2 -1, 
    s7^2 + c7^2 -1, 
    s8^2 + c8^2 -1, 
    s9^2 + c9^2 -1]
J1 = RR.ideal(Sys)
print("Solution dimension = ", J1.dimension())
t0 = stime()
Sols = J1.variety()
t1 = stime()
print("Number of solutions = ", len(Sols), ", found in %f6.3 seconds."%(t1-t0))
Errs = [abs(s[l]-0.22269269447669) for s in Sols]
Sol = Sols[Errs.index(min(Errs))]
show(Sols)
t2 = stime()
print(Sol[r])
P = Sol[l].minpoly()
t3 = stime()
print("Minimal polynomial (found in %f6.3 seconds) :"%(t3-t2))
print(P)

Permalink for testing purposes:

https://sagecell.sagemath.org/?z=eJx9...

Additionnal Permalink using Elimination_ideal, also fails:

https://sagecell.sagemath.org/?z=eJy1...

In this case sagemathcell websocket kernell crashes at the following line J1 = RR.ideal(Sys). Because no error message is returned we have no idea what is going wrong. It could yet again be a mistake on our side. We have included all numerical checks of the system's equations in order to facilitate further analysis. We are aware that this particular system is now much larger than the ones in previous posts, but do not know if it does not work because of a mistake on our side, or if we are pushing beyond the limits of sagemath?

In advance, thanks for your help.

kr,

2024-01-05 16:10:05 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:07:36 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:06:00 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:03:53 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 16:01:21 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 15:58:48 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 15:22:47 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 15:11:12 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 14:57:20 +0200 edited answer Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2024-01-05 14:47:13 +0200 answered a question Large System of Quadratic Trigonometric Equations

I finally got to a result using a completely different approach. First I noticed $\rho$ and $\beta$ are one and the same

2023-12-18 09:49:21 +0200 received badge  Enthusiast
2023-11-14 01:12:26 +0200 received badge  Popular Question (source)
2023-11-12 12:07:35 +0200 commented question Large System of Quadratic Trigonometric Equations

Thanks, I just tried but for this particular problem does not seem to be sufficient. Thanks though for the tip...

2023-11-11 17:16:18 +0200 commented question Large System of Quadratic Trigonometric Equations

@Max Alkseyev, I removed the dimension call and confirm that RR.ideal returns successfully. However, elimination_ideal d

2023-11-11 17:14:40 +0200 edited question Large System of Quadratic Trigonometric Equations

Large System of Quadratic Trigonometric Equations Following the answers provided in 2 previous posts https://ask.sagemat

2023-11-07 16:57:02 +0200 commented question Large System of Quadratic Trigonometric Equations

Thanks a lot! I will have a look at it.

2023-11-07 15:24:13 +0200 commented question Large System of Quadratic Trigonometric Equations

Wow !! That is remarkable ... Thank you so much for your help. Thanks for the explanations. Hopefully 7 days will be eno

2023-11-07 14:50:42 +0200 commented question Large System of Quadratic Trigonometric Equations

I don't understand. There is a print statement right after that print("Solution dimension = ", J1.dimension()), however

2023-11-07 14:44:16 +0200 commented question Large System of Quadratic Trigonometric Equations

I don't understand. There is a print statement right after that print("Solution dimension = ", J1.dimension()), however

2023-11-07 10:46:54 +0200 received badge  Nice Question (source)
2023-11-06 19:36:40 +0200 edited question Large System of Quadratic Trigonometric Equations

Large System of Trigonometric Equations Following the answers provided in 2 previous posts https://ask.sagemath.org/ques

2023-11-06 16:46:03 +0200 marked best answer 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!

2023-11-06 16:46:02 +0200 commented answer Trigonometric System of Quadratic Equations

Hi Ricardo, Truly sorry to solicit your attention again. I once again have a similar question but this time I believe m

2023-11-05 19:23:03 +0200 commented question Large System of Quadratic Trigonometric Equations

Permalink added in the Question Edit Box under the Sage Code Box

2023-11-05 19:21:47 +0200 commented question Large System of Quadratic Trigonometric Equations

Here is what I see in the browser network console Kernel: kernel_starting (null) 2kernel.js:107 Kernel: kernel_created

2023-11-05 19:21:24 +0200 commented question Large System of Quadratic Trigonometric Equations

Here is what I see in the browser network console Kernel: kernel_starting (null) 2kernel.js:107 Kernel: kernel_created

2023-11-05 19:21:11 +0200 edited question Large System of Quadratic Trigonometric Equations

Large System of Trigonometric Equations Following the answers provided in 2 previous posts https://ask.sagemath.org/ques

2023-11-05 19:19:10 +0200 commented question Large System of Quadratic Trigonometric Equations

Here is what I see in the browser network console Kernel: kernel_starting (null) 2kernel.js:107 Kernel: kernel_created

2023-11-05 18:10:31 +0200 commented question Large System of Quadratic Trigonometric Equations

Oh ok but, actually I do not have a local Sage installation. I am using the online version on https://sagecell.sagemath.

2023-11-05 17:37:48 +0200 edited question Large System of Quadratic Trigonometric Equations

Large System of Trigonometric Equations Following the answers provided in 2 previous posts https://ask.sagemath.org/ques

2023-11-05 17:15:17 +0200 edited question Large System of Quadratic Trigonometric Equations

Large System of Trigonometric Equations Following the answers provided in 2 previous posts https://ask.sagemath.org/ques

2023-11-05 17:14:29 +0200 edited question Large System of Quadratic Trigonometric Equations

Large System of Trigonometric Equations Following the answers provided in 2 previous posts https://ask.sagemath.org/ques

2023-11-05 17:14:29 +0200 received badge  Associate Editor (source)
2023-11-05 17:05:40 +0200 commented answer Finding the minimal polynomial for a solution of a trigonometric system of quadratic equations

Dear Mas, I now have a similar problem with this time some issue on the line J1 = RR.ideal(Sys2). I posted the descripti

2023-11-05 16:54:03 +0200 received badge  Popular Question (source)