Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I get sage to solve a set of 3 equations in 3 variables and a bunch of constants

Here is my sage code:

a, b, c, d, e, f, k, l, m, n, x, y, z = var('a, b, c, d, e, f, k, l, m, n, x, y, z')

eq1 = xk+(a/m)-(xd/(sqrt(x^2+y^2+z^2)ef))==0

eq2 = yl+(b/m)-(yd/(sqrt(x^2+y^2+z^2)ef))==0

eq3 = zn+(c/m)-(zd/(sqrt(x^2+y^2+z^2)ef))==0

print solve([eq1,eq2,eq3],x,y,z)

when I evaluate this, all I get are input equations pretty printed. I am expecting a solution for x, y and z in other constant symbols and that's not happening.

How can I get sage to solve these equations?

click to hide/show revision 2
No.2 Revision

updated 2015-02-09 21:35:44 -0600

kcrisman gravatar image

How do I get sage to solve a set of 3 equations in 3 variables and a bunch of constants

Here is my sage code:

a, b, c, d, e, f, k, l, m, n, x, y, z = var('a, b, c, d, e, f, k, l, m, n, x, y, z')

z')

eq1 = xk+(a/m)-(xd/(sqrt(x^2+y^2+z^2)ef))==0

x*k+(a/m)-(x*d/(sqrt(x^2+y^2+z^2)*e*f))==0

eq2 = yl+(b/m)-(yd/(sqrt(x^2+y^2+z^2)ef))==0

y*l+(b/m)-(y*d/(sqrt(x^2+y^2+z^2)*e*f))==0

eq3 = zn+(c/m)-(zd/(sqrt(x^2+y^2+z^2)ef))==0

z*n+(c/m)-(z*d/(sqrt(x^2+y^2+z^2)*e*f))==0

print solve([eq1,eq2,eq3],x,y,z)

solve([eq1,eq2,eq3],x,y,z)

when I evaluate this, all I get are input equations pretty printed. I am expecting a solution for x, y and z in other constant symbols and that's not happening.

How can I get sage to solve these equations?

How do I get sage to solve a set System of 3 equations in 3 variables and a bunch of constantswith symbolic coefficients

Here is my sage Sage code:

a, b, c, d, e, f, k, l, m, n, x, y, z = var('a, b, c, d, e, f, k, l, m, n, x, y, z')
 eq1 = x*k+(a/m)-(x*d/(sqrt(x^2+y^2+z^2)*e*f))==0
 eq2 = y*l+(b/m)-(y*d/(sqrt(x^2+y^2+z^2)*e*f))==0
 eq3 = z*n+(c/m)-(z*d/(sqrt(x^2+y^2+z^2)*e*f))==0
 print solve([eq1,eq2,eq3],x,y,z)

when When I evaluate this, all I get are my original input equations pretty printed. equations, pretty-printed.

I am expecting a solution for x, y and z in terms of the other constant symbols and that's not happening. happening.

How can I get sage Sage to solve these equations?