Il 30/11/2011 20:17, Th ha scritto:
Dear All,
What about this one ?
var('a,b,c,d,x,y')
def equations(a,b,c,d,x,y):
return [a*x+b*y==1,c*x+d*y==2]
print solve(equations(a,b,c,d,x,y),[x,y])
print solve(equations(a,a,c,c,x,y),[x,y])
The second one has no solutions since it solves
ax+ay==1
cx+cy==2
and there are no assumptions about 1/a = 2/c or not.
Hope it helps
have a good night
Laurent
I am new to sage (converting from mathcad), so please forgive my basic
question.
I am trying to solve system of equations in a symbolic way, as a
simple example:
var('a,b,c,d,d1,d2,d3,x,x1,x2,x3,y,y1,y2,y3')
symsys=[
a+b*x1+c*y1==d1,
a+b*x2+c*y2==d2,
a+b*x3+c*y3==d3
]
result=solve(symsys,a,b,c)[0]
This is fine, but my problem starts when i start to derive special
cases. For example how can i simplify the system symbolically, if
d=d1=d2=d3?
Tried:
- assume(d1==d2, d1==d3) and solve
- set d1=d d2=d d3=d and solve
But the result did not get simplified.
I would always like to start from the general system and apply
different simplifications for special cases. Can someone please show
me the proper way to do this?
Thanks in advance:
Th
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org