// Numbas version: finer_feedback_settings {"name": "cormac's copy of cormac's copy of Apply the cosine rule", "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": "

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.

"}, "functions": {}, "variables": {"q0": {"group": "Ungrouped variables", "name": "q0", "definition": "(a0^2+c0^2-b0^2)/(2*a0*c0)", "templateType": "anything", "description": ""}, "c5": {"group": "Ungrouped variables", "name": "c5", "definition": "floor(sqrt(x5))", "templateType": "anything", "description": ""}, "c31": {"group": "Ungrouped variables", "name": "c31", "definition": "ceil(sqrt(x4))", "templateType": "anything", "description": ""}, "s3": {"group": "Ungrouped variables", "name": "s3", "definition": "sin(AA3)", "templateType": "anything", "description": ""}, "u5": {"group": "Ungrouped variables", "name": "u5", "definition": "sin(CC5)", "templateType": "anything", "description": ""}, "x2": {"group": "Ungrouped variables", "name": "x2", "definition": "a0^2+b0^2", "templateType": "anything", "description": ""}, "c1": {"group": "Ungrouped variables", "name": "c1", "definition": "max(c01,c02)", "templateType": "anything", "description": ""}, "check2": {"group": "Ungrouped variables", "name": "check2", "definition": "pi-AA3-BB3-CC3", "templateType": "anything", "description": ""}, "r0": {"group": "Ungrouped variables", "name": "r0", "definition": "(a0^2+b0^2-c0^2)/(2*a0*b0)", "templateType": "anything", "description": ""}, "b0": {"group": "Ungrouped variables", "name": "b0", "definition": "random(10..25)", "templateType": "anything", "description": ""}, "x1": {"group": "Ungrouped variables", "name": "x1", "definition": "abs(a0^2-b0^2)", "templateType": "anything", "description": ""}, "a0": {"group": "Ungrouped variables", "name": "a0", "definition": "random(10..25)", "templateType": "anything", "description": ""}, "x5": {"group": "Ungrouped variables", "name": "x5", "definition": "a3^2+b3^2", "templateType": "anything", "description": ""}, "aa1": {"group": "Ungrouped variables", "name": "aa1", "definition": "pi-bb0-cc0", "templateType": "anything", "description": ""}, "temp2": {"group": "Ungrouped variables", "name": "temp2", "definition": "b0-temp1", "templateType": "anything", "description": ""}, "aa4": {"group": "Ungrouped variables", "name": "aa4", "definition": "pi-BB3-CC3", "templateType": "anything", "description": ""}, "cc4": {"group": "Ungrouped variables", "name": "cc4", "definition": "pi-AA3-BB3", "templateType": "anything", "description": ""}, "x4": {"group": "Ungrouped variables", "name": "x4", "definition": "abs(a3^2-b3^2)", "templateType": "anything", "description": ""}, "t3": {"group": "Ungrouped variables", "name": "t3", "definition": "sin(BB3)", "templateType": "anything", "description": ""}, "u0": {"group": "Ungrouped variables", "name": "u0", "definition": "sin(cc0)", "templateType": "anything", "description": ""}, "aa0": {"group": "Ungrouped variables", "name": "aa0", "definition": "precround(arccos(p0),4)", "templateType": "anything", "description": ""}, "c01": {"group": "Ungrouped variables", "name": "c01", "definition": "ceil(sqrt(x1))", "templateType": "anything", "description": ""}, "p3": {"group": "Ungrouped variables", "name": "p3", "definition": "(c3^2+b3^2-a3^2)/(2*c3*b3)", "templateType": "anything", "description": ""}, "check1": {"group": "Ungrouped variables", "name": "check1", "definition": "pi-AA0-BB0-CC0", "templateType": "anything", "description": ""}, "p0": {"group": "Ungrouped variables", "name": "p0", "definition": "(c0^2+b0^2-a0^2)/(2*c0*b0)", "templateType": "anything", "description": ""}, "cc2": {"group": "Ungrouped variables", "name": "cc2", "definition": "precround(cc1,3)", "templateType": "anything", "description": ""}, "aa2": {"group": "Ungrouped variables", "name": "aa2", "definition": "precround(aa1,3)", "templateType": "anything", "description": ""}, "bb1": {"group": "Ungrouped variables", "name": "bb1", "definition": "pi-aa0-cc0", "templateType": "anything", "description": ""}, "bb0": {"group": "Ungrouped variables", "name": "bb0", "definition": "precround(arccos(q0),4)", "templateType": "anything", "description": ""}, "c32": {"group": "Ungrouped variables", "name": "c32", "definition": "ceil(min(a3,b3)*0.05)", "templateType": "anything", "description": ""}, "temp1": {"group": "Ungrouped variables", "name": "temp1", "definition": "a0*t0/s0", "templateType": "anything", "description": ""}, "bb5": {"group": "Ungrouped variables", "name": "bb5", "definition": "precround(BB4,3)", "templateType": "anything", "description": ""}, "s2": {"group": "Ungrouped variables", "name": "s2", "definition": "sin(aa2)", "templateType": "anything", "description": ""}, "t5": {"group": "Ungrouped variables", "name": "t5", "definition": "sin(BB5)", "templateType": "anything", "description": ""}, "cc3": {"group": "Ungrouped variables", "name": "cc3", "definition": "precround(arccos(r3),4)", "templateType": "anything", "description": ""}, "c0": {"group": "Ungrouped variables", "name": "c0", "definition": "random(c1..c2 except 0)", "templateType": "anything", "description": ""}, "cc5": {"group": "Ungrouped variables", "name": "cc5", "definition": "precround(CC4,3)", "templateType": "anything", "description": ""}, "c4": {"group": "Ungrouped variables", "name": "c4", "definition": "max(c31,c32)", "templateType": "anything", "description": ""}, "t2": {"group": "Ungrouped variables", "name": "t2", "definition": "sin(bb2)", "templateType": "anything", "description": ""}, "r3": {"group": "Ungrouped variables", "name": "r3", "definition": "(a3^2+b3^2-c3^2)/(2*a3*b3)", "templateType": "anything", "description": ""}, "cc0": {"group": "Ungrouped variables", "name": "cc0", "definition": "precround(arccos(r0),4)", "templateType": "anything", "description": ""}, "c2": {"group": "Ungrouped variables", "name": "c2", "definition": "floor(sqrt(x2))", "templateType": "anything", "description": ""}, "aa5": {"group": "Ungrouped variables", "name": "aa5", "definition": "precround(AA4,3)", "templateType": "anything", "description": ""}, "aa3": {"group": "Ungrouped variables", "name": "aa3", "definition": "precround(arccos(p3),4)", "templateType": "anything", "description": ""}, "cc1": {"group": "Ungrouped variables", "name": "cc1", "definition": "pi-aa0-bb0", "templateType": "anything", "description": ""}, "u2": {"group": "Ungrouped variables", "name": "u2", "definition": "sin(cc2)", "templateType": "anything", "description": ""}, "u3": {"group": "Ungrouped variables", "name": "u3", "definition": "sin(CC3)", "templateType": "anything", "description": ""}, "c02": {"group": "Ungrouped variables", "name": "c02", "definition": "ceil(min(a0,b0)*0.05)", "templateType": "anything", "description": ""}, "q3": {"group": "Ungrouped variables", "name": "q3", "definition": "(a3^2+c3^2-b3^2)/(2*a3*c3)", "templateType": "anything", "description": ""}, "c3": {"group": "Ungrouped variables", "name": "c3", "definition": "random(c4..c5 except 0)", "templateType": "anything", "description": ""}, "bb3": {"group": "Ungrouped variables", "name": "bb3", "definition": "precround(arccos(q3),4)", "templateType": "anything", "description": ""}, "bb2": {"group": "Ungrouped variables", "name": "bb2", "definition": "precround(bb1,3)", "templateType": "anything", "description": ""}, "s0": {"group": "Ungrouped variables", "name": "s0", "definition": "sin(aa0)", "templateType": "anything", "description": ""}, "s5": {"group": "Ungrouped variables", "name": "s5", "definition": "sin(AA5)", "templateType": "anything", "description": ""}, "b3": {"group": "Ungrouped variables", "name": "b3", "definition": "random(7..20)", "templateType": "anything", "description": ""}, "a3": {"group": "Ungrouped variables", "name": "a3", "definition": "random(7..20)", "templateType": "anything", "description": ""}, "t0": {"group": "Ungrouped variables", "name": "t0", "definition": "sin(bb0)", "templateType": "anything", "description": ""}, "bb4": {"group": "Ungrouped variables", "name": "bb4", "definition": "pi-AA3-CC3", "templateType": "anything", "description": ""}}, "name": "cormac's copy of cormac's copy of Apply the cosine rule", "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"], "variablesTest": {"maxRuns": 100, "condition": ""}, "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)}\\]

\n

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

\n

Hence $a=\\sqrt{\\var{b0^2+c0^2-2*b0*c0* cos (aa0)}}=\\var{sqrt(b0^2+c0^2-2*b0*c0* cos (aa0))}$. 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)}\\]

\n

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

\n

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

", "variable_groups": [], "extensions": [], "tags": [], "parts": [{"unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true, "type": "gapfill", "scripts": {}, "extendBaseMarkingAlgorithm": true, "prompt": "

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

\n

Side length $a=$ [[0]]

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

Suppose that $\\Delta ABC$ is a triangle with all interior angles $< \\dfrac{\\pi}{2}$ (in other words, an acute triangle). Here all angles are expressed in radians. Suppose also that standard naming conventions are used (i.e. the sides opposite angles A,B and C are called a,b and crespectively). 

\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

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"js": "", "css": ""}, "type": "question", "contributors": [{"name": "cormac breen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/306/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "cormac breen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/306/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}