// Numbas version: finer_feedback_settings {"name": "2.3.2.1 Inverse of a function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.3.2.1 Inverse of a function", "tags": [], "metadata": {"description": "
Compute the inverse of a linear or hyperbolic function. Part of HELM book 2.3.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Find the inverse of $f(x)=\\var{fn}$
", "advice": "$z = \\var{c1}x+ \\var{c2}$
\nso $x = \\dfrac{z-\\var{c2}}{\\var{c1}}$
\n$f^{-1}(x) = \\dfrac{x-\\var{c2}}{\\var{c1}}$
\n$z=x$
\nso $x=z$
\n$f^{-1}(x) = x$
\n$z=-\\var{c1}x$
\nSo $x=-\\dfrac{z}{\\var{c1}}$
\n$f^{-1}(x) = -\\dfrac{x}{\\var{c1}}$
\n$z = \\dfrac{1}{x+\\var{c1}}$
\nSo $x+\\var{c1} = \\dfrac{1}{z}$
\ni.e. $x = \\dfrac{1}{z}-\\var{c1}$
\n$f^{-1}(x) = \\dfrac{1}{x}-\\var{c1}$
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"fn": {"name": "fn", "group": "Ungrouped variables", "definition": "expression([\n string(c1)+\"*x+\"+string(c2),\n \"x\",\n \"-\"+string(c1)+\"*x\",\n \"1/(x+\"+string(c1)+\")\"][idx]\n)", "description": "", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..30)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(1..30)", "description": "", "templateType": "anything", "can_override": false}, "inv": {"name": "inv", "group": "Ungrouped variables", "definition": "expression([\n \"(x-\"+string(c2)+\")/\"+string(c1),\n \"x\",\n \"-x/\"+string(c1),\n \"(1-\"+string(c1)+\"x)/x\"][idx]\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["idx", "fn", "c1", "c2", "inv"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$f^{-1}(x)=$[[0]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{inv}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}