// Numbas version: finer_feedback_settings {"name": "Angle between two vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"variableReplacements": [], "showCorrectAnswer": true, "prompt": "
Angle in degrees = [[0]]$^{\\circ}$
\nAngle in radians = [[1]]radians.
\nNote that you can input the radians as a decimal to 4 decimal places or as a
Bruker formelen:
\n$\\boldsymbol{A \\cdot B} = |\\boldsymbol{A}||\\boldsymbol{B}|\\cos(\\theta)$ der $\\theta$ er vinkelen mellom vektorene.
\nHer er $|\\boldsymbol{A}| = \\sqrt{ (\\var{s1})^2+(\\var{s2})^2} = \\simplify[all]{sqrt({s1^2+s2^2})},\\;\\;\\;|\\boldsymbol{B}| = \\sqrt{ (\\var{s3})^2+(\\var{s4})^2} = \\simplify[all]{sqrt({s3^2+s4^2})}$
\nog
\n$\\boldsymbol{A \\cdot B} = (\\var{fa},\\var{sa}, \\var{ta}) \\cdot (\\var{fb},\\var{sb}, \\var{tb}) = \\var{g}$.
\nSlik at \\[\\begin{eqnarray*} \\cos(\\theta)&=&\\frac{\\var{g}}{\\sqrt{2}\\sqrt{2}} = \\simplify[std]{{g}/{2}}\\\\ \\Rightarrow \\theta &=&\\arccos\\left(\\simplify[std]{{g}/{2}}\\right)\\\\ &=&\\var{angle}\\,^{\\circ} \\end{eqnarray*} \\]
Konvertering fra grader til radianer gjøres ved å multiplisere vinkel i grader med $\\displaystyle \\frac{\\pi}{180}$.
Da blir $\\displaystyle \\var{angle}\\,^{\\circ}=\\simplify[std]{({angle}*pi)/{180}= {precround(angle*pi/180,4)}}$ radianer i 4 siffers nøyaktighet.
", "statement": "Given the vectors
$\\mathbf{a}=\\var{fa}\\mathbf{i}+\\var{sa}\\mathbf{j}+\\var{ta}\\mathbf{k},\\;\\;\\;\\mathbf{b}=\\var{fb}\\mathbf{i}+\\var{sb}\\mathbf{j}+ \\var{tb}\\mathbf{k}$
Find the angle between these vectors in degrees and radians.
\nNote that the angle must be between $0\\,^{\\circ}$ and $180\\,^{\\circ}$ (between $0$ and $\\pi$ radians)
", "tags": [], "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["s1", "a", "s4", "fa", "angle", "g", "fb", "tb", "sb", "ta", "c", "sa", "s2", "s3", "u", "d", "b", "t"], "extensions": [], "variables": {"a": {"definition": "if(t=1,2,1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a"}, "s4": {"definition": "if(s1=s3 ,-s2,random(-1,1))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s4"}, "fa": {"definition": "if(t=1,0,s1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "fa"}, "angle": {"definition": "precround(180/pi*arccos(g/2),1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "angle"}, "s1": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s1"}, "fb": {"definition": "if(u=1,0,s3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "fb"}, "tb": {"definition": "if(u=3,0,s4)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "tb"}, "sb": {"definition": "if(u=2,0,if(u=1,s3,s4))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "sb"}, "ta": {"definition": "if(t=3,0,s2)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ta"}, "c": {"definition": "if(u=1,2,1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c"}, "sa": {"definition": "if(t=2,0,if(t=1,s1,s2))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "sa"}, "s2": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s2"}, "s3": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s3"}, "u": {"definition": "random(1,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "u"}, "d": {"definition": "if(u=3,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d"}, "b": {"definition": "if(t=3,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b"}, "g": {"definition": "{fa*fb+sa*sb+ta*tb}", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g"}, "t": {"definition": "random(1,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "t"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Find the angle between two vectors
"}, "name": "Angle between two vectors", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variable_groups": [], "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}