// Numbas version: finer_feedback_settings {"name": "Apply the cosine rule (2 sides, 1 angle, degrees)", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Triangle_700.gif", "/srv/numbas/media/question-resources/Triangle_700.gif"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Apply the cosine rule (2 sides, 1 angle, degrees)", "tags": [], "metadata": {"description": "

Two questions testing the application of the Cosine Rule when given two sides and an angle. In these questions, the triangle is always acute and both of the given side lengths are adjacent to the given angle.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Suppose that $\\Delta ABC$ is a triangle with all interior angles less than $90^\\circ $. Sides and angles are labelled as shown in the diagram below (not to scale).

\n

Given the following two sides and an angle, determine the third side length. Write down the side length as a whole number.

\n

\n

", "advice": "

a) Use the Cosine Rule to find $a$: $a^2=b^2+c^2-2bc \\cos A$.   

\n

\\[a^2=\\var{b0}^2+\\var{c0}^2-2 \\times \\var{b0}\\times\\var{c0} \\times \\cos (\\var{aa0})=\\var{b0^2}+\\var{c0^2}-\\var{2*b0*c0} \\times \\var{cos (aa0*pi/180)}\\]

\n

\\[=\\var{b0^2+c0^2-2*b0*c0* cos (aa0*pi/180)}.\\]

\n

Hence $a=\\sqrt{\\var{b0^2+c0^2-2*b0*c0* cos (aa0*pi/180)}}=\\var{sqrt(b0^2+c0^2-2*b0*c0* cos (aa0*pi/180))}$. To the nearest integer, this is $\\var{a0}$.

\n

b) Use the Cosine Rule to find $b$: $b^2=a^2+c^2-2ac \\cos B$.   

\n

\\[b^2=\\var{a3}^2+\\var{c3}^2-2 \\times \\var{a3}\\times\\var{c3} \\times \\cos (\\var{bb3})=\\var{a3^2}+\\var{c3^2}-\\var{2*a3*c3} \\times \\var{cos (bb3*pi/180)}\\]

\n

\\[=\\var{a3^2+c3^2-2*a3*c3* cos (bb3*pi/180)}.\\]

\n

