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

Calculating the missing side-length of a triangle using the cosine rule.

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

Find the length of $c$:

\n

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

\n

", "advice": "

Since we know two side-lengths and the angle between them, we can use the cosine rule to find the third length, $c$. The cosine rules states:

\n

\\[ c^2=a^2+b^2-2ab\\cos(C) \\]

\n

where $a$, $b$, and $c$ are the side-lengths, and $C$ is the angle between $a$ and $b$:

\n

{geogebra_applet('https://www.geogebra.org/m/pg7d3hvz')}

\n

So, for the triangle

\n

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

\n

we know that side $a=\\var{sidea}$, side $b=\\var{sideb}$, and angle $C=\\var{anglecr}^\\circ$. Substituting these values into the cosine rule we can calculate the length of $c$:

\n

\\[ \\begin{split} c^2 &\\,= \\var{sidea}^2+\\var{sideb}^2-2 \\times \\var{sidea}\\times\\var{sideb} \\times \\cos(\\var{anglecr}) \\\\ &\\,=\\var{sidecr^2} \\\\ \\implies c &\\,=\\var{sidecr} \\text{ (2 d.p.)}. \\end{split} \\]

", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n ['C',C]\n]", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "vector(7.2,0)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "vector(random(8..11 #0.1 except B[0]),random(3..7 #0.1))", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "vector(0,0)", "description": "", "templateType": "anything", "can_override": false}, "sidea": {"name": "sidea", "group": "Ungrouped variables", "definition": "7.2", "description": "", "templateType": "anything", "can_override": false}, "sideb": {"name": "sideb", "group": "Ungrouped variables", "definition": "precround(len(C-B),2)", "description": "", "templateType": "anything", "can_override": false}, "anglec": {"name": "anglec", "group": "Ungrouped variables", "definition": "180-arccos(dot(B,vec)/(sidea*len(vec)))*(180/pi)", "description": "", "templateType": "anything", "can_override": false}, "vec": {"name": "vec", "group": "Ungrouped variables", "definition": "C-B", "description": "", "templateType": "anything", "can_override": false}, "anglecr": {"name": "anglecr", "group": "Ungrouped variables", "definition": "precround(anglec,2)", "description": "", "templateType": "anything", "can_override": false}, "sidec": {"name": "sidec", "group": "Ungrouped variables", "definition": "sqrt(sidea^2+sideb^2-2*sidea*sideb*cos(anglecr*pi/180))", "description": "", "templateType": "anything", "can_override": false}, "sidecr": {"name": "sidecr", "group": "Ungrouped variables", "definition": "precround(sidec,2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["defs", "A", "B", "C", "sidea", "sideb", "anglec", "vec", "anglecr", "sidec", "sidecr"], "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": "

$c=$[[0]] 

\n

(Give your answer to 2 decimal places when 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": "{sidecr}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.05", "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": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}