// Numbas version: exam_results_page_options {"name": "Mechanics: velocity to position", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "name": "Mechanics: velocity to position", "ungrouped_variables": ["a1", "b1", "x11", "x12", "ar1", "a2", "c2", "x22", "x21", "ar21", "ar22", "a3", "b3", "x31", "x32", "ar31", "ar32", "a4", "b4", "c4", "x41", "x42", "ar41", "ar42"], "metadata": {"description": "

Q1. True/false questions about basic facts.

\n

Q2 and Q3. Velocity-time graphs are given with areas underneath them shaded. The area of the shaded regions are given. From this, changes in position, distances are to be calculated.

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "functions": {"plotgraph": {"definition": "// Shading under a graph! This functions plots a graph of y = a(x-r1)(x-r2)\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 xmin = -7;\nvar xmax = 7;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '600px',\n '500px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: true\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.\n/*var xaxis = brd.create('axis',[[0,0],[1,0]],\n {name:'t', withLabel: true, label: {position:'rt', offset: [-10, 5]}}\n\t\t\t);*/\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\n/*var yaxis = brd.create('axis',[[0,0],[0,1]],\n {name:'v', withLabel: true, label: {offset: [-10, 220]}}\n );*/\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.1) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = board.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return a*x+b;\n}\n\nvar f2 = function(x) {\n return a*x*x + c;\n}\n\nvar f3 = function(x) {\n return 0.5*(x-a)*(x-b);\n}\n\nvar f4 = function(x) {\n return 0.5*(x-a)*(x-b)*(x-c);\n}\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n board.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n case 2:\n board.create('functiongraph', [f2]);\n shade(f2,x1,x2,'red');\n shade(f2,x2,x2+2,'green');\n break;\n case 3:\n board.create('functiongraph', [f3]);\n shade(f3,x1,x2,'red');\n shade(f3,x2,x2+2,'green');\n break;\n case 4:\n board.create('functiongraph', [f4]);\n shade(f4,x1,x2,'red');\n shade(f4,x2,x2+2,'green');\n break\n}\n\n\n\nreturn div;", "parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["ymin", "number"], ["ymax", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "type": "html", "language": "javascript"}}, "variables": {"x12": {"description": "", "name": "x12", "templateType": "anything", "definition": "random(2..5) + x11", "group": "Ungrouped variables"}, "b3": {"description": "", "name": "b3", "templateType": "anything", "definition": "a3+random(3..4)", "group": "Ungrouped variables"}, "x41": {"description": "", "name": "x41", "templateType": "anything", "definition": "a4", "group": "Ungrouped variables"}, "a4": {"description": "", "name": "a4", "templateType": "anything", "definition": "random(-4..-1)", "group": "Ungrouped variables"}, "b4": {"description": "", "name": "b4", "templateType": "anything", "definition": "a4+random(1..3)", "group": "Ungrouped variables"}, "a1": {"description": "", "name": "a1", "templateType": "anything", "definition": "1", "group": "Ungrouped variables"}, "c2": {"description": "", "name": "c2", "templateType": "anything", "definition": "random(1..2)", "group": "Ungrouped variables"}, "ar42": {"description": "", "name": "ar42", "templateType": "anything", "definition": "siground(0.5*( ( 1/4*(x42)^4 - 1/3*(a4+b4+c4)*(x42)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x42)^2 - a4*b4*c4*(x42) ) - ( 1/4*(x42+2)^4 - 1/3*(a4+b4+c4)*(x42+2)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x42+2)^2 - a4*b4*c4*(x42+2) ) ),3)", "group": "Ungrouped variables"}, "a2": {"description": "", "name": "a2", "templateType": "anything", "definition": "1", "group": "Ungrouped variables"}, "c4": {"description": "", "name": "c4", "templateType": "anything", "definition": "b4+2", "group": "Ungrouped variables"}, "x31": {"description": "", "name": "x31", "templateType": "anything", "definition": "b3-random(2..3)", "group": "Ungrouped variables"}, "x42": {"description": "", "name": "x42", "templateType": "anything", "definition": "b4", "group": "Ungrouped variables"}, "ar21": {"description": "", "name": "ar21", "templateType": "anything", "definition": "siground((1/3*a2*x22^3 + c2*x22)-(1/3*a2*x21^3 + c2*x21),3)", "group": "Ungrouped variables"}, "b1": {"description": "", "name": "b1", "templateType": "anything", "definition": "random(1..4)", "group": "Ungrouped variables"}, "ar41": {"description": "", "name": "ar41", "templateType": "anything", "definition": "siground(0.5*( ( 1/4*(x42)^4 - 1/3*(a4+b4+c4)*(x42)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x42)^2 - a4*b4*c4*(x42) ) - ( 1/4*(x41)^4 - 1/3*(a4+b4+c4)*(x41)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x41)^2 - a4*b4*c4*(x41) ) ),3)", "group": "Ungrouped variables"}, "ar32": {"description": "", "name": "ar32", "templateType": "anything", "definition": "siground(0.5*( (1/3*(x32+2)^3 - 1/2*(a3+b3)*(x32+2)^2 + a3*b3*(x32+2) ) - (1/3*(x32)^3 - 1/2*(a3+b3)*(x32)^2 + a3*b3*(x32)) ),3)", "group": "Ungrouped variables"}, "ar31": {"description": "", "name": "ar31", "templateType": "anything", "definition": "siground(-0.5*( (1/3*(x32)^3 - 1/2*(a3+b3)*(x32)^2 + a3*b3*(x32) ) - (1/3*(x31)^3 - 1/2*(a3+b3)*(x31)^2 + a3*b3*(x31)) ),3)", "group": "Ungrouped variables"}, "x32": {"description": "", "name": "x32", "templateType": "anything", "definition": "b3", "group": "Ungrouped variables"}, "ar1": {"description": "", "name": "ar1", "templateType": "anything", "definition": "(0.5*a1*x12^2 + b1*x12) - (0.5*a1*x11^2 + b1*x11)", "group": "Ungrouped variables"}, "x22": {"description": "", "name": "x22", "templateType": "anything", "definition": "random(1..4 except 2)+x21", "group": "Ungrouped variables"}, "a3": {"description": "", "name": "a3", "templateType": "anything", "definition": "random(-3..-1)", "group": "Ungrouped variables"}, "x11": {"description": "", "name": "x11", "templateType": "anything", "definition": "0", "group": "Ungrouped variables"}, "x21": {"description": "", "name": "x21", "templateType": "anything", "definition": "random(-4..-2)", "group": "Ungrouped variables"}, "ar22": {"description": "", "name": "ar22", "templateType": "anything", "definition": "siground((1/3*a2*(x22+2)^3 + c2*(x22+2))-(1/3*a2*x22^3 + c2*x22),3)", "group": "Ungrouped variables"}}, "extensions": ["jsxgraph"], "parts": [{"maxAnswers": 0, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "matrix": ["0.75", "0.75", "0.75", "0.75", "-3", "-3", "-3", "-3"], "distractors": ["", "", "", "", "", "", "", ""], "maxMarks": 0, "choices": ["In a velocity-time graph, areas are equal to distance travelled", "To calculate change in position based on area, you need to think about whether $v$ is positive or negative for the different areas.", "To calculate total distance travelled, you calculate the total area in a velocity-time graph.", "To get from position to velocity, you have to differentiate.", "In a position-time graph, areas are equal to distance travelled", "In a position-time graph, gradients are equal to speeds", "The change in position is equal to the total area in a velocity-time graph", "To get from velocity to position, you differentiate"], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "displayType": "checkbox", "minMarks": 0, "adaptiveMarkingPenalty": 0, "useCustomName": false, "warningType": "none", "customMarkingAlgorithm": "", "type": "m_n_2", "prompt": "

