From: hipster Date: 2002-01-18T23:53:19+09:00 Subject: Re: Solving equation for a variable On Fri, 18 Jan 2002 21:23:22 +0900, Massimiliano Mirra wrote: > In a symbolic algebra tool named Yacas, one can do the following: > > In> equation := area==base*height/2 > Out> area==(base*height)/2; > In> Solve(equation,base) > Out> (2*area)/height; > > Is there any Ruby module that allows something like that, or do you > have any pointer to explanations of the involved algorithms? Mupad (www.mupad.com, free for personal use) is a CAS that has many of its algorithms (including the solver AFAICS) implemented in its own language, so you could glark some principles from it. Look for lib.tar in the fileset, it has all the .mu files. The ResearchIndex (www.researchindex.com) should be able to provide you with everything you never wanted to know about symbolic expression manipulation, but were forced to find out ;) I've translated a symbolic derivation algorithm from _Structure and Interpretation of Computer Programs_ from Lisp into Ruby; this could provide some hints for developing a symbolic solver in Ruby: http://www.xs4all.nl/~hipster/lib/ruby/symbolic regards, Michel