Thread: Simplifying Numerical Solving before actual solving

  1. #1
    Registered User Vespasian's Avatar
    Join Date
    Aug 2011
    Posts
    181

    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:
    Simplifying Numerical Solving before actual solving-capture-jpg

    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. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    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. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    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. #4
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    A CAS is likely to do some canceling, whereas anything else is likely to just follow order of operations.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can anyone help me solving that Q?
    By Amjad Salman in forum C Programming
    Replies: 1
    Last Post: 03-04-2012, 11:50 AM
  2. How should I go about solving this problem?
    By ARod609 in forum C Programming
    Replies: 11
    Last Post: 08-06-2011, 09:37 PM
  3. Solving relationships...
    By hebali in forum C Programming
    Replies: 1
    Last Post: 03-03-2008, 11:15 AM
  4. C++ Problem Solving
    By scojan in forum C++ Programming
    Replies: 16
    Last Post: 10-16-2007, 10:41 AM
  5. Equation solving
    By Sang-drax in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 11-24-2002, 02:13 PM