Select those options which are correct/true.

", "unitTests": [], "customName": "", "shuffleChoices": true, "scripts": {}, "marks": 0, "showCellAnswerState": true, "minAnswers": "4", "displayColumns": "1"}, {"variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "correctAnswerFraction": false, "allowFractions": false, "minValue": "{ar21}", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "unitTests": [], "mustBeReducedPC": 0, "customName": "", "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "{ar21}", "marks": "1", "mustBeReduced": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "correctAnswerFraction": false, "allowFractions": false, "minValue": "{ar22+ar21}", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "unitTests": [], "mustBeReducedPC": 0, "customName": "", "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "{ar22+ar21}", "marks": "1", "mustBeReduced": false}], "prompt": "

{plotgraph(2,x21,x22,-5,25,a2,0,c2)}

\n

\n

This is a velocity-time graph of a particle. 

\n

The area of the left shaded region is $\\var{ar21}$. The area of the right shaded region is $\\var{ar22}$.

\n

What is the change in position from $t=\\var{x21}$ to $t=\\var{x22}$? [[0]]

\n

What is the total distance travelled from $t=\\var{x21}$ to $t=\\var{x22+2}$? [[1]]

\n

", "unitTests": [], "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "customName": "", "sortAnswers": false, "marks": 0, "adaptiveMarkingPenalty": 0, "useCustomName": false, "customMarkingAlgorithm": ""}, {"variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "correctAnswerFraction": false, "allowFractions": false, "minValue": "{ar31+ar32}", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "unitTests": [], "mustBeReducedPC": 0, "customName": "", "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "{ar31+ar32}", "marks": "1", "mustBeReduced": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "correctAnswerFraction": false, "allowFractions": false, "minValue": "{-ar31}", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "unitTests": [], "mustBeReducedPC": 0, "customName": "", "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "{-ar31}", "marks": "1", "mustBeReduced": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "correctAnswerFraction": false, "allowFractions": false, "minValue": "{ar32-ar31}", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "unitTests": [], "mustBeReducedPC": 0, "customName": "", "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "{ar32-ar31}", "marks": "1", "mustBeReduced": false}], "prompt": "

{plotgraph(3,x31,x32,-3,7,a3,b3,0)}

\n

\n

This is a velocity-time graph of a particle. 

\n

The area of the left shaded region is $\\var{ar31}$. The area of the right shaded region is $\\var{ar32}$.

\n

What is the total distance travelled by the particle between $t=\\var{x31}$ and $t=\\var{x32+2}$? [[0]]

\n

What is the change in position from $t=\\var{x31}$ to $t=\\var{x32}$? [[1]]

\n

What is the change in position from $t=\\var{x31}$ to $t=\\var{x32+2}$?[[2]]

\n

", "unitTests": [], "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "customName": "", "sortAnswers": false, "marks": 0, "adaptiveMarkingPenalty": 0, "useCustomName": false, "customMarkingAlgorithm": ""}], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

See Lecture 13.3 and Workshop 13.5.

\n

\n

The key facts needed to do these questions are:

\n

-The area between the graph and the $t$-axis corresponds to distances.

\n

-If the velocity is positive, then it means the particle is moving forwards, i.e., that the change in position is positive.

\n

-If the velocity is negative, then the particle is moving backwards, i.e., the change in position is negative.

", "statement": "", "tags": [], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}