gpt4 book ai didi

python - SageMath 中的联立方程

转载 作者:行者123 更新时间:2023-12-01 01:09:44 25 4
gpt4 key购买 nike

如何使用 Sagemath 求解联立方程:

x^2 +y^2 +6z^2 = 3

6x^2 +6y^2 +z^2 = 2

x +y+z = 0

最佳答案

使用户8408080的答案more explicit :

sage: var('y,z')
sage: solve([x^2 +y^2 +6*z^2 == 3, 6*x^2 +6*y^2 +z^2 == 2,x+y+z == 0],x,y,z)
[[x == -1/70*sqrt(70) + 2/35*sqrt(35), y == 1/70*sqrt(70) + 2/35*sqrt(35), z == -4/35*sqrt(35)], [x == 1/70*sqrt(70) - 2/35*sqrt(35), y == -1/70*sqrt(70) - 2/35*sqrt(35), z == 4/35*sqrt(35)], [x == 1/70*sqrt(70) + 2/35*sqrt(35), y == -1/70*sqrt(70) + 2/35*sqrt(35), z == -4/35*sqrt(35)], [x == -1/70*sqrt(70) - 2/35*sqrt(35), y == 1/70*sqrt(70) - 2/35*sqrt(35), z == 4/35*sqrt(35)]]

关于python - SageMath 中的联立方程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54972120/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com