Maple Issues: Avoiding Unwanted Simplifications

 

For Maple-graded questions we commonly use printf(MathML:-ExportPresentation(expression)) to display the answer in a nice formatted manner. Unfortunately Mobius will perform simplification of expressions whether you want it or not. This happens most often with square roots. For example 12 18 which we want to display as 2 3 will display as 1 3 6 because Mobius idiotically rationalizes the denominator.

Fortunately the algorithmic section's mathml command does this properly. For example

$X=mathml("sqrt(12/18)"); will display $X as 2 3 . So instead of using the method above to display an answer "$Ans" define the MathML version in the algorithmic section:

$AnsML=mathml("$Ans");

then in the ANSWER field:

printf(`$AnsML`);

Note that the backquotes are necessary when displaying already-created MathML.


Maple Issues Index

Main Index

Last updated: 2023/09/28 SS/DAG