// Numbas version: exam_results_page_options {"name": "Algebra: functions, determine coordinates of graph algebraically", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Algebra: functions, determine coordinates of graph algebraically", "tags": [], "metadata": {"description": "

A quadratic function is given. The graph of the function is drawn with three coordinates on the graph, without any x or y ticks.  The \$x\$ coordinate is given for a couple and \$y\$ coordinate given for the third, and coordinates are asked for.

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

This is a calculator question

See ??

\n

For the \$x\$-coordinate of \$C\$, the calculations should give you two choices. Look at the diagram to make the appropriate choice.

", "rulesets": {}, "extensions": ["jsxgraph"], "variables": {"x": {"name": "x", "group": "part a", "definition": "[a+x'[0]*random(-1,1)+random(1..19)/20,\n a+x'[1]*random(-1,1)+random(1..19)/20,\n a+x'[2]*random(-1)+random(1..19)/20]", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "part a", "definition": "random(-1,1)", "description": "", "templateType": "anything"}, "fx": {"name": "fx", "group": "part a", "definition": "map((x[j]-a)(x[j]-a)+b,j,0..2)", "description": "", "templateType": "anything"}, "x'": {"name": "x'", "group": "part a", "definition": "shuffle(1..3)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "part a", "definition": "random(-5..4)+0.5", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "part a", "variables": ["a", "b", "x'", "x", "fx"]}], "functions": {"plot": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["x0", "number"], ["y0", "number"], ["x1", "number"], ["y1", "number"], ["x2", "number"], ["y2", "number"]], "type": "html", "language": "javascript", "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 = -10;\nvar x_max = 10;\nvar y_min = -6;\nvar y_max = 25;\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: false,\n grid: false,\n axis:false,\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('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\n//var xticks = board.create('ticks',[xaxis,1],{\n// drawLabels: true,\n// label: {offset: [-4, -10]},\n// minorTicks: 0\n//});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return (x-a)*(x-a)+b},x_min,x_max]);\n\n// Plot coordinates.\n board.create('circle',[[x0,y0],0.1],{color:'red'});\n board.create('text',[x0,y0+0.3,'A']);\n board.create('circle',[[x1,y1],0.1],{color:'red'});\n board.create('text',[x1,y1+0.3,'B']);\n board.create('circle',[[x2,y2],0.1],{color:'red'});\n board.create('text',[x2,y2+0.3,'C']);\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Below is the graph of a function \$f(s) = \\simplify{(s-{a})^2+{b}}\$. Three points are drawn on the graph.

\n

{plot(a,b,0,x[0], fx[0], x[1], fx[1], x[2], fx[2])}

\n

The \$x\$-coordinates of \$A\$ and \$B\$ are \$\\var{x[0]}\$ and \$\\var{x[1]}\$, respectively.

\n

The \$y\$-coordinate of \$C\$ is \$\\var{fx[2]}\$.

\n

Determine the coordinates of \$A,B\$ and \$C\$.

\n

\n

Coordinates of A: [[0]]

\n

Of B: [[1]]

\n

Of C: [[2]]

\n