// Numbas version: finer_feedback_settings {"name": "Maria's copy of Inverse and composite functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "answerSimplification": "all", "vsetRangePoints": 5, "answer": "(x-{a[1]})/{a[0]}", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "
Find $f^{-1}(x)$ when $\\simplify{f(x)={a[0]}x+{a[1]} }$.
\n$\\displaystyle f^{-1}(x)=$ [[0]]
"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5, "answer": "(x+{a[2]})/{a[3]}", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "Find $g^{-1}(x)$ when $\\simplify{g(x)={a[3]}x-{a[2]} }$.
\n$\\displaystyle g^{-1}(x)=$ [[0]]
"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "answerSimplification": "all", "vsetRangePoints": 5, "answer": "(x-{a[1]}+({a[2]}{a[0]}))/({a[3]}*{a[0]})", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "Use your above answers for $f^{-1}(x)$ and $g^{-1}(x)$ to find the inverse, composed function, $(g^{-1}\\circ f^{-1}) (x)$ terms of $x$:
$\\displaystyle (g^{-1}\\circ f^{-1}) (x)$ =[[0]]
Using:
\\[
\\begin{align}
f(x)&=\\simplify{{a[0]}x+{a[1]} }\\\\
&\\text{ and } \\\\
g(x)&=\\simplify{{a[3]}x-{a[2]} }\\text{,}
\\end{align}
\\]
find $(f\\circ g)(x)$, the composition of $f(x)$ with $g(x)$.
$\\displaystyle (f\\circ g)(x)=$ [[0]]
"}, {"type": "gapfill", "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "gaps": [{"type": "jme", "showPreview": true, "checkVariableNames": false, "useCustomName": false, "adaptiveMarkingPenalty": 0, "vsetRange": [0, 1], "checkingAccuracy": 0.001, "checkingType": "absdiff", "showFeedbackIcon": true, "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "vsetRangePoints": 5, "answer": "(x-{a[1]}+({a[2]}{a[0]}))/({a[3]}*{a[0]})", "customName": "", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 1, "failureRate": 1}], "marks": 0, "prompt": "Use your above answer for $(f\\circ g)(x)$ to find the inverse, composed function,$(f\\circ g)^{-1}(x)$ in terms of $x$:
\n$\\displaystyle (f\\circ g)^{-1}(x)=$ [[0]]
"}, {"type": "1_n_2", "showCellAnswerState": true, "shuffleChoices": false, "variableReplacements": [], "useCustomName": false, "adaptiveMarkingPenalty": 0, "matrix": [0, 0, 0, "1"], "showFeedbackIcon": true, "distractors": ["", "", "", ""], "unitTests": [], "displayColumns": "1", "prompt": "When should your answer for c), $(g^{-1}\\circ f^{-1}) (x)$ be the same as your answer for e) $(f\\circ g)^{-1}(x)$?
", "displayType": "radiogroup", "choices": ["Never
", "Only when $f(x)=g(x)$
", "Only when $f(x)$ is in the same family as $g(x)$
", "Always, provided that composite and inverse functions exist
"], "customMarkingAlgorithm": "", "minMarks": 0, "customName": "", "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "scripts": {}, "showCorrectAnswer": true, "marks": 0}], "functions": {}, "tags": [], "preamble": {"js": "", "css": ""}, "name": "Maria's copy of Inverse and composite functions", "variables": {"b": {"description": "", "definition": "repeat(random(5..9),5)", "group": "Ungrouped variables", "templateType": "anything", "name": "b"}, "a": {"description": "", "definition": "repeat(random(2..5),5)", "group": "Ungrouped variables", "templateType": "anything", "name": "a"}}, "advice": "$f^{-1}(x)$ is the function with the property that $f^{-1}(f(x)) = x$.
\nTo find this, we first set $x=f(y)$ and rearrange to find $y$ in terms of $x$, i.e. $y = f^{-1}(x)$.
\n\\begin{align}
f(y)=\\simplify{{a[0]}y+{a[1]}}&=x\\\\
\\simplify{{a[0]}y}&=x-\\var{a[1]}\\\\[1em]
y&=\\simplify[]{(x-{a[1]})/{a[0]}}\\\\[1em]
f^{-1}(x)&=\\simplify{(x-{a[1]})/{a[0]}}\\text{.}\\\\
\\end{align}
We use the same method as part a) to find $g^{-1}(x)$:
\n\\begin{align}
g(y)=\\simplify{{a[3]}y-{a[2]}}&=x\\\\
\\simplify{{a[3]}y}&=x+\\var{a[2]}\\\\[1em]
y&=\\simplify[]{(x+{a[2]})/{a[3]}}\\\\[1em]
g^{-1}(x)&=\\simplify{(x+{a[2]})/{a[3]}}\\text{.}\\\\
\\end{align}
$(g^{-1} \\circ f^{-1})(x)$ is the function which first applies $f^{-1}(x)$ and then applies $g^{-1}$ to the result of that.
\nWe use the previous answers: $f^{-1}(x)=\\simplify{(x-{a[1]})/{a[0]}}$ and $g^{-1}(x)=\\simplify{(x+{a[2]})/{a[3]}}$ to find the definition of $(g^{-1} \\circ f^{-1})(x)$ by substituting $f^{-1}(x)$ everywhere $x$ occurs in the definition of $g^{-1}(x)$.
\n\\begin{align}
(g^{-1}\\circ f^{-1}) (x)&=g^{-1}(f^{-1}(x))\\\\[1em]
&=g^{-1} \\left( \\simplify[]{(x-{a[1]})/{a[0]}} \\right) \\\\[1em]
&=\\frac{\\left(\\simplify[]{(x-{a[1]})/{a[0]}}\\right)+\\simplify[]{{a[2]}}}{\\var{a[3]}\\text{.}}
\\end{align}
$(f \\circ g)(x)$ is the function which first applies $g(x)$ and then applies $f$ to the result of that.
\nWe find the definition of $(f \\circ g)(x)$ by substituting $g(x)$ everywhere that $x$ occurs in the definition of $f(x)$.
\n\\begin{align}
(f\\circ g)(x)&=f(g(x))\\\\
&=f(\\simplify{{a[3]}x-{a[2]}})\\\\
&=\\simplify{{a[0]}({a[3]}x-{a[2]})+{a[1]}}
\\end{align}
Now that we have the definition of $(f \\circ g)(x)$, we can find its inverse by using the same method as in parts a) and b).
\n\\begin{align}
(f \\circ g)(y) &= x \\\\
\\simplify{{a[0]}({a[3]}y-{a[2]})+{a[1]}}&=x\\\\
\\simplify{{a[0]}({a[3]}y-{a[2]})}&=x-\\var{a[1]}\\\\[1em]
\\simplify{{a[3]}y-{a[2]}}&=\\frac{(x-\\var{a[1]})}{\\var{a[0]}}\\\\[1em]
\\simplify{{a[3]}y}&=\\left( \\frac{(x-\\var{a[1]})}{\\var{a[0]}} \\right) +\\var{a[2]}\\\\[1em]
y&=\\frac{\\left(\\frac{(x-\\var{a[1]})}{\\var{a[0]}}\\right)+\\var{a[2]})}{\\var{a[3]}}\\\\[1em]
(f\\circ g)^{-1}(x)&=\\frac{\\left(\\frac{(x-\\var{a[1]})}{\\var{a[0]}}\\right)+\\var{a[2]}}{\\var{a[3]}}\\\\[1em]
\\end{align}
We can see that in this case $(f\\circ g)^{-1}(x) = (g^{-1}\\circ f^{-1}) (x)$.
\nSo long as the inverses of $f$ and $g$ exist and they can be composed, it is always true that \\[(f \\circ g)^{-1}(x) \\equiv (g^{-1} \\circ f^{-1}) (x)\\text{.}\\]
", "rulesets": {}, "metadata": {"description": "Find the inverse of a composite function by finding the inverses of two functions and then the composite of these; and by finding the composite of two functions then finding the inverse. The question then concludes by asking students to compare their two answers and verify they're equivalent.
", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "Given a function $f(x)$, the inverse function $f^{-1}(x)$ reverses whatever $f$ does.
\nFunction composition is applying one function to the results of another.
\nThe following questions will ask you to find the inverses and compositions of some functions.
\nGive all of your answers in terms of $x$.
", "extensions": [], "ungrouped_variables": ["a", "b"], "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}