| 1 | initial version |
This answer may be relevant : the "manual" solution proposed can be programmed (although the relevant simplifications may vary). Sage will give you a mathematically sound solution, that you may have to simplify "manually" (easy with Sage's help...).
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.