// Numbas version: exam_results_page_options {"name": "Describe vectors in terms of base vectors, add and find magnitude", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

This question asks the student to interpret a JSXGraph diagram to write three vectors in terms of the base vectors. Each vector has both a horizontal and vertical component. Further parts ask the student to add vectors and find a magnitude. 

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

Consider the four vectors, $\\boldsymbol{q}$, $\\boldsymbol{r}$ and $\\boldsymbol{s}$, acting from A to, respectively, the points B, C and D.

\n

{vector_plot()}

\n

", "variables": {"vy": {"name": "vy", "description": "", "definition": "ry+2*sy", "templateType": "anything", "group": "Computed variables"}, "sx": {"name": "sx", "description": "", "definition": "random(-2..-4)", "templateType": "anything", "group": "Random Variables"}, "rx": {"name": "rx", "description": "", "definition": "random(3..5)", "templateType": "anything", "group": "Random Variables"}, "qy": {"name": "qy", "description": "", "definition": "random(3..5)", "templateType": "anything", "group": "Random Variables"}, "sy": {"name": "sy", "description": "", "definition": "random(-2..-4)", "templateType": "anything", "group": "Random Variables"}, "ry": {"name": "ry", "description": "", "definition": "random(3..5)", "templateType": "anything", "group": "Random Variables"}, "qx": {"name": "qx", "description": "", "definition": "random(-1..-4)", "templateType": "anything", "group": "Random Variables"}, "vx": {"name": "vx", "description": "", "definition": "rx+2*sx", "templateType": "anything", "group": "Computed variables"}}, "tags": [], "ungrouped_variables": [], "functions": {"vector_plot": {"language": "javascript", "type": "html", "parameters": [], "definition": "var qx = Numbas.jme.unwrapValue(question.scope.variables.qx);\nvar qy = Numbas.jme.unwrapValue(question.scope.variables.qy);\nvar rx = Numbas.jme.unwrapValue(question.scope.variables.rx);\nvar ry = Numbas.jme.unwrapValue(question.scope.variables.ry);\nvar sx = Numbas.jme.unwrapValue(question.scope.variables.sx);\nvar sy = Numbas.jme.unwrapValue(question.scope.variables.sy);\n\nvar div = Numbas.extensions.jsxgraph.makeBoard('350px','350px',{boundingBox:[-4.5,5.5,5.5,-4.5],grid:true,axis:false,});\n \nvar board = div.board;\ngrid = board.create('grid', [], {strokeColor: '#555'}); \n\n// points\np1 = board.create('point', [0,0], {size:3,name:'A', fixed:true, showInfobox: false, label:{fontsize:16,offset:[10,-10]}});\np2 = board.create('point', [qx,qy], {size:3,name:'B', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-20,-5]}});\np3 = board.create('point', [rx,ry], {size:3,name:'C', fixed:true, showInfobox: false, label:{fontsize:16,offset:[5,-10]}});\np4 = board.create('point', [sx,sy], {size:3,name:'D', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-20,-5]}});\n\n// arrows\nvar a1 = board.create('line',[p1,p2], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\nvar a2 = board.create('line',[p1,p3], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\nvar a3 = board.create('line',[p1,p4], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\n\n\nt1 = board.create('text',[qx/3,qy/2,'q'],{fontsize: 20, color: 'blue'});\nt2 = board.create('text',[2*rx/3,ry/2,'r'],{fontsize: 20, color: 'blue'});\nt3 = board.create('text',[sx/3,sy/2,'s'],{fontsize: 20, color: 'blue'});\n\nreturn div"}}, "name": "Describe vectors in terms of base vectors, add and find magnitude", "advice": "

a)

\n

Vector $\\boldsymbol{q}$ has a horizontal component of $\\var{qx}$ and a vertical length of $\\var{qy}$, therefore

\n

\\[ \\boldsymbol{q} =\\simplify[!noLeadingMinus]{{qx}*v:i+{qy}*v:j}\\text{.} \\]

\n

Vector $\\boldsymbol{r}$ has a horizontal component of $\\var{rx}$ and a vertical length of $\\var{ry}$, therefore

\n

\\[ \\boldsymbol{r} =\\simplify[!noLeadingMinus]{{rx}*v:i+{ry}*v:j}\\text{.} \\]

\n

Vector $\\boldsymbol{s}$ has a horizontal component of $\\var{sx}$ and a vertical length of $\\var{sy}$, therefore

\n

\\[ \\boldsymbol{s} = \\simplify[!noLeadingMinus]{{sx}*v:i+{sy}*v:j}\\text{.} \\]

\n

b)

\n

