// Numbas version: exam_results_page_options {"name": "Use \\simplify when substituting variables into a mathematical expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Use \\simplify when substituting variables into a mathematical expression", "tags": [], "metadata": {"description": "This question demonstrates how to use the \\simplify command to create natural-looking randomised mathematical expressions.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The \\var command substitutes variables directly into LaTeX code:

\n
\\var{a}x + \\var{b}y
\n

$\\var{a}x + \\var{b}y$

\n

This can result in awkward notation like the above.

\n

The \\simplify command interprets a mathematical expression, substitutes in variable values, and renders it naturally:

\n
\\simplify{ {a}x + {b}y }
\n

$\\simplify{ {a}x + {b}y }$

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "4", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "-3", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}