// Numbas version: finer_feedback_settings {"name": "Violeta's copy of 3d - angle between two vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
angle between two vectors
\nrebelmaths
"}, "functions": {}, "extensions": [], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "name": "Violeta's copy of 3d - angle between two vectors", "advice": "(a)
\n\\[ \\begin{eqnarray*} \\boldsymbol{a\\cdot b}&=& (\\var{a}, \\var{b},\\var{c}) \\cdot (\\var{d}, \\var{f},\\var{g})\\\\ &=&({\\var{a}\\times\\var{d})+(\\var{b}\\times\\var{f})+(\\var{c}\\times\\var{g})}\\\\ &=& \\var{inner} \\end{eqnarray*} \\]
\n(b)
\n\\[\\theta=\\cos^{-1}\\left(\\frac{\\var{inner}}{\\sqrt{(\\var{a})^2+(\\var{b})^2+(\\var{c})^2}\\sqrt{(\\var{d})^2+(\\var{f})^2+(\\var{g})^2}}\\right)\\]
\n\\[\\theta=\\var{theta}\\]
\nThen round to the nearest degree.
", "variables": {"s1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1, 1)", "name": "s1"}, "theta": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "arccos((a*d+b*f+c*g)/(sqrt(a^2+b^2+c^2)*sqrt(d^2+f^2+g^2)))/pi*180", "name": "theta"}, "b": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "s2*random(2..9)", "name": "b"}, "f": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)", "name": "f"}, "g": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)", "name": "g"}, "s2": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1, 1)", "name": "s2"}, "s4": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1,1)", "name": "s4"}, "s3": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1, 1)", "name": "s3"}, "inner": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "a*d+b*f+c*g", "name": "inner"}, "a": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "s1*random(2..9)", "name": "a"}, "c": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "s3*random(2..9)", "name": "c"}, "d": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "definition": "s4*random(2..9)", "name": "d"}}, "statement": "Given the vectors:
\\[\\boldsymbol{a}=\\simplify[std]{{a}v:i+{b}v:j+{c}v:k},\\;\\;\\;\\boldsymbol{b}=\\simplify[std]{{d}v:i+{f}v:j+{g}v:k}\\]
answer the following question:
", "tags": [], "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0, "showFeedbackIcon": true, "gaps": [{"showpreview": true, "marks": 10, "vsetrange": [0, 1], "checkingtype": "absdiff", "showCorrectAnswer": true, "expectedvariablenames": [], "showFeedbackIcon": true, "type": "jme", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "scripts": {}, "answer": "{a}*{d}+{b}*{f}+{c}*{g}"}], "marks": 0, "steps": [{"variableReplacements": [], "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "type": "information", "prompt": "For $\\mathbf{a}=a_1\\mathbf{i}+a_2\\mathbf{j}+a_3\\mathbf{k}$ and $\\mathbf{b}=b_1\\mathbf{i}+b_2\\mathbf{j}+b_3\\mathbf{k}$,
\nthe scalar or dot product of $\\mathbf{a}$ and $\\mathbf{b}$ is given by
\n\\[\\mathbf{a} \\cdot \\mathbf{b}= a_1b_1+a_2b_2+a_3b_3\\]
"}], "type": "gapfill", "prompt": "Find $\\boldsymbol{a\\cdot b} =\\;\\;$ [[0]]
"}, {"notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "marks": 10, "precisionPartialCredit": 0, "variableReplacements": [], "correctAnswerStyle": "plain", "minValue": "arccos((a*d+b*f+c*g)/(sqrt(a^2+b^2+c^2)*sqrt(d^2+f^2+g^2)))/pi*180", "variableReplacementStrategy": "originalfirst", "stepsPenalty": 0, "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0, "showPrecisionHint": false, "precision": 0, "showCorrectAnswer": true, "maxValue": "arccos((a*d+b*f+c*g)/(sqrt(a^2+b^2+c^2)*sqrt(d^2+f^2+g^2)))/pi*180", "prompt": "Find the angle between $\\mathbf{a}$ and $\\mathbf{b}$ to the nearest degree.
", "type": "numberentry", "strictPrecision": false, "mustBeReduced": false, "correctAnswerFraction": false, "allowFractions": false, "scripts": {}, "steps": [{"variableReplacements": [], "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "type": "information", "prompt": "$\\mathbf{a}\\cdot \\mathbf{b}=|\\mathbf{a}||\\mathbf{b}|\\cos\\theta$, where $\\theta$ is the angle between the vector $\\mathbf{a}$ and $\\mathbf{b}$.
\nRearrange to get $\\cos \\theta =\\frac{\\mathbf{a}\\cdot \\mathbf{b}}{|\\mathbf{a}||\\mathbf{b}|}$
"}], "precisionType": "dp"}], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s4", "inner", "theta"], "preamble": {"css": "", "js": ""}, "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/"}]}