// 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, "typeendtoleave": 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]]

", "gaps": [{"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "fx[1]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "fx[1]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "hx[2]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "hx[2]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "fgx[3]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "fgx[3]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "ghx[4]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "ghx[4]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "ggx[5]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "ggx[5]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "x[6]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "x[6]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "x[7]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "x[7]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "x[8]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "x[8]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "x[9]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "x[9]"}, {"showCorrectAnswer": true, "mustBeReduced": false, "correctAnswerStyle": "plain", "unitTests": [], "customMarkingAlgorithm": "", "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "ggx[10]", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReducedPC": 0, "scripts": {}, "marks": "0.5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "maxValue": "ggx[10]"}, {"vsetRangePoints": 5, "showCorrectAnswer": true, "checkVariableNames": false, "unitTests": [], "showPreview": true, "customMarkingAlgorithm": "", "variableReplacements": [], "failureRate": 1, "answerSimplification": "all", "type": "jme", "answer": "a+{cg*2}", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showFeedbackIcon": true, "checkingType": "absdiff", "scripts": {}, "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001}, {"vsetRangePoints": 5, "showCorrectAnswer": true, "checkVariableNames": false, "unitTests": [], "showPreview": true, "customMarkingAlgorithm": "", "variableReplacements": [], "failureRate": 1, "answerSimplification": "all", "type": "jme", "answer": "p/{mf}", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showFeedbackIcon": true, "checkingType": "absdiff", "scripts": {}, "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001}, {"vsetRangePoints": 5, "showCorrectAnswer": true, "checkVariableNames": false, "unitTests": [], "showPreview": true, "customMarkingAlgorithm": "", "variableReplacements": [], "failureRate": 1, "answerSimplification": "all", "type": "jme", "answer": "s-{cg}", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showFeedbackIcon": true, "checkingType": "absdiff", "scripts": {}, "marks": 1, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001}], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}