Le lundi 13 août 2018 19:12:11 UTC+2, Dominique Laurain a écrit : > > One line answer : > > a,b,x,y = var('a,b,x,y') ; solve([ x + y == a, x - 2*y == b > ],x,y,dontsolve='a,b') >
You don't even need that. Just specify that you want to solve for x and y : sage: var("x,y,a,b") (x, y, a, b) sage: solve([x+y==a,x-2*y==b],[x,y]) [[x == 2/3*a + 1/3*b, y == 1/3*a - 1/3*b]] HTH, > First statement is to declare symbolic vars a,b,x,y and second statement > is for solving in symbolics x,y > > Dominique > > PS : use asksagemath.org > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.