Now that we have our vectors in component form we can compute $\\boldsymbol{u} =\\boldsymbol{q}+\\boldsymbol{r}$:

\n

\\begin{align}
\\boldsymbol{u} = \\boldsymbol{q}+\\boldsymbol{r} &=\\simplify[!noLeadingMinus]{({qx}+{rx})*v:i+({qy}+{ry})*v:j}  \\\\&=\\simplify[all,!noLeadingMinus]{{qx+rx}*v:i+{qy+ry}*v:j}\\text{.}
\\end{align}

\n

c)

\n

We can follow a similar procedure to obtain the vector $\\boldsymbol{v} = \\boldsymbol{r}+2\\boldsymbol{s}$.

\n

\\begin{align}
\\boldsymbol{v} = \\boldsymbol{r}+\\boldsymbol{2s} &=\\simplify[!noLeadingMinus]{({rx}+{2*sx})*v:i+({ry}+{2*sy})*v:j}  \\\\&=\\simplify[all,!noLeadingMinus]{{vx}*v:i+{vy}*v:j}\\text{.}
\\end{align}

\n

d)

\n

We can find the maginitude of the vector $\\boldsymbol{v}$ by using Pythagoras' Rule. The magnitude is the length of the hypotenuse of a triangle with sides $\\var{abs(vx)}$ and $\\var{abs(vy)}$.

\n

\\[ \\lvert\\boldsymbol{v}\\rvert = \\sqrt{\\var{abs(vx)}^2+\\var{abs(vy)}^2} = \\var{dpformat(sqrt(vx^2+vy^2),1)}\\text{.} \\]

", "extensions": ["jsxgraph"], "parts": [{"variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "qx", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "qx", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "qy", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "qy", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "rx", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "rx", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "ry", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "ry", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "sx", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "sx", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "sy", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "sy", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "prompt": "

Write each of the vectors $\\boldsymbol{q}$, $\\boldsymbol{r}$, $\\boldsymbol{s}$ and $\\boldsymbol{t}$ in terms of the base vectors $\\boldsymbol{i}$ (unit 2 in the horizontal direction) and $\\boldsymbol{j}$ (unit 1 in the vertical direction).

\n

$\\boldsymbol{q} = $ [[0]] $\\boldsymbol{i}$ +  [[1]] $\\boldsymbol{j}$

\n

$\\boldsymbol{r} = $ [[2]] $\\boldsymbol{i}$ + [[3]] $\\boldsymbol{j}$

\n

$\\boldsymbol{s} = $ [[4]] $\\boldsymbol{i}$ + [[5]] $\\boldsymbol{j}$

\n

", "showFeedbackIcon": true}, {"variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "qx+rx", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "qx+rx", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "qy+ry", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "qy+ry", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "prompt": "

What are the components of the vector $\\boldsymbol{u} = \\boldsymbol{q}+\\boldsymbol{r}$?

\n

$u$ = [[0]] $\\boldsymbol{i}$ + [[1]] $\\boldsymbol{j}$

", "showFeedbackIcon": true}, {"variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "vx", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "vx", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "vy", "correctAnswerFraction": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "vy", "showCorrectAnswer": true, "type": "numberentry", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": "0.5", "showFeedbackIcon": true}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "prompt": "

What are the components of the vector $\\boldsymbol{v} = \\boldsymbol{r}+2\\boldsymbol{s}$?

\n

$\\boldsymbol{v}$ = [[0]] $\\boldsymbol{i}$ + [[1]] $\\boldsymbol{j}$

", "showFeedbackIcon": true}, {"variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "precisionPartialCredit": 0, "mustBeReduced": false, "unitTests": [], "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "maxValue": "sqrt(vx^2+vy^2)", "strictPrecision": false, "marks": 1, "precision": "1", "variableReplacements": [{"part": "p2g0", "variable": "vx", "must_go_first": false}, {"part": "p2g1", "variable": "vy", "must_go_first": false}], "mustBeReducedPC": 0, "correctAnswerFraction": false, "minValue": "sqrt(vx^2+vy^2)", "extendBaseMarkingAlgorithm": true, "precisionType": "dp", "showCorrectAnswer": true, "type": "numberentry", "showPrecisionHint": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision."}], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "prompt": "

What is the magnitude of the vector $\\boldsymbol{v}$?

\n

$\\lvert{\\boldsymbol{v}}\\rvert = $ [[0]]

", "showFeedbackIcon": true}], "type": "question", "variable_groups": [{"variables": ["qx", "qy", "rx", "ry", "sx", "sy"], "name": "Random Variables"}, {"variables": ["vx", "vy"], "name": "Computed variables"}], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}