// Numbas version: exam_results_page_options {"name": "Algebra: Graphs of functions, straight line", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"variables": ["mf", "cf", "x", "fx"], "name": "part a"}], "parts": [{"type": "gapfill", "variableReplacementStrategy": "originalfirst", "marks": 0, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

This is the graph of a function $f$.

\n

{eqnline(mf, cf)}

\n

\n

(i) $f(\\var{x[0]}) =$ [[0]]

\n

(ii) $f(\\var{x[1]}) =$ [[1]]

\n

(iii) What value for $a$ do you need so that $f(a) = \\var{fx[2]}$? [[2]]

\n

(iv) What is $f^{-1}(\\var{fx[3]})$? [[3]]

\n

(v) Solve the equation $f(x) = \\var{fx[4]}$.    $x=$[[4]]

\n

(vi) What is the equation of the line?  $y=$ [[5]]

\n

(vii) $f^{-1}(\\var{fx[2]})=$ [[6]]

", "gaps": [{"correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "marks": "1", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxValue": "fx[0]", "mustBeReduced": false, "variableReplacements": [], "minValue": "fx[0]", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain"}, {"correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "marks": "1", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxValue": "fx[1]", "mustBeReduced": false, "variableReplacements": [], "minValue": "fx[1]", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain"}, {"correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "marks": "1", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxValue": "x[2]", "mustBeReduced": false, "variableReplacements": [], "minValue": "x[2]", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain"}, {"correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "marks": "1", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxValue": "x[3]", "mustBeReduced": false, "variableReplacements": [], "minValue": "x[3]", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain"}, {"correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "marks": "1", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxValue": "x[4]", "mustBeReduced": false, "variableReplacements": [], "minValue": "x[4]", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain"}, {"vsetRangePoints": 5, "checkingType": "absdiff", "type": "jme", "expectedVariableNames": [], "vsetRange": [0, 1], "marks": "2", "unitTests": [], "customMarkingAlgorithm": "", "answer": "{mf}x+{cf}", "checkingAccuracy": 0.001, "showPreview": true, "failureRate": 1, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "checkVariableNames": false, "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true}, {"correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "marks": "1", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxValue": "x[2]", "mustBeReduced": false, "variableReplacements": [], "minValue": "x[2]", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain"}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "sortAnswers": false}], "functions": {"eqnline": {"definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -6;\nvar x_max = 6;\nvar y_min = -20;\nvar y_max = 20;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: true,\n grid: true\n }\n);\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis and y-axis\nvar xaxis = board.create('axis',[[0,0],[1,0]]);\n\n// create the y-axis\nvar yaxis = board.create('axis',[[0,0],[0,1]], );\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return m*x+c},x_min,x_max]);\n\n\n\nreturn div;", "language": "javascript", "parameters": [["m", "number"], ["c", "number"]], "type": "html"}}, "ungrouped_variables": [], "extensions": ["jsxgraph"], "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Algebra: Graphs of functions, straight line", "preamble": {"js": "", "css": ""}, "statement": "

This is a non-calculator question.

", "tags": [], "rulesets": {}, "variables": {"cf": {"description": "", "templateType": "anything", "group": "part a", "name": "cf", "definition": "random(-5..5)"}, "mf": {"description": "", "templateType": "anything", "group": "part a", "name": "mf", "definition": "random(-4..4 except 0)"}, "fx": {"description": "", "templateType": "anything", "group": "part a", "name": "fx", "definition": "x*mf+vector(cf,cf,cf,cf,cf,cf,cf,cf)"}, "x": {"description": "", "templateType": "anything", "group": "part a", "name": "x", "definition": "vector(shuffle(-4..4 except (0)))"}}, "metadata": {"description": "

A graph of a straight line $f$ is given. Questions include determining values of $f$, of $f$ inverse, and determing the equation of the line.

", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "

See Lecture 4.1 for most questions. See Lecture 4.3 for equation of line.  See Lecture 3.4 for the phrase `solving equations'.

\n

\n
\n
• Remember to check your answers.  For example, to check your answer for (vi), you should plug-in values for $x$, calculate the value of $y$, and check the coordinates.  For example, if I plug $x=1$ into the equation, I get $y= \\var{mf} \\times 1 + \\var{cf} = \\var{mf+cf}$.  I then check whether the coordinate $(1, \\var{mf+cf})$ lies on the graph or not; in this instance it does, so that is a good sign. It is worth checking one or two other coordinates to really make sure.
• \n
\n

\n
\n
• You should notice that (iii), (iv) and (v) are asking the same question, but in different guises.  If you do not understand this, then re-view the lectures. If that does not help, then please ask us and we will help.
• \n
\n

\n

", "type": "question", "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}, {"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}, {"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}