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

"}, "name": "cormac's copy of Apply the cosine rule", "extensions": [], "variable_groups": [], "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}\\]

", "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "parts": [{"showCorrectAnswer": true, "prompt": "

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

\n

Angle $A=$ [[0]]

\n

Angle $B=$ [[1]]

\n

Angle $C=$ [[2]]

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

The area is [[0]]

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

", "scripts": {}, "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "type": "information", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "stepsPenalty": 1, "variableReplacementStrategy": "originalfirst", "unitTests": [], "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true}], "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 c respectively).

\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

", "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/"}]}