// Numbas version: exam_results_page_options {"name": "Function composition (numerical)", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A few simple functions are provided of the form ax, x+b and cx+d. Values of the functions, inverses and compositions are asked for. Most are numerical but the last few questions are algebraic.

"}, "ungrouped_variables": [], "variables": {"fx": {"definition": "x*mf+vector(cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf)", "name": "fx", "description": "", "templateType": "anything", "group": "part a"}, "cg": {"definition": "random(-5..5 except 0)", "name": "cg", "description": "", "templateType": "anything", "group": "part a"}, "mh": {"definition": "random(2..6)", "name": "mh", "description": "", "templateType": "anything", "group": "part a"}, "ch": {"definition": "random(-5..5 except 0)", "name": "ch", "description": "", "templateType": "anything", "group": "part a"}, "ggx": {"definition": "gx*mg+vector(cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg)", "name": "ggx", "description": "", "templateType": "anything", "group": "part a"}, "mf": {"definition": "random(-4..4 except [0,1])", "name": "mf", "description": "", "templateType": "anything", "group": "part a"}, "fgx": {"definition": "gx*mf+vector(cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf,cf)", "name": "fgx", "description": "", "templateType": "anything", "group": "part a"}, "x": {"definition": "vector(shuffle(-4..4)+shuffle(-4..4)+shuffle(1..2))", "name": "x", "description": "", "templateType": "anything", "group": "part a"}, "cf": {"definition": "0", "name": "cf", "description": "", "templateType": "anything", "group": "part a"}, "gx": {"definition": "x*mg+vector(cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg)", "name": "gx", "description": "", "templateType": "anything", "group": "part a"}, "ghx": {"definition": "hx*mg+vector(cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg,cg)", "name": "ghx", "description": "", "templateType": "anything", "group": "part a"}, "mg": {"definition": "1", "name": "mg", "description": "", "templateType": "anything", "group": "part a"}, "hx": {"definition": "x*mh+vector(ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch,ch)", "name": "hx", "description": "", "templateType": "anything", "group": "part a"}}, "parts": [{"showCorrectAnswer": true, "unitTests": [], "prompt": "

Evaluate

\n

\$f(g(\\var{x[3]}))= \$ [[0]]

\n

\$g(h(\\var{x[4]})) = \$ [[1]]

\n

\$g(g(\\var{x[5]})) = \$ [[2]]

Given

\n

\$f(x) = \\simplify{{mf}x+{cf}}\$.

\n

\$g(x) = \\simplify{{mg}x+{cg}}\$.

\n

\$h(x) = \\simplify{{mh}x+{ch}}\$.

\n

", "preamble": {"css": "", "js": ""}, "functions": {}, "rulesets": {}, "advice": "
\n
• \$f(g(\\var{x[3]}))= f( \\var{gx[3]}) = \\var{fgx[3]}\$.
• \n
• \$g(h(\\var{x[4]})) = g( \\var{hx[4]}) = \\var{ghx[4]}\$.
• \n
• \$g(g(\\var{x[5]})) = g( \\var{gx[5]}) = \\var{ggx[5]}\$.
• \n
", "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Function composition (numerical)", "tags": [], "variable_groups": [{"name": "part a", "variables": ["mf", "cf", "mg", "cg", "mh", "ch", "x", "fx", "gx", "hx", "fgx", "ghx", "ggx"]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Abbi Mullins", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2466/"}, {"name": "Laure Helme-Guizon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2531/"}, {"name": "Matthew James Sykes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2582/"}]}]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Abbi Mullins", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2466/"}, {"name": "Laure Helme-Guizon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2531/"}, {"name": "Matthew James Sykes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2582/"}]}