// Numbas version: exam_results_page_options {"name": "Vectors 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["t", "u", "a", "b", "c", "d", "fa", "fb", "g", "sa", "sb", "ta", "tb"], "variable_groups": [{"name": "Initial vectors", "variables": ["s1", "s2", "s3", "s4", "units", "direction_v", "direction_w", "v", "w"]}, {"name": "Result", "variables": ["angle", "precision"]}], "advice": "

Use the formula, $\\boldsymbol{v \\cdot w} = \\lVert \\boldsymbol{v} \\rVert \\lVert \\boldsymbol{w} \\rVert \\cos(\\theta)$m where $\\theta$ is the angle between the vectors.

\n

Here

\n

\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\simplify[]{sqrt({s1}^2 + {s2}^2)} \\\\
&= \\sqrt{2}, \\\\[1em]
\\lVert \\boldsymbol{w} \\rVert &= \\simplify[]{sqrt({s3}^2 + {s4}^2)} \\\\
&= \\sqrt{2}, \\\\[1em]
\\boldsymbol{v \\cdot w} &= \\var{v} \\boldsymbol{\\cdot} \\var{w} \\\\
&= \\var{dot(v,w)}
\\end{align}

\n

So

\n

\\begin{align}
\\cos(\\theta) &= \\frac{\\var{dot(v,w)}}{\\sqrt{2}\\sqrt{2}} = \\simplify[std]{{dot(v,w)}/2} \\\\
\\implies \\theta &= \\arccos\\left(\\simplify[std]{{dot(v,w)}/{2}}\\right) \\\\
&= \\var{precround(angle,precision)} \\text{ radians}
\\end{align}

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "name": "Vectors 1", "metadata": {"description": "

Given vectors  $\\boldsymbol{v,\\;w}$, find the angle between them.

", "notes": "

15/7/2015

\n

Added tags

\n

\n

16/07/2012:

\n

Added tags.

\n

Question appears to be working correctly.

\n

Moved the \\rightarrow to the correct place in the solution.

\n

 

\n

 

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

You are given the vectors $\\boldsymbol{v} = \\var{v}$, $\\boldsymbol{w} = \\var{w}$ in $\\mathbb{R}^3$.

", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "prompt": "

Find the angle between $\\boldsymbol{v}$ and $\\boldsymbol{w}$, in radians.

\n

Note the angle must be in the range $0$ to $\\pi$.

\n

Give your answer to {precision} decimal places.

\n

Angle in radians = [[0]]

", "gaps": [{"showPrecisionHint": false, "precisionPartialCredit": 0, "showCorrectAnswer": true, "precisionType": "dp", "type": "numberentry", "strictPrecision": true, "precision": "precision", "variableReplacementStrategy": "originalfirst", "scripts": {}, "minValue": "{angle}", "maxValue": "{angle}", "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "marks": 1, "precisionMessage": "You have not given your answer to the correct precision."}], "type": "gapfill", "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst"}], "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "variables": {"fb": {"name": "fb", "description": "", "definition": "if(u=1,0,s3)", "templateType": "anything", "group": "Ungrouped variables"}, "direction_v": {"name": "direction_v", "description": "", "definition": "map(units[j],j,shuffle(0..2))", "templateType": "anything", "group": "Initial vectors"}, "g": {"name": "g", "description": "", "definition": "{fa*fb+sa*sb+ta*tb}", "templateType": "anything", "group": "Ungrouped variables"}, "units": {"name": "units", "description": "", "definition": "map(vector(x),x,list(id(3)))", "templateType": "anything", "group": "Initial vectors"}, "direction_w": {"name": "direction_w", "description": "", "definition": "map(units[j],j,shuffle(0..2))", "templateType": "anything", "group": "Initial vectors"}, "c": {"name": "c", "description": "", "definition": "if(u=1,2,1)", "templateType": "anything", "group": "Ungrouped variables"}, "precision": {"name": "precision", "description": "", "definition": "3", "templateType": "anything", "group": "Result"}, "v": {"name": "v", "description": "", "definition": "direction_v[0]*s1 + direction_v[1]*s2", "templateType": "anything", "group": "Initial vectors"}, "w": {"name": "w", "description": "", "definition": "direction_w[0]*s3 + direction_w[1]*s4", "templateType": "anything", "group": "Initial vectors"}, "s1": {"name": "s1", "description": "", "definition": "random(1,-1)", "templateType": "anything", "group": "Initial vectors"}, "angle": {"name": "angle", "description": "", "definition": "arccos(dot(v,w)/(len(v)*len(w)))", "templateType": "anything", "group": "Result"}, "a": {"name": "a", "description": "", "definition": "if(t=1,2,1)", "templateType": "anything", "group": "Ungrouped variables"}, "s2": {"name": "s2", "description": "", "definition": "random(1,-1)", "templateType": "anything", "group": "Initial vectors"}, "d": {"name": "d", "description": "", "definition": "if(u=3,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "u": {"name": "u", "description": "", "definition": "random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "tb": {"name": "tb", "description": "", "definition": "if(u=3,0,s4)", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"name": "b", "description": "", "definition": "if(t=3,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "s3": {"name": "s3", "description": "", "definition": "random(1,-1)", "templateType": "anything", "group": "Initial vectors"}, "ta": {"name": "ta", "description": "", "definition": "if(t=3,0,s2)", "templateType": "anything", "group": "Ungrouped variables"}, "fa": {"name": "fa", "description": "", "definition": "if(t=1,0,s1)", "templateType": "anything", "group": "Ungrouped variables"}, "t": {"name": "t", "description": "", "definition": "random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "sa": {"name": "sa", "description": "", "definition": "if(t=2,0,if(t=1,s1,s2))", "templateType": "anything", "group": "Ungrouped variables"}, "sb": {"name": "sb", "description": "", "definition": "if(u=2,0,if(u=1,s3,s4))", "templateType": "anything", "group": "Ungrouped variables"}, "s4": {"name": "s4", "description": "", "definition": "if(s1=s3 ,-s2,random(-1,1))", "templateType": "anything", "group": "Initial vectors"}}, "tags": ["angle between vectors", "angle beween two vectors", "checked2015", "degrees and radians", "dot product", "finding the angle between vectors", "inner product", "MAS1602", "mas1602", "radians", "scalar product", "vectors"], "functions": {}, "preamble": {"css": "", "js": ""}, "showQuestionGroupNames": false, "type": "question", "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}]}], "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}