Hi, While trying to compute the Golden ratio using SAGE I noticed the following strange (to me) behavior in solve().
* This fails: sage: var('a b phi') (a, b, phi) sage: solve([phi==a/b, phi==(a+b)/a], phi) --------------------------------------------------------------------------- <type 'exceptions.ValueError'> Traceback (most recent call last) /Users/hector/sage/<ipython console> in <module>() /Users/hector/sage/local/lib/python2.5/site-packages/sage/calculus/equations.py in solve(f, *args, **kwds) 1215 s = m.solve(args) 1216 except: -> 1217 raise ValueError, "Unable to solve %s for %s"%(f, args) 1218 a = repr(s) 1219 sol_list = string_to_list_of_solutions(a) <type 'exceptions.ValueError'>: Unable to solve [phi == a/b, phi == (b + a)/a] for (phi,) * This succeeds (note the (unnecessary?) need to also solve for 'a') sage: solve([phi==a/b, phi==(a+b)/a], phi,a) [[phi == (1 - sqrt(5))/2, a == -2*b/(sqrt(5) + 1)], [phi == (sqrt(5) + 1)/2, a == 2*b/(sqrt(5) - 1)]] Where the Golden ratio is phi == (sqrt(5) + 1)/2. So, am I missing something fundamental in the way solve() works or is this a bug? Thanks! -- Hector --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---