12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.1 Simple solve • 45{x = −1, y = 2}and> soln[2];{x = 2, y = 1 2 }Verifying SolutionsTo check the solutions, substitute them into the original set of equationsby using the two-parameter eval command.> eval( eqns, soln[1] );{1 = 1, 3 = 3}> eval( eqns, soln[2] );{1 = 1, 3 = 3}For verifying solutions, you will find that this method is generally themost convenient.Observe that this application of the eval command has other uses.Suppose you wish to extract the value of x from the first solution. Again,the best tool is the eval command.> x1 := eval( x, soln[1] );x1 := −1Alternatively, you could extract the first solution for y.> y1 := eval(y, soln[1]);y1 := 2You can use this evaluation trick to convert solution sets to otherforms. For example, you can construct a list from the first solutionwhere x is the first element and y is the second. First construct a list

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!