11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

46 • Chapter 3: Finding SolutionsFor verifying solutions, you will find that this method is generally themost convenient.Observe that this application of the eval command has other uses.To extract the value of x from the first solution, use the eval command.> x1 := eval( x, soln[1] );x1 := −1Alternatively, you could extract the first solution for y.> y1 := eval(y, soln[1]);y1 := 2Converting Solution Sets to Other Forms You can use this evaluationto convert solution sets to other forms. For example, you can constructa list from the first solution where x is the first element and y is thesecond. First construct a list with the variables in the same order asyou want the corresponding solutions.> [x,y];[x, y]Evaluate this list at the first solution.> eval([x,y], soln[1]);[−1, 2]The first solution is now a list.Instead, if you prefer that the solution for y comes first, evaluate [y,x]at the solution.> eval([y,x], soln[1]);[2, −1]Since <strong>Maple</strong> typically returns solutions in the form of sets (in whichthe order of objects is uncertain), remembering this method for extractingsolutions is useful.

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

Saved successfully!

Ooh no, something went wrong!