// Numbas version: finer_feedback_settings {"name": "Katy's copy of 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": "

A question testing the application of the Cosine Rule when given three side lengths. In this question, the triangle is always acute. A secondary application is finding the area of a triangle.

"}, "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 as indicated in the picture below (not necessarily an accurate picture of $\\Delta ABC$).

\n

Given the following three side lengths, determine the three angles using the Cosine Rule. Write down the angles (in radians) as decimals to 4dp. [Before submitting answers, you can check that the sum of the three angles is $\\pi$.] 

\n

\n

Also calculate the area of the triangle, giving your answer as a decimal to 3dp.

\n

\n

\n

", "advice": "

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

\n

\\[\\cos A =\\dfrac{\\var{b0}^2+\\var{c0}^2-\\var{a0}^2}{2 \\times \\var{b0} \\times \\var{c0}}=\\dfrac{\\var{b0^2+c0^2-a0^2}}{\\var{2 *b0*c0}}\\]

\n

\\[=\\var{(b0^2+c0^2-a0^2)/(2 *b0*c0)}\\]

\n

and so $A=\\cos^{-1}(\\var{(b0^2+c0^2-a0^2)/(2 *b0*c0)})=\\var{aa0}$.

\n

\n

Similarly $\\cos B =\\dfrac{a^2+c^2-b^2}{2ac}$ and $\\cos C =\\dfrac{a^2+b^2-c^2}{2ab}$. So

\n

\\[\\cos B =\\dfrac{\\var{a0}^2+\\var{c0}^2-\\var{b0}^2}{2 \\times \\var{a0} \\times \\var{c0}}=\\var{(a0^2+c0^2-b0^2)/(2 *a0*c0)}\\]

\n

and so $B=\\cos^{-1}(\\var{(a0^2+c0^2-b0^2)/(2 *a0*c0)})=\\var{bb0}$.

\n

\\[\\cos C =\\dfrac{\\var{a0}^2+\\var{b0}^2-\\var{c0}^2}{2 \\times \\var{a0} \\times \\var{b0}}=\\var{(a0^2+b0^2-c0^2)/(2 *a0*b0)}\\]

\n

and so $C=\\cos^{-1}(\\var{(a0^2+b0^2-c0^2)/(2 *a0*b0)})=\\var{cc0}$.

\n

(b) We can use any of the formulae  $\\dfrac{1}{2}ac \\sin B$, $\\dfrac{1}{2}bc \\sin A$ or $\\dfrac{1}{2}ab \\sin C$ for the area. For example 

\n

\\[\\dfrac{1}{2}bc \\sin A = \\dfrac{1}{2} \\times \\var{b0} \\times \\var{c0} \\times \\sin \\var{aa0}\\]

\n

\\[=\\dfrac{1}{2} \\times \\var{b0 * c0} \\times \\var{sin(aa0)}=\\var{Area}\\]

