// Numbas version: exam_results_page_options {"name": "Patrick's copy of Inverse and composite functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "name": "Patrick's copy of Inverse and composite functions", "statement": "

Given a function $f(x)$, the inverse function $f^{-1}(x)$ reverses whatever $f$ does.

\n

Function composition is applying one function to the results of another.

\n

The following questions will ask you to find the inverses and compositions of some functions.

\n

Give all of your answers in terms of $x$.

", "tags": ["composite functions", "functions", "inverse functions"], "parts": [{"showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "answersimplification": "all", "answer": "(x-{a[1]})/{a[0]}", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "checkingaccuracy": 0.001, "vsetrange": [0, 1], "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff"}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

Find $f^{-1}(x)$ when $\\simplify{f(x)={a[0]}x+{a[1]} }$.

\n

$\\displaystyle f^{-1}(x)=$ [[0]]

", "marks": 0, "type": "gapfill", "scripts": {}, "variableReplacements": []}, {"showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "answer": "(x+{a[2]})/{a[3]}", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "checkingaccuracy": 0.001, "vsetrange": [0, 1], "checkvariablenames": false, "marks": 1, "checkingtype": "absdiff"}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

Find $g^{-1}(x)$ when $\\simplify{g(x)={a[3]}x-{a[2]} }$.

\n

$\\displaystyle g^{-1}(x)=$ [[0]]

", "marks": 0, "type": "gapfill", "scripts": {}, "variableReplacements": []}, {"showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "answersimplification": "all", "answer": "(x-{a[1]}+({a[2]}{a[0]}))/({a[3]}*{a[0]})", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "checkingaccuracy": 0.001, "vsetrange": [0, 1], "checkvariablenames": false, "showpreview": true, "checkingtype": "absdiff"}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "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]]

", "marks": 0, "type": "gapfill", "scripts": {}, "variableReplacements": []}, {"showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "answer": "{a[0]}({a[3]}x-{a[2]})+{a[1]}", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "checkingaccuracy": 0.001, "vsetrange": [0, 1], "checkvariablenames": false, "marks": 1, "checkingtype": "absdiff"}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "

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)$.

\n

$\\displaystyle (f\\circ g)(x)=$ [[0]]

", "marks": 0, "type": "gapfill", "scripts": {}, "variableReplacements": []}, {"showFeedbackIcon": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": [], "type": "jme", "answer": "(x-{a[1]}+({a[2]}{a[0]}))/({a[3]}*{a[0]})", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "checkingaccuracy": 0.001, "vsetrange": [0, 1], "checkvariablenames": false, "marks": 1, "checkingtype": "absdiff"}], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "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]]

", "marks": 0, "type": "gapfill", "scripts": {}, "variableReplacements": []}, {"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)$?

", "matrix": [0, 0, 0, "1"], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "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

"], "shuffleChoices": false, "minMarks": 0, "distractors": ["", "", "", ""], "variableReplacements": [], "showFeedbackIcon": true, "displayColumns": "1", "scripts": {}, "maxMarks": 0, "marks": 0, "type": "1_n_2"}], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

#### a)

\n

$f^{-1}(x)$ is the function with the property that $f^{-1}(f(x)) = x$.

\n

To 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} \n #### b) \n 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} \n #### c) \n (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. \n We 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} \n #### d) \n (f \\circ g)(x) is the function which first applies g(x) and then applies f to the result of that. \n We 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} \n #### e) \n 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} \n We can see that in this case (f\\circ g)^{-1}(x) = (g^{-1}\\circ f^{-1}) (x). \n #### f) \n So 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": {}, "extensions": [], "metadata": {"description": "

This question asks the student to find the inversed composite function finding the inverses of two functions then 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.

", "licence": "Creative Commons Attribution 4.0 International"}, "variables": {"a": {"description": "", "group": "Ungrouped variables", "definition": "repeat(random(2..5),5)", "name": "a", "templateType": "anything"}, "b": {"description": "", "group": "Ungrouped variables", "definition": "repeat(random(5..9),5)", "name": "b", "templateType": "anything"}}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["a", "b"], "type": "question", "contributors": [{"name": "Patrick Joyce", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1674/"}]}]}], "contributors": [{"name": "Patrick Joyce", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1674/"}]}