Hence $b=\\sqrt{\\var{a3^2+c3^2-2*a3*c3* cos (bb3*pi/180)}}=\\var{sqrt(a3^2+c3^2-2*a3*c3* cos (bb3*pi/180))}$. To the nearest integer, this is $\\var{b3}$.

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "extensions": [], "variables": {"cc4": {"name": "cc4", "group": "Ungrouped variables", "definition": "pi-AA3-BB3", "description": "", "templateType": "anything"}, "cc1": {"name": "cc1", "group": "Ungrouped variables", "definition": "pi-aa0-bb0", "description": "", "templateType": "anything"}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(7..20)", "description": "", "templateType": "anything"}, "s5": {"name": "s5", "group": "Ungrouped variables", "definition": "sin(AA5)", "description": "", "templateType": "anything"}, "c31": {"name": "c31", "group": "Ungrouped variables", "definition": "ceil(sqrt(x4))", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "floor(sqrt(x2))", "description": "", "templateType": "anything"}, "check2": {"name": "check2", "group": "Ungrouped variables", "definition": "pi-AA3-BB3-CC3", "description": "", "templateType": "anything"}, "t3": {"name": "t3", "group": "Ungrouped variables", "definition": "sin(BB3)", "description": "", "templateType": "anything"}, "aa2": {"name": "aa2", "group": "Ungrouped variables", "definition": "precround(aa1,3)", "description": "", "templateType": "anything"}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "random(c4..c5 except 0)", "description": "", "templateType": "anything"}, "q3": {"name": "q3", "group": "Ungrouped variables", "definition": "(a3^2+c3^2-b3^2)/(2*a3*c3)", "description": "", "templateType": "anything"}, "x4": {"name": "x4", "group": "Ungrouped variables", "definition": "abs(a3^2-b3^2)", "description": "", "templateType": "anything"}, "aa0": {"name": "aa0", "group": "Ungrouped variables", "definition": "precround(arccos(p0)*180/pi,0)", "description": "", "templateType": "anything"}, "bb1": {"name": "bb1", "group": "Ungrouped variables", "definition": "pi-aa0-cc0", "description": "", "templateType": "anything"}, "aa1": {"name": "aa1", "group": "Ungrouped variables", "definition": "pi-bb0-cc0", "description": "", "templateType": "anything"}, "x5": {"name": "x5", "group": "Ungrouped variables", "definition": "a3^2+b3^2", "description": "", "templateType": "anything"}, "aa4": {"name": "aa4", "group": "Ungrouped variables", "definition": "pi-BB3-CC3", "description": "", "templateType": "anything"}, "cc0": {"name": "cc0", "group": "Ungrouped variables", "definition": "precround(arccos(r0),4)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "max(c01,c02)", "description": "", "templateType": "anything"}, "bb5": {"name": "bb5", "group": "Ungrouped variables", "definition": "precround(BB4,3)", "description": "", "templateType": "anything"}, "bb2": {"name": "bb2", "group": "Ungrouped variables", "definition": "precround(bb1,3)", "description": "", "templateType": "anything"}, "p0": {"name": "p0", "group": "Ungrouped variables", "definition": "(c0^2+b0^2-a0^2)/(2*c0*b0)", "description": "", "templateType": "anything"}, "bb4": {"name": "bb4", "group": "Ungrouped variables", "definition": "pi-AA3-CC3", "description": "", "templateType": "anything"}, "check1": {"name": "check1", "group": "Ungrouped variables", "definition": "pi-AA0-BB0-CC0", "description": "", "templateType": "anything"}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "(a0^2+b0^2-c0^2)/(2*a0*b0)", "description": "", "templateType": "anything"}, "aa3": {"name": "aa3", "group": "Ungrouped variables", "definition": "precround(arccos(p3),4)", "description": "", "templateType": "anything"}, "temp1": {"name": "temp1", "group": "Ungrouped variables", "definition": "a0*t0/s0", "description": "", "templateType": "anything"}, "c01": {"name": "c01", "group": "Ungrouped variables", "definition": "ceil(sqrt(x1))", "description": "", "templateType": "anything"}, "u2": {"name": "u2", "group": "Ungrouped variables", "definition": "sin(cc2)", "description": "", "templateType": "anything"}, "cc3": {"name": "cc3", "group": "Ungrouped variables", "definition": "precround(arccos(r3),4)", "description": "", "templateType": "anything"}, "c4": {"name": "c4", "group": "Ungrouped variables", "definition": "max(c31,c32)", "description": "", "templateType": "anything"}, "bb3": {"name": "bb3", "group": "Ungrouped variables", "definition": "precround(arccos(q3)*180/pi,0)", "description": "", "templateType": "anything"}, "p3": {"name": "p3", "group": "Ungrouped variables", "definition": "(c3^2+b3^2-a3^2)/(2*c3*b3)", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "sin(aa2)", "description": "", "templateType": "anything"}, "u5": {"name": "u5", "group": "Ungrouped variables", "definition": "sin(CC5)", "description": "", "templateType": "anything"}, "c02": {"name": "c02", "group": "Ungrouped variables", "definition": "ceil(min(a0,b0)*0.05)", "description": "", "templateType": "anything"}, "q0": {"name": "q0", "group": "Ungrouped variables", "definition": "(a0^2+c0^2-b0^2)/(2*a0*c0)", "description": "", "templateType": "anything"}, "u3": {"name": "u3", "group": "Ungrouped variables", "definition": "sin(CC3)", "description": "", "templateType": "anything"}, "cc5": {"name": "cc5", "group": "Ungrouped variables", "definition": "precround(CC4,3)", "description": "", "templateType": "anything"}, "bb0": {"name": "bb0", "group": "Ungrouped variables", "definition": "precround(arccos(q0),4)", "description": "", "templateType": "anything"}, "c0": {"name": "c0", "group": "Ungrouped variables", "definition": "random(c1..c2 except 0)", "description": "", "templateType": "anything"}, "t5": {"name": "t5", "group": "Ungrouped variables", "definition": "sin(BB5)", "description": "", "templateType": "anything"}, "a0": {"name": "a0", "group": "Ungrouped variables", "definition": "random(10..25)", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "a0^2+b0^2", "description": "", "templateType": "anything"}, "s0": {"name": "s0", "group": "Ungrouped variables", "definition": "sin(aa0)", "description": "", "templateType": "anything"}, "cc2": {"name": "cc2", "group": "Ungrouped variables", "definition": "precround(cc1,3)", "description": "", "templateType": "anything"}, "c5": {"name": "c5", "group": "Ungrouped variables", "definition": "floor(sqrt(x5))", "description": "", "templateType": "anything"}, "b0": {"name": "b0", "group": "Ungrouped variables", "definition": "random(10..25)", "description": "", "templateType": "anything"}, "t2": {"name": "t2", "group": "Ungrouped variables", "definition": "sin(bb2)", "description": "", "templateType": "anything"}, "t0": {"name": "t0", "group": "Ungrouped variables", "definition": "sin(bb0)", "description": "", "templateType": "anything"}, "r3": {"name": "r3", "group": "Ungrouped variables", "definition": "(a3^2+b3^2-c3^2)/(2*a3*b3)", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "abs(a0^2-b0^2)", "description": "", "templateType": "anything"}, "u0": {"name": "u0", "group": "Ungrouped variables", "definition": "sin(cc0)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(7..20)", "description": "", "templateType": "anything"}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "sin(AA3)", "description": "", "templateType": "anything"}, "aa5": {"name": "aa5", "group": "Ungrouped variables", "definition": "precround(AA4,3)", "description": "", "templateType": "anything"}, "c32": {"name": "c32", "group": "Ungrouped variables", "definition": "ceil(min(a3,b3)*0.05)", "description": "", "templateType": "anything"}, "temp2": {"name": "temp2", "group": "Ungrouped variables", "definition": "b0-temp1", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c4", "s3", "cc0", "temp2", "temp1", "b0", "cc3", "b3", "u2", "q0", "q3", "c0", "cc5", "s2", "s0", "cc1", "u0", "u3", "cc2", "aa5", "aa4", "aa1", "aa0", "aa3", "aa2", "x2", "c31", "c32", "a0", "a3", "bb0", "s5", "c3", "c2", "c1", "x1", "c02", "x4", "x5", "p3", "p0", "r0", "r3", "bb3", "t5", "t2", "t3", "t0", "u5", "c5", "cc4", "c01", "bb5", "bb4", "check2", "bb2", "bb1", "check1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$A=\\var{AA0}^\\circ$, $b=\\var{b0}$, $c=\\var{c0}$

\n

Side length $a=$ [[0]]

", "stepsPenalty": 1, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Use the Cosine Rule to find $a$: $a^2=b^2+c^2-2bc \\cos A$.

"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{a0}", "maxValue": "{a0}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$B=\\var{BB3}^\\circ$, $a=\\var{a3}$, $c=\\var{c3}$

\n

Side length $b=$ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{b3}", "maxValue": "{b3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Andrew Chuter", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4565/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Andrew Chuter", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4565/"}]}