Hi,

On Thu, Apr 08, 2010 at 07:47:57AM -0600, Aaron S. Meurer wrote:
> Maybe we should add an option to solve() to return an Eq().
> 

better, we should unify resulting data structures from all kinds of
solvers and then think of returning Eq() by default or only when a
certain flag is set. We should keep in mind that what is returned
from solvers should be easily put back with subs() to verify results.

> Aaron Meurer
> On Apr 8, 2010, at 6:18 AM, Mateusz Paprocki wrote:
> 
> > Hi,
> > 
> > On Thu, Apr 08, 2010 at 03:00:41AM -0700, Dan wrote:
> >> Dear list,
> >> 
> >> Is there a way to rearrange equations using sympy? A really simple
> >> example, if I had,
> >> 
> >> y = x*2 + a
> >> 
> >> could I isolate x, to give,
> >> 
> >> x = (y - a)/2
> >> 
> > 
> > currently there is no dedicated function for this purpose. However, you
> > can use the following simple code snippet to obtain requested behavior:
> > 
> > In [1]: var('a')
> > Out[1]: a
> > 
> > In [2]: eq = Eq(y, x*2 + a)
> > 
> > In [3]: Eq(x, solve(eq, x)[0])
> > Out[3]: 
> >    y   a
> > x = ─ - ─
> >    2   2
> > 
> >> Best regards,
> >> 
> >> Dan
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google Groups 
> >> "sympy" group.
> >> 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/sympy?hl=en.
> >> 
> > 
> > -- 
> > Mateusz
> > 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> 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/sympy?hl=en.
> 

-- 
Mateusz

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to