// Numbas version: finer_feedback_settings {"name": "Vectors: Magnitude 2b", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors: Magnitude 2b", "tags": [], "metadata": {"description": "
Calculate the magnitude of a 3-dimensional vector $\\mathbf v$, where $\\mathbf v$ is written in the form $v_1 \\mathbf i+v_2 \\mathbf j + v_3 \\mathbf k$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Calculate the magnitude of the vector $\\mathbf v =\\simplify[all,!noLeadingMinus]{{vi}*mathbf:i+{vj}*mathbf:j+{vk}*mathbf:k}$ .
", "advice": "For a vector of the form $\\mathbf a = \\simplify{a_1*mathbf:i+a_2*mathbf:j+a_3*mathbf:k}$, the magnitude is found by calculating the square root of the sum of the components squared:
\n\\[ |\\mathbf a| = \\sqrt{a_1^2+a_2^2+a_3^2}.\\]
\nTherefore, for the vector $\\mathbf v =\\simplify[!noLeadingMinus]{{vi}*mathbf:i+{vj}*mathbf:j+{vk}*mathbf:k}$,
\n\\[ \\begin{split} |\\mathbf v| &\\,= \\simplify[!collectNumbers]{sqrt({vi}^2+{vj}^2+{vk}^2)} \\\\ &\\,= \\sqrt{\\var{vi^2+vj^2+vk^2}} \\\\ &\\, = \\var{magv} .\\end{split} \\]
\n\\[ \\begin{split} |\\mathbf v| &\\,= \\simplify[!collectNumbers]{sqrt({vi}^2+{vj}^2+{vk}^2)} \\\\ &\\,= \\sqrt{\\var{vi^2+vj^2+vk^2}} \\\\ &\\, = \\var{magv2} \\text{ (2 d.p.)} \\end{split} \\]
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"vi": {"name": "vi", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "vj": {"name": "vj", "group": "Ungrouped variables", "definition": "random(-10..10)", "description": "", "templateType": "anything", "can_override": false}, "magv": {"name": "magv", "group": "Ungrouped variables", "definition": "(vi^2+vj^2+vk^2)^0.5", "description": "", "templateType": "anything", "can_override": false}, "magv2": {"name": "magv2", "group": "Ungrouped variables", "definition": "precround(magv,2)", "description": "", "templateType": "anything", "can_override": false}, "vk": {"name": "vk", "group": "Ungrouped variables", "definition": "random(-10..10)", "description": "", "templateType": "anything", "can_override": false}, "magv_dp": {"name": "magv_dp", "group": "Ungrouped variables", "definition": "if(countdp(string(magv))<3,0,1)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "if(magv_dp=0,magv,magv2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vi", "vj", "vk", "magv", "magv2", "magv_dp", "ans"], "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": "$|\\mathbf v |= $[[0]]
\n(Give your answer 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": "{ans}", "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/"}], "resources": []}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}