// Numbas version: finer_feedback_settings {"name": "Simon's copy of Angle between vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "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.
\nHere
\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}
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}
Given vectors $\\boldsymbol{v,\\;w}$, find the angle between them.
", "notes": "15/7/2015
\nAdded tags
\n\n
16/07/2012:
Added tags.
\nQuestion appears to be working correctly.
Moved the \\rightarrow to the correct place in the solution.
\n
", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "prompt": "
Find the angle between $\\boldsymbol{v}$ and $\\boldsymbol{w}$, in radians.
\nNote the angle must be in the range $0$ to $\\pi$.
\nGive your answer to {precision} decimal places.
\nAngle in radians = [[0]]
", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "type": "gapfill", "gaps": [{"scripts": {}, "strictPrecision": true, "maxValue": "{angle}", "variableReplacementStrategy": "originalfirst", "minValue": "{angle}", "showCorrectAnswer": true, "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "precision": "precision", "precisionPartialCredit": 0, "variableReplacements": [], "precisionType": "dp", "marks": 1, "type": "numberentry", "allowFractions": false}]}], "statement": "You are given the vectors $\\boldsymbol{v} = \\var{v}$, $\\boldsymbol{w} = \\var{w}$ in $\\mathbb{R}^3$.
", "variable_groups": [{"name": "Initial vectors", "variables": ["s1", "s2", "s3", "s4", "units", "direction_v", "direction_w", "v", "w"]}, {"name": "Result", "variables": ["angle", "precision"]}], "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "questions": [], "pickQuestions": 0}], "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["t", "u", "a", "b", "c", "d", "fa", "fb", "g", "sa", "sb", "ta", "tb"], "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"], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}