", "functions": {}, "variables": {"s5": {"templateType": "anything", "name": "s5", "definition": "sin(AA5)", "group": "Ungrouped variables", "description": ""}, "p0": {"templateType": "anything", "name": "p0", "definition": "(c0^2+b0^2-a0^2)/(2*c0*b0)", "group": "Ungrouped variables", "description": ""}, "area": {"templateType": "anything", "name": "area", "definition": "precround(b0*c0*s0/2,3)", "group": "Ungrouped variables", "description": ""}, "r0": {"templateType": "anything", "name": "r0", "definition": "(a0^2+b0^2-c0^2)/(2*a0*b0)", "group": "Ungrouped variables", "description": ""}, "t2": {"templateType": "anything", "name": "t2", "definition": "sin(bb2)", "group": "Ungrouped variables", "description": ""}, "x5": {"templateType": "anything", "name": "x5", "definition": "a3^2+b3^2", "group": "Ungrouped variables", "description": ""}, "aa3": {"templateType": "anything", "name": "aa3", "definition": "precround(arccos(p3),4)", "group": "Ungrouped variables", "description": ""}, "t5": {"templateType": "anything", "name": "t5", "definition": "sin(BB5)", "group": "Ungrouped variables", "description": ""}, "aa2": {"templateType": "anything", "name": "aa2", "definition": "precround(aa1,3)", "group": "Ungrouped variables", "description": ""}, "c2": {"templateType": "anything", "name": "c2", "definition": "floor(sqrt(x2))", "group": "Ungrouped variables", "description": ""}, "bb1": {"templateType": "anything", "name": "bb1", "definition": "pi-aa0-cc0", "group": "Ungrouped variables", "description": ""}, "x4": {"templateType": "anything", "name": "x4", "definition": "abs(a3^2-b3^2)", "group": "Ungrouped variables", "description": ""}, "aa0": {"templateType": "anything", "name": "aa0", "definition": "precround(arccos(p0),4)", "group": "Ungrouped variables", "description": ""}, "q0": {"templateType": "anything", "name": "q0", "definition": "(a0^2+c0^2-b0^2)/(2*a0*c0)", "group": "Ungrouped variables", "description": ""}, "s2": {"templateType": "anything", "name": "s2", "definition": "sin(aa2)", "group": "Ungrouped variables", "description": ""}, "bb3": {"templateType": "anything", "name": "bb3", "definition": "precround(arccos(q3),4)", "group": "Ungrouped variables", "description": ""}, "x2": {"templateType": "anything", "name": "x2", "definition": "a0^2+b0^2", "group": "Ungrouped variables", "description": ""}, "aa4": {"templateType": "anything", "name": "aa4", "definition": "pi-BB3-CC3", "group": "Ungrouped variables", "description": ""}, "cc0": {"templateType": "anything", "name": "cc0", "definition": "precround(arccos(r0),4)", "group": "Ungrouped variables", "description": ""}, "cc5": {"templateType": "anything", "name": "cc5", "definition": "precround(CC4,3)", "group": "Ungrouped variables", "description": ""}, "bb5": {"templateType": "anything", "name": "bb5", "definition": "precround(BB4,3)", "group": "Ungrouped variables", "description": ""}, "cc1": {"templateType": "anything", "name": "cc1", "definition": "pi-aa0-bb0", "group": "Ungrouped variables", "description": ""}, "u3": {"templateType": "anything", "name": "u3", "definition": "sin(CC3)", "group": "Ungrouped variables", "description": ""}, "u2": {"templateType": "anything", "name": "u2", "definition": "sin(cc2)", "group": "Ungrouped variables", "description": ""}, "c01": {"templateType": "anything", "name": "c01", "definition": "ceil(sqrt(x1))", "group": "Ungrouped variables", "description": ""}, "t0": {"templateType": "anything", "name": "t0", "definition": "sin(bb0)", "group": "Ungrouped variables", "description": ""}, "c02": {"templateType": "anything", "name": "c02", "definition": "ceil(min(a0,b0)*0.05)", "group": "Ungrouped variables", "description": ""}, "bb4": {"templateType": "anything", "name": "bb4", "definition": "pi-AA3-CC3", "group": "Ungrouped variables", "description": ""}, "c3": {"templateType": "anything", "name": "c3", "definition": "random(c4..c5 except 0)", "group": "Ungrouped variables", "description": ""}, "bb2": {"templateType": "anything", "name": "bb2", "definition": "precround(bb1,3)", "group": "Ungrouped variables", "description": ""}, "r3": {"templateType": "anything", "name": "r3", "definition": "(a3^2+b3^2-c3^2)/(2*a3*b3)", "group": "Ungrouped variables", "description": ""}, "t3": {"templateType": "anything", "name": "t3", "definition": "sin(BB3)", "group": "Ungrouped variables", "description": ""}, "c5": {"templateType": "anything", "name": "c5", "definition": "floor(sqrt(x5))", "group": "Ungrouped variables", "description": ""}, "u5": {"templateType": "anything", "name": "u5", "definition": "sin(CC5)", "group": "Ungrouped variables", "description": ""}, "s3": {"templateType": "anything", "name": "s3", "definition": "sin(AA3)", "group": "Ungrouped variables", "description": ""}, "u0": {"templateType": "anything", "name": "u0", "definition": "sin(cc0)", "group": "Ungrouped variables", "description": ""}, "c31": {"templateType": "anything", "name": "c31", "definition": "ceil(sqrt(x4))", "group": "Ungrouped variables", "description": ""}, "cc4": {"templateType": "anything", "name": "cc4", "definition": "pi-AA3-BB3", "group": "Ungrouped variables", "description": ""}, "p3": {"templateType": "anything", "name": "p3", "definition": "(c3^2+b3^2-a3^2)/(2*c3*b3)", "group": "Ungrouped variables", "description": ""}, "a0": {"templateType": "anything", "name": "a0", "definition": "random(10..25)", "group": "Ungrouped variables", "description": ""}, "check2": {"templateType": "anything", "name": "check2", "definition": "pi-AA3-BB3-CC3", "group": "Ungrouped variables", "description": ""}, "temp1": {"templateType": "anything", "name": "temp1", "definition": "a0*t0/s0", "group": "Ungrouped variables", "description": ""}, "c0": {"templateType": "anything", "name": "c0", "definition": "random(c1..c2 except 0)", "group": "Ungrouped variables", "description": ""}, "b3": {"templateType": "anything", "name": "b3", "definition": "random(7..20)", "group": "Ungrouped variables", "description": ""}, "x1": {"templateType": "anything", "name": "x1", "definition": "abs(a0^2-b0^2)", "group": "Ungrouped variables", "description": ""}, "temp2": {"templateType": "anything", "name": "temp2", "definition": "b0-temp1", "group": "Ungrouped variables", "description": ""}, "c1": {"templateType": "anything", "name": "c1", "definition": "max(c01,c02)", "group": "Ungrouped variables", "description": ""}, "aa1": {"templateType": "anything", "name": "aa1", "definition": "pi-bb0-cc0", "group": "Ungrouped variables", "description": ""}, "c4": {"templateType": "anything", "name": "c4", "definition": "max(c31,c32)", "group": "Ungrouped variables", "description": ""}, "aa5": {"templateType": "anything", "name": "aa5", "definition": "precround(AA4,3)", "group": "Ungrouped variables", "description": ""}, "c32": {"templateType": "anything", "name": "c32", "definition": "ceil(min(a3,b3)*0.05)", "group": "Ungrouped variables", "description": ""}, "s0": {"templateType": "anything", "name": "s0", "definition": "sin(aa0)", "group": "Ungrouped variables", "description": ""}, "b0": {"templateType": "anything", "name": "b0", "definition": "random(10..25)", "group": "Ungrouped variables", "description": ""}, "check1": {"templateType": "anything", "name": "check1", "definition": "pi-AA0-BB0-CC0", "group": "Ungrouped variables", "description": ""}, "cc2": {"templateType": "anything", "name": "cc2", "definition": "precround(cc1,3)", "group": "Ungrouped variables", "description": ""}, "q3": {"templateType": "anything", "name": "q3", "definition": "(a3^2+c3^2-b3^2)/(2*a3*c3)", "group": "Ungrouped variables", "description": ""}, "cc3": {"templateType": "anything", "name": "cc3", "definition": "precround(arccos(r3),4)", "group": "Ungrouped variables", "description": ""}, "bb0": {"templateType": "anything", "name": "bb0", "definition": "precround(arccos(q0),4)", "group": "Ungrouped variables", "description": ""}, "a3": {"templateType": "anything", "name": "a3", "definition": "random(7..20)", "group": "Ungrouped variables", "description": ""}}, "name": "Katy's copy of cosine rule", "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "ungrouped_variables": ["c4", "s3", "cc0", "temp2", "temp1", "b0", "cc3", "b3", "u2", "q0", "q3", "c0", "area", "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"], "parts": [{"variableReplacements": [], "customMarkingAlgorithm": "", "stepsPenalty": 1, "extendBaseMarkingAlgorithm": true, "unitTests": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "unitTests": [], "minValue": "{aa0}-0.0001", "precisionPartialCredit": 0, "marks": 2, "maxValue": "{aa0}+0.0001", "strictPrecision": true, "correctAnswerFraction": false, "precisionType": "dp", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "precision": 4, "showPrecisionHint": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "type": "numberentry", "scripts": {}, "notationStyles": ["plain", "en", "si-en"]}, {"variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "unitTests": [], "minValue": "{bb0}-0.0001", "precisionPartialCredit": 0, "marks": 2, "maxValue": "{bb0}+0.0001", "strictPrecision": true, "correctAnswerFraction": false, "precisionType": "dp", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "precision": 4, "showPrecisionHint": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "type": "numberentry", "scripts": {}, "notationStyles": ["plain", "en", "si-en"]}, {"variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "unitTests": [], "minValue": "{cc0}-0.0001", "precisionPartialCredit": 0, "marks": 2, "maxValue": "{cc0}+0.0001", "strictPrecision": true, "correctAnswerFraction": false, "precisionType": "dp", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "precision": 4, "showPrecisionHint": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "type": "numberentry", "scripts": {}, "notationStyles": ["plain", "en", "si-en"]}], "showCorrectAnswer": true, "steps": [{"variableReplacements": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "unitTests": [], "prompt": "

