// Numbas version: exam_results_page_options {"name": "Functions: Composite Functions 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Functions: Composite Functions 2", "tags": [], "metadata": {"description": "

Finding composite functions of a linear function and a function of the form $x^n+a$.

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

If $f(x)=\\simplify{{m}x+{c}}$ and $g(x)=\\simplify{x^{n}+{d}}$, find expressions for $f\\circ g(x)$ and $g \\circ f(x)$.

\n

\n

Recall: $f \\circ g(x) \\equiv f(g(x))$ and $g \\circ f(x) \\equiv g(f(x))$.

", "advice": "

To find the composition $f \\circ g(x)$ we are substituting the expression for $g(x)$ into the function $f(x)$, replacing the $x$-terms with the function $g(x)$. Similarly, to find the composition $g \\circ f(x)$ we are substituting the expression for $f(x)$ into the function $g(x)$, replacing the $x$-terms with the function $f(x)$.

\n

So, for $f(x)=\\simplify{{m}x+{c}}$ and $g(x)=\\simplify{x^{n}+{d}}$,

\n

\\[ \\begin{split} f \\circ g(x) \\equiv f(g(x)) &\\,=  \\simplify{{m}(x^{n}+{d})+{c}} \\\\ &\\,=\\simplify[!collectNumbers,unitFactor]{{m}x^{n}+{m*d}+{c}} \\\\ &\\,=\\simplify{{m}x^{n}+{m*d+c}}, \\end{split} \\]

\n

and 

\n

\\[ g \\circ f(x) \\equiv g(f(x)) =  \\simplify{({m}x+{c})^{n}+{d}}. \\]

\n

(Note: Leaving $g \\circ f(x)$ in this form is preferred as it is a simpler way of expressing answer.)

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..5 except n)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2,3)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-7..7 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-7..7 except [0,c])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "m", "c", "d"], "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 \\circ g(x)=$[[0]]

\n

$g \\circ f(x)=$[[1]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{m}x^{n}+{m*d+c}", "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": [{"name": "x", "value": ""}]}, {"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": "({m}x+{c})^{n}+{d}", "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": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}