Re: XCas / Prime "solve" question Message #2 Posted by Han on 7 Nov 2013, 9:52 a.m., in response to message #1 by Nigel J Dowrick
Anytime you use a decimal point in the CAS view, you are implicitly telling the CAS to switch over into "approximate" mode for that specific computation. So, I recommend using
solve(exact( ... your equation here ... ), var)
Once the CAS is switch over into approximation mode, it _should_ honor the epsilon value in the CAS settings as far as what to do with values that are very small (i.e. when to interpret a small number as zero). Keep in mind that the command exact() will also use the epsilon setting to convert small numbers to 0! So the above will not always work for numerical solutions. So, when you try to solve a*m=b with a=10^{-12}, that very well could be interpreted as 0=b and would produce no solutions if b is non-zero.
Generally speaking, use solve() when you are trying to find exact solutions and your equations can be stated in exact terms, and use nSolve() when your equations involve non-exact values.
This concept is fairly common in many computer algebra systems.
|