manual:chapter3:solver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:chapter3:solver [2021/09/24 09:47]
claudio
manual:chapter3:solver [2021/09/24 09:56] (current)
claudio
Line 28: Line 28:
 We are now ready to run the ''MSOLVE'' command. The stack looks now like this: We are now ready to run the ''MSOLVE'' command. The stack looks now like this:
  
 +<code>
 +5:                { '2*X+4=8' }
 +4:                      { 'X' }
 +3:                        { 0 }
 +2:                       { 10 }
 +1:                         1E-4
  
 +……………………………………………………………………………………
 +MSOLVE
 +</code>
  
 +Which will produce:
  
 +<code>
 +2:           { 1.999969482422 }
 +1:          { -0.000061035156 }
 +</code>
 +
 +The first list returned in level 2 contains the value found for all variables, in this case ''X=2'' was the exact solution. The list in level 1 has the residuals of all equations. The residual is defined as the difference between the left and right sides of the equation. Notice that the residual is within the requested tolerance. Requesting a tighter tolerance would produce a result for ''X'' closer to ''2'' but at the expense of longer running time to find the solution.
  
  
  • manual/chapter3/solver.1632502077.txt.gz
  • Last modified: 2021/09/24 09:47
  • by claudio