// Numbas version: exam_results_page_options {"name": "Vectors : Calculating Angles 2", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors : Calculating Angles 2", "tags": [], "metadata": {"description": "

Calculating the angle between two vectors.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Calculate the angle between the vectors $\\vec{v_1} = \\var{vec_1}$ and $\\vec{v_2} = \\var{vec_2}$.

\n

{geogebra_applet('https://www.geogebra.org/m/zwjrb7kn',defs)}

\n

", "advice": "

To find the angle $\\theta$ between the vectors $\\vec{v_1}$ and $\\vec{v_2}$, we can do this by first finding the angles each vector makes with the $x$-axis, and then finding the difference between the angles.

\n

Hence, if $\\vec{v_1}$ has an angle of $\\alpha_1$ with the $x$-axis and $\\vec{v_2}$ has an angle of $\\alpha_2$ with the $x$-axis (where $\\alpha_2 >\\alpha_1$), then the angle between the vectors is $\\theta=\\alpha_2 - \\alpha_1$.

\n

\n

Finding $\\alpha_1$:

\n

To calculate the angle $\\alpha_1$ between the vector $\\vec{v_1}$ and the $x$-axis, it can be helpful to draw the vector with the $x$ and $y$ components also included. This allows us to view the vector and its components as a right-angled triangle, and calculate the angle using trigonometry.

\n

{geogebra_applet('https://www.geogebra.org/m/qrasq4rv',def1)}

\n

We can see that we have a triangle which has an adjacent edge of length $\\var{a1}$ and an opposite edge of length $\\var{b1}$. Therefore,

\n

\\[ \\begin{split} \\tan(\\alpha_1) &\\,= \\frac{\\var{b1}}{\\var{a1}} \\\\ \\implies \\alpha_1 &\\,= \\tan^{-1}\\left(\\simplify[fractionNumbers]{{b1/a1}}\\right) \\\\ &\\,=\\var{angle1}^\\circ \\, \\var{dp1} \\end{split} \\]

\n

\n

Finding $\\alpha_2$:

\n

Calculating the angle $\\alpha_2$ between the vector $\\vec{v_2}$ and the $x$-axis using the same process:

\n

{geogebra_applet('https://www.geogebra.org/m/hajgeg9r',def2)}

\n

We have a triangle which has an adjacent edge of length $\\var{a2}$ and an opposite edge of length $\\var{b2}$. Therefore,

\n

\\[ \\begin{split} \\tan(\\alpha_2) &\\,= \\frac{\\var{b2}}{\\var{a2}} \\\\ \\implies \\alpha_2 &\\,= \\tan^{-1}\\left(\\simplify[fractionNumbers]{{b2/a2}}\\right) \\\\ &\\,=\\var{angle2}^\\circ \\, \\var{dp2} \\end{split} \\]

\n

Therefore, the angle between the vectors $\\vec{v_1}$ and $\\vec{v_2}$ is 

\n

\\[ \\begin{split} \\theta &\\,= \\alpha_2 - \\alpha_1 \\\\ &\\,=\\var{theta}^\\circ \\end{split} \\]

\n

", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vec_1": {"name": "vec_1", "group": "Ungrouped variables", "definition": "vector(a1,b1)", "description": "", "templateType": "anything", "can_override": false}, "defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n ['v_1',vec_1],\n ['v_2',vec_2]\n]", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(2..5 except a1)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(2..5 except a1)", "description": "", "templateType": "anything", "can_override": false}, "vec_2": {"name": "vec_2", "group": "Ungrouped variables", "definition": "vector(a2,b2)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(3..6)", "description": "", "templateType": "anything", "can_override": true}, "angle1": {"name": "angle1", "group": "Ungrouped variables", "definition": "arctan(b1/a1)*(180/pi)", "description": "", "templateType": "anything", "can_override": false}, "angle2": {"name": "angle2", "group": "Ungrouped variables", "definition": "arctan(b2/a2)*(180/pi)", "description": "", "templateType": "anything", "can_override": false}, "dp1": {"name": "dp1", "group": "Ungrouped variables", "definition": "if(round(angle1)=angle1,' ',' (2 d.p.)')", "description": "", "templateType": "anything", "can_override": false}, "dp2": {"name": "dp2", "group": "Ungrouped variables", "definition": "if(round(angle2)=angle2,' ',' (2 d.p.)')", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "Ungrouped variables", "definition": "precround(angle2-angle1,2)", "description": "", "templateType": "anything", "can_override": false}, "def1": {"name": "def1", "group": "Ungrouped variables", "definition": "[\n ['v_1',vec_1]\n]", "description": "", "templateType": "anything", "can_override": false}, "def2": {"name": "def2", "group": "Ungrouped variables", "definition": "[\n ['v_2',vec_2]\n]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "theta>10", "maxRuns": 100}, "ungrouped_variables": ["defs", "vec_1", "vec_2", "a1", "b1", "a2", "b2", "angle1", "angle2", "theta", "dp1", "dp2", "def1", "def2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\theta= $[[0]]$^\\circ$

\n

(Give your answer in degrees, to 2 decimal places where necessary)

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{theta}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}