I have a set of equations which I tried to solve. The function solve gives me 4 solutions all of which have s5=0. However, when manually solving them, I had already found some solutions by setting s1 and s3 to 0. If I explicitly substitute a value for s5, and then use solve again, I now suddenly get two different solutions.
What I'm mainly after is an answer to the following:
- What causes this behaviour?
- Is there a way to know whether solve has found all solutions?
- Is there a way for solve to find these six solutions in one go? (e.g. by tweaking the parameters or equations?)
Code:
var("s3 s5 s1 s6")
eqs = [
8*s3^2 - 16*s3*s5 + 18*s5^2 - 1 == 0,
48*s1^2 - 36*s1*s5 + 18*s5^2 - 1 == 0,
1/25*sqrt(5)*(40*sqrt(5)*s3^2 + 5*sqrt(5)*s6^2 + 10*sqrt(3)*sqrt(2)*s3 - 10*(sqrt(5)*sqrt(3)*s3 + sqrt(2))*s6 - 3*sqrt(5)) == 0,
9600*s1^2*s3^2*s5^2 + 600*(9*s1^2 + 6*s1*s3 + s3^2)*s5^4 - 4800*(3*s1^2*s3 + s1*s3^2)*s5^3 == 0,
80/9*s3^4 + 40/9*(4*sqrt(5)*sqrt(3)*sqrt(2)*s3^3 + 15*s3^4 + 8*s3^2)*s5^2 + 200/9*(s3^4 - 4*s3^3*s5 + 4*s3^2*s5^2)*s6^2 - 80/9*(sqrt(5)*sqrt(3)*sqrt(2)*s3^4 + 4*s3^3)*s5 - 80/9*(sqrt(5)*sqrt(2)*s3^4 + 2*(5*sqrt(3)*s3^3 + 2*sqrt(5)*sqrt(2)*s3^2)*s5^2 - (5*sqrt(3)*s3^4 + 4*sqrt(5)*sqrt(2)*s3^3)*s5)*s6 == 0]
print("Solve for 4 vars")
print(solve(eqs, [s3, s5, s1, s6]))
print("Set one var and solve for other")
print(solve([eq.subs(s5=sqrt(2)/6) for eq in eqs], [s3, s1, s6]))
Output:
Solve for 4 vars
[
[s3 == -1/4*sqrt(2), s5 == 0, s1 == -1/12*sqrt(3), s6 == 1/5*sqrt(10)],
[s3 == -1/4*sqrt(2), s5 == 0, s1 == 1/12*sqrt(3), s6 == 1/5*sqrt(10)],
[s3 == 1/4*sqrt(2), s5 == 0, s1 == -1/12*sqrt(3), s6 == 1/5*sqrt(10)],
[s3 == 1/4*sqrt(2), s5 == 0, s1 == 1/12*sqrt(3), s6 == 1/5*sqrt(10)]
]
Set one var and solve for other
[
[s1 == 0, s3 == 0, s6 == 1/5*sqrt(5)*sqrt(2) - 1],
[s1 == 0, s3 == 0, s6 == 1/5*sqrt(5)*sqrt(2) + 1]
]