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

Finding composite functions of a linear function and a logarithmic function.

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

If $f(x)=\\simplify{{m}x+{c}}$ and $g(x)=\\simplify{ln({k}x)}$, 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{ln({k}x)}$,

\n

\\[ f \\circ g(x) \\equiv f(g(x)) =  \\simplify{{m}(ln({k}x))+{c}} \\]

\n

and 

\n

{advice}

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-7..7 except 0)", "description": "", "templateType": "anything", "can_override": false}, "simp": {"name": "simp", "group": "Ungrouped variables", "definition": "gcd(m,c)", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(simp=1,'{sol1}','{sol2}')", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"

\\\\[  g \\\\circ f(x) \\\\equiv g(f(x)) =  \\\\simplify{ln({k}({m}x+{c}))}. \\\\]

\\n

\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\begin{split} g \\\\circ f(x) \\\\equiv g(f(x)) &\\\\,=  \\\\simplify{ln({k}({m}x+{c}))} \\\\\\\\ &\\\\,=  \\\\simplify{ln({k*simp}({m/simp}x+{c/simp}))}. \\\\end{split} \\\\]

\\n

\\n

(Note: Either form of $g \\\\circ f(x)$ is an acceptable answer, you do not have to do the extra factorisation.)

\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["k", "m", "c", "simp", "advice", "sol1", "sol2"], "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}ln({k}x)+{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": "ln({k*simp}({m/simp}x+{c/simp}))", "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/"}]}