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.

5.3 Structural Manipulations • 183> sol := { solve( { x^2*y^2 = b*y, x^2-y^2 = a*x },> {x,y} ) };sol := {{y = 0, x = 0}, {y = 0, x = a}, {by =RootOf(_Z 6 − b 2 − a _Z 5 ) , 2x = RootOf(_Z 6 − b 2 − a _Z 5 )}}Use select and has to choose those solutions.> select( has, sol, RootOf );{{y =bRootOf(_Z 6 − b 2 − a _Z 5 ) 2 ,x = RootOf(_Z 6 − b 2 − a _Z 5 )}}You can also select or remove subexpressions by type. The type commanddetermines if an expression is of a certain type.> type( 3+x, ‘+‘ );trueIn this example, the select command passes its third argument, ‘+‘,to type.> expr := ( 3+x ) * x^2 * sin( 1+sqrt(Pi) );expr := (3 + x) x 2 sin(1 + √ π)> select( type, expr, ‘+‘ );3 + xThe hastype command determines if an expression contains a subexpressionof a certain type.> hastype( sin( 1+sqrt(Pi) ), ‘+‘ );true

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

Saved successfully!

Ooh no, something went wrong!