3 ms·
The times I have used CAS to help with algebraic simplification, I've found the same problem, regardless of using SymPy or the more feature-filled Mathematica:
by jmwilson 7y ago
The times I have used CAS to help with algebraic simplification, I've found the same problem, regardless of using SymPy or the more feature-filled Mathematica: the package's rules for simplification often obscure useful forms that lead to insight. The CAS gives you the correct result, of course, but I end up having to apply significant post-processing to the result by forcing substitutions that can take almost as much time as doing the algebra by hand.
As a simple example, consider the transfer function of a RLC circuit from basic electronics. It might contain a expression of the form: s^2 + (R/L) * s + 1/(LC). What's often helpful is to express this in terms of the unitless form 1 + s/(Q * w0) + (s/w0)^2, where w0 is the resonance frequency and Q is the quality factor. In a complicated example with more components, the value of w0 might be related to the simple form of 1/sqrt(LC) by some unitless factor, or there's some other helpful way to write things that neatly relate it to the basic case, but SymPy/Mathematica will drag its feet showing you that. I wish there was more done on improving the insight and meaningfulness of results from CAS to the experimenter.
- jacobolus 7y agoIt’s also very frustrating that they don’t know vector identities. Everything is done in terms of real numbers or complex numbers. I would love to see a CAS that knows identities of https://en.wikipedia.org/wiki/Geometric_algebra https://en.wikipedia.org/wiki/Geometric_algebra
- orbifold 7y agoThose exist and are in active use by physicists (in fact one of the first CAS called Schoonschip was developed by nobel price winner to be Veltman to carry out Feynman diagram calculations). However there remains a huge tome of high energy physics to be implemented in one common CAS (one of the things I sometimes dream about starting). The culture of theoretical physics is such that only the end results of calculations are ever shared with intermediate steps left as exercises to the reader. Graduate students are expected to develop a stash of identities and routines to go back to, which is their “competitive advantage”, especially in fields like model building.
- ska 7y agoYou very much have to learn the ins and outs of any CAS. That said, they can be very useful dealing with large multi-term expressions, or double-checking your work by hand, playing around with transforms, etc. It's a tool though, and more about the insights you bring to it, than it brings to you if that makes sense.
- jbay808 7y agoI agree. I often have to wrestle to get any CAS to give me an expression in the form I want. Another example would be trig expressions, where an expression can be put in terms of A sin(x+B), or a sin(x) + b cos(x). Both are equivalent, but sometimes one is much more useful than another. There's rarely a builtin routine for "convert to exactly the form I want", so I have to code up the conversion myself. But at least SymPy makes that as easy as any other Python coding challenge!
- Myrmornis 7y agoAside from the symbolic calculations, I think the dynamic (i.e. with widgets for playing with input values) visualizations in Mathematica can be very helpful for building intuition.
- epr 7y agoYou may want to look into symbolic regression. I often find that by applying a downward pressure on the fitness of less parsimonious individuals as well as one or more substitution operators (where applicable) you can get very elegant results. Add constraints or other fitness bonuses for specific types of relationships you are looking for and you might be surprised by what cool things you can find. Also a great excuse to learn Common Lisp if you haven't already. A good starting point is John Koza's first book on Genetic Programming.