// Numbas version: exam_results_page_options {"name": "Algebra: functions, determining function values from graph", "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Algebra: functions, determining function values from graph", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A graph of an (invertible) cubic is given. The question is to determine values of \$f\$ from graph.

"}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "description": "

Coefficient of x^3

", "templateType": "anything", "definition": "random(-1..1 except 0)"}, "x1": {"name": "x1", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(0..1)"}, "x2": {"name": "x2", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(-1..1 except x1)"}, "hshift": {"name": "hshift", "group": "Ungrouped variables", "description": "

Random amount of horizontal shift to create variability.

", "templateType": "anything", "definition": "random(-2..2)"}, "y1": {"name": "y1", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "a*((x1+hshift)^3+(x1+hshift)+vshift)"}, "vshift": {"name": "vshift", "group": "Ungrouped variables", "description": "

Random amount of vertifical shift for sake of variability.

", "templateType": "anything", "definition": "random(-2..2)"}, "y2": {"name": "y2", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "a*((x2+hshift)^3+(x2+hshift)+vshift)"}}, "variablesTest": {"maxRuns": 100, "condition": "max(abs(y1),abs(y2))<10"}, "advice": "

(i) To find \$f(\\var{x1})\$, you start at \$\\var{x1}\$ on the \$x\$-axis, go up or down until you reach the blue line, and then look at the \$y\$-coordinate. This \$y\$-coordinate is the answer.  In this question, after going up/down from \$\\var{x1}\$, we reach the \$y\$-coordinate \$\\var{y1}\$, so the answer is \$f(\\var{x1})=\\var{y1}\$.

\n

(ii) There are two options. The first option (which is not efficient) is trial-and-error: pick some random value of \$x\$ and determine \$f(x)\$. If \$f(x) = \\var{y2}\$, then your pick is the answer.  If not, then try a different value of \$x\$, hopefully getting closer and closer each time.   The second (and better) option is to 'work backwards' - we know what \$f(x)\$ should be, which means we know what the \$y\$-coordinate should be.  So start at \$\\var{y2}\$ on the \$y\$-axis, go left or right until you reach the blue line, and look at the \$x\$-coordinate. In this question, after going left/right from \$\\var{y2}\$, we reach the \$x\$-coordinate \$\\var{x2}\$, so this is the answer.  You can check this is correct: what is \$f(\\var{x2})\$? It is \$\\var{y2}\$, as we wanted!

\n

(iii) This question is asking exactly the same thing as the question in (ii), but is phrased differently. This is because the definition of \$f^{-1}\$ is that it is the function which un-does what \$f\$ does.  For example, we know that \$f(\\var{x1})=\\var{y1}\$ - therefore, automatically, \$f^{-1}(\\var{y1})\$ has to be \$\\var{x1}\$.  Re-worded, \$f\$ maps \$\\var{x1}\$ to \$\\var{y1}\$, so because \$f^{-1}\$ un-does this, it means \$f^{-1}\$ maps \$\\var{y1}\$ back to \$\\var{x1}\$.   Back to the question at hand, it asked what \$f^{-1}(\\var{y2})\$ is.  By definition, this means we want to know what value of \$x\$ is needed to get \$f(x) = \\var{y2}\$, which is exactly what was asked in (ii).

", "parts": [{"extendBaseMarkingAlgorithm": true, "type": "gapfill", "showCorrectAnswer": true, "unitTests": [], "prompt": "

{eqnline(a, hshift, vshift)}

\n

Above is the graph of some function \$f\$.

\n

What is \$f(\\var{x1})\$? [[0]]

\n

What value of \$x\$ do you need to get \$f(x) = \\var{y2}\$? [[1]]

\n

What is \$f^{-1}(\\var{y2})\$? [[2]]

", "customMarkingAlgorithm": "", "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "scripts": {}, "gaps": [{"minValue": "y1", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "correctAnswerStyle": "plain", "type": "numberentry", "showCorrectAnswer": true, "unitTests": [], "maxValue": "y1", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain"], "variableReplacementStrategy": "originalfirst", "marks": "1", "showFeedbackIcon": true, "scripts": {}, "mustBeReduced": false, "variableReplacements": []}, {"minValue": "x2", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "correctAnswerStyle": "plain", "type": "numberentry", "showCorrectAnswer": true, "unitTests": [], "maxValue": "x2", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "scripts": {}, "mustBeReduced": false, "variableReplacements": []}, {"minValue": "x2", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "correctAnswerStyle": "plain", "type": "numberentry", "showCorrectAnswer": true, "unitTests": [], "maxValue": "x2", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "marks": "2", "showFeedbackIcon": true, "scripts": {}, "mustBeReduced": false, "variableReplacements": []}], "variableReplacements": []}], "ungrouped_variables": ["a", "hshift", "vshift", "x1", "x2", "y1", "y2"], "variable_groups": [], "tags": [], "statement": "