// Numbas version: exam_results_page_options {"name": "Find unit vector parallel to given vector, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"lenu": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(u)", "description": "", "name": "lenu"}, "u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "vector(repeat(random(1..9)*sign(random(1,-1)),3))", "description": "", "name": "u"}, "unitu": {"templateType": "anything", "group": "Ungrouped variables", "definition": "vector(precround(u[0]/lenu,3),precround(u[1]/lenu,3),precround(u[2]/lenu,3))", "description": "", "name": "unitu"}}, "ungrouped_variables": ["u", "lenu", "unitu"], "name": "Find unit vector parallel to given vector, ", "functions": {}, "parts": [{"customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

$\\boldsymbol{\\hat{a}}=($[[0]]$,$[[1]]$,$[[2]]$)$.  (Enter your answers to 3d.p.)

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "showCorrectAnswer": true, "minValue": "unitu[0]-0.001", "maxValue": "unitu[0]+0.001", "unitTests": [], "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "showCorrectAnswer": true, "minValue": "unitu[1]-0.001", "maxValue": "unitu[1]+0.001", "unitTests": [], "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "showCorrectAnswer": true, "minValue": "unitu[2]-0.001", "maxValue": "unitu[2]+0.001", "unitTests": [], "correctAnswerStyle": "plain", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "mustBeReducedPC": 0}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "sortAnswers": false}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Find a unit vector $\\boldsymbol{\\hat{a}}$, which is parallel to $\\boldsymbol{u}=\\pmatrix{\\var{u[0]},\\var{u[1]},\\var{u[2]}}$.

", "tags": ["checked2015", "vector", "Vector"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the unit vector parallel to a given vector.

\n

Interim calculations in Advice should be presented in enough accuracy to ensure that the final calculations are to 3dps.

"}, "extensions": [], "advice": "

Note that in this advice, the full calculator display is used in the calculation of each step; any rounding is purely for display clarity.

\n

There is only one unit vector parallel to a vector $\\boldsymbol{u}=\\pmatrix{u_1,u_2,u_3}$, namely the unit vector $\\boldsymbol{\\hat{u}}=\\boldsymbol{u}/\\lvert\\boldsymbol{u}\\rvert$, where $\\lvert\\boldsymbol{u}\\rvert=\\sqrt{u_1^2+u_2^2+u_3^2}$.

\n

In this question $\\lvert\\boldsymbol{u}\\rvert=\\sqrt{(\\var{u[0]})^2+(\\var{u[1]})^2+(\\var{u[2]})^2}=\\var{precround(lenu,3)}$, and so $\\boldsymbol{\\hat{a}}=\\boldsymbol{\\hat{u}}=\\frac{1}{\\var{precround(lenu,3)}}\\pmatrix{\\var{u[0]},\\var{u[1]},\\var{u[2]}}=\\pmatrix{\\var{unitu[0]},\\var{unitu[1]},\\var{unitu[2]}}$ to 3d.p.

\n

There is also an anti-parallel unit vector $-\\boldsymbol{\\hat{u}}=\\pmatrix{\\var{-unitu[0]},\\var{-unitu[1]},\\var{-unitu[2]}}$.

", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}