Re: [sage-support] linear solutions

2016-09-10 Thread Michael Orlitzky
On 09/10/2016 04:41 PM, Anton Sherwood wrote:
> I haven't guessed the right keywords.  How do I solve a set of linear 
> equations in which the coefficients are symbolic expressions like 
> a^2-sqrt(b)?
> 

Try creating vectors/matrices over the symbolic ring "SR", and then use
solve_left or solve_right. For example,

  sage: a,b = SR.var('a,b',domain='real')
  sage: A = matrix(SR,[[a+b, a-b],[a-b^2,a+b^2]])
  sage: z = vector(SR,[1,2])
  sage: A.solve_right(z)
  (-(a - b)*((b^2 - a)/(a + b) + 2)/((b^2 + (b^2 - a)*(a - b)/(a + b) +
  a)*(a + b)) + 1/(a + b), ((b^2 - a)/(a + b) + 2)/(b^2 + (b^2 - a)*(a
  - b)/(a + b) + a))


-- 
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.


[sage-support] linear solutions

2016-09-10 Thread Anton Sherwood
I haven't guessed the right keywords.  How do I solve a set of linear 
equations in which the coefficients are symbolic expressions like 
a^2-sqrt(b)?


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.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.