# Thread: Simplifying Numerical Solving before actual solving

1. ## Simplifying Numerical Solving before actual solving

Hi all,

I have a question not pertaining solely to C nor Programming in general. Nevertheless, I think there is no better place to ask (even in maths forums) than here..

Suppose you have the following equation to solve: If we had to put that into a calculator or programme like Mathematica, mathcad, octave, MatLab, would those programms calculate AS IS or will they first simplify the equation then numerically calculate?

In other Words, will these programmes actually perform a CPU intensive square root operation in the numerator and denominator and then carry on solving? Or, if these programmes are written smart enough, they could first look for grouping, distribution, cancellation of squares/roots, cancellation of numerators and denominators, which in this case, it would cancel the numerator and denominator and completely get away with square rooting.

If they dont do this, is there a reason? Im sure it saves on CPU time especially if the simplifying is large. Or maybe they dont do this because the very operation of searching for cancellation consumes significant CPU time. Although having said that, I think that the operation of searching is linearly intensive O(n) while the potential for cancellation of square root operations (for example) saves on potential loss of O(log n) operations. So Im sure that these maths programms employ this simplifying technique. 2. Simplification is much more complicated(to execute and program) than floating point operations (which have great hardware support).

Though you could be right because much of the work needed for the simplification to work is already done while parsing the expression ...say..into a tree. 3. I'm sure it depends on the software. As to why they may _not_ do it, I imagine it's simply a matter of didn't have the time to add such functionality. 4. A CAS is likely to do some canceling, whereas anything else is likely to just follow order of operations. Popular pages Recent additions 