Use the Cosine Rule to find $\\cos A$: $\\cos A =\\dfrac{b^2+c^2-a^2}{2bc}$. Then use $\\cos^{-1}$ to find $A$. Apply similar rules to find $B$ and $C$.

", "type": "information", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "sortAnswers": false, "type": "gapfill", "scripts": {}, "prompt": "

$a=\\var{a0}$, $b=\\var{b0}$, $c=\\var{c0}$

\n

Angle $A=$ [[0]]

\n

Angle $B=$ [[1]]

\n

Angle $C=$ [[2]]

"}, {"variableReplacements": [], "customMarkingAlgorithm": "", "stepsPenalty": 1, "extendBaseMarkingAlgorithm": true, "unitTests": [], "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "unitTests": [], "minValue": "{Area}-0.001", "precisionPartialCredit": 0, "marks": 2, "maxValue": "{Area}+0.001", "strictPrecision": true, "correctAnswerFraction": false, "precisionType": "dp", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "precision": 3, "showPrecisionHint": false, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "type": "numberentry", "scripts": {}, "notationStyles": ["plain", "en", "si-en"]}], "showCorrectAnswer": true, "steps": [{"variableReplacements": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "unitTests": [], "prompt": "

The area uses any of the formulae $\\dfrac{1}{2}ac \\sin B$, $\\dfrac{1}{2}bc \\sin A$ or $\\dfrac{1}{2}ab \\sin C$.

", "type": "information", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "sortAnswers": false, "type": "gapfill", "scripts": {}, "prompt": "

The area is [[0]]

"}], "preamble": {"js": "", "css": ""}, "extensions": [], "type": "question", "contributors": [{"name": "Robert Pullan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/766/"}, {"name": "Katy Dobson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/"}]}]}], "contributors": [{"name": "Robert Pullan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/766/"}, {"name": "Katy Dobson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/"}]}