// Numbas version: exam_results_page_options {"name": "2.1.3.3 Evaluate a composite function version 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.1.3.3 Evaluate a composite function version 3", "tags": [], "metadata": {"description": "

Given f(x)=(x+a)/(x+b) and g(x) = 1/x, compute f(g(x)) and g(f(x)).

\n

a and b are randomised integers.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Given $f(x)=\\var{fe}$ and $g(x)=\\var{ge}$.

", "advice": "

When $\\displaystyle{f(x)=\\var{fe}}$ and $\\displaystyle{g(x)=\\var{ge}}$

\n

(a) $\\displaystyle{ f(g(x))= f\\left( \\frac{1}{x} \\right) = \\frac{\\frac{1}{x} \\var{ce[0]}}{\\frac{1}{x} \\var{ce[1]}} }=\\var{fog}$

\n

(b) $\\displaystyle{ f(g(x))= g\\left( \\var{fe} \\right) = \\frac{1}{\\frac{x \\var{ce[0]}}{x \\var{ce[1]}}}=\\var{gof} }$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"fe": {"name": "fe", "group": "Ungrouped variables", "definition": "simplify(expression(\n \"(x+\"+c[0]+\")/(x+\"+c[1]+\")\"\n ),\"basic\")", "description": "", "templateType": "anything", "can_override": false}, "ge": {"name": "ge", "group": "Ungrouped variables", "definition": "expression(\n \"1/x\"\n)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "shuffle(-9..9 except 0)[0..2]", "description": "", "templateType": "anything", "can_override": false}, "fog": {"name": "fog", "group": "Ungrouped variables", "definition": "simplify(expression(\n \"(1+\"+c[0]+\"*x)/(1+\"+c[1]+\"*x)\"\n ),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "gof": {"name": "gof", "group": "Ungrouped variables", "definition": "simplify(expression(\n \"(x+\"+c[1]+\")/(x+\"+c[0]+\")\"\n ),\"basic\")", "description": "", "templateType": "anything", "can_override": false}, "ce": {"name": "ce", "group": "Ungrouped variables", "definition": "[if(c[0]<0, latex(string(c[0])),latex(\"+\"+c[0])),\n if(c[1]<0, latex(string(c[1])), latex(\"+\"+c[1]))]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "fe", "ge", "fog", "gof", "ce"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Part a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find $f(g(x))$

", "answer": "{fog}", "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": []}, {"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, "prompt": "

Find $g(f(x))$

", "answer": "{gof}", "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": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}