// Numbas version: exam_results_page_options {"name": "Algebra: Functions, inverses and compositions", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "name": "Algebra: Functions, inverses and compositions", "rulesets": {}, "advice": "

See Lecture 7.1 and Workshop 7.2

", "variable_groups": [{"name": "part a", "variables": ["mf", "cf", "mg", "cg", "mh", "ch", "x", "fx", "gx", "hx", "fgx", "ghx", "ggx"]}], "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.

"}, "variables": {"ghx": {"group": "part a", "name": "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)", "description": "", "templateType": "anything"}, "x": {"group": "part a", "name": "x", "definition": "vector(shuffle(-4..4)+shuffle(-4..4)+shuffle(1..2))", "description": "", "templateType": "anything"}, "fgx": {"group": "part a", "name": "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)", "description": "", "templateType": "anything"}, "ggx": {"group": "part a", "name": "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)", "description": "", "templateType": "anything"}, "cg": {"group": "part a", "name": "cg", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "cf": {"group": "part a", "name": "cf", "definition": "0", "description": "", "templateType": "anything"}, "gx": {"group": "part a", "name": "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)", "description": "", "templateType": "anything"}, "mh": {"group": "part a", "name": "mh", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "ch": {"group": "part a", "name": "ch", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "mg": {"group": "part a", "name": "mg", "definition": "1", "description": "", "templateType": "anything"}, "mf": {"group": "part a", "name": "mf", "definition": "random(-4..4 except [0,1])", "description": "", "templateType": "anything"}, "fx": {"group": "part a", "name": "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)", "description": "", "templateType": "anything"}, "hx": {"group": "part a", "name": "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)", "description": "", "templateType": "anything"}}, "functions": {"eqnline": {"type": "html", "definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -6;\nvar x_max = 6;\nvar y_min = -20;\nvar y_max = 20;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: true,\n grid: true\n }\n);\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis and y-axis\nvar xaxis = board.create('axis',[[0,0],[1,0]]);\n\n// create the y-axis\nvar yaxis = board.create('axis',[[0,0],[0,1]], );\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return m*x+c},x_min,x_max]);\n\n\n\nreturn div;", "parameters": [["m", "number"], ["c", "number"]], "language": "javascript"}}, "preamble": {"css": "", "js": ""}, "statement": "", "extensions": ["jsxgraph"], "ungrouped_variables": [], "parts": [{"showCorrectAnswer": true, "sortAnswers": false, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "gapfill", "prompt": "

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

\n

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

\n

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

\n

\n

Determine the following.

\n

\n

\n

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

\n

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

\n

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

\n

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

\n

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

\n

\$f^{-1}(\\var{fx[6]}) = \$ [[5]]

\n

\$h^{-1}(\\var{hx[7]}) = \$ [[6]]

\n

\$g^{-1}(\\var{gx[8]}) = \$ [[7]]

\n

\$h^{-1}(\\var{hx[9]}) = \$ [[8]]

\n

\$g(g(\\var{x[10]})) = \$ [[9]]

\n

If \$a\$ is any number, what is \$g(g(a))\$?

\n

\$g(g(a)) = \$ [[10]]

\n

\n

If \$p\$ is some number, what is \$f^{-1}(p)\$?

\n

\$f^{-1}(p) = \$ [[11]]

\n

\n

If \$s\$ is some number, what is \$g^{-1}(s)\$?

\n

\$g^{-1}(s) = \$   [[12]]