// Numbas version: exam_results_page_options {"name": "Robert'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": {}, "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"], "name": "Robert's copy of Apply the cosine rule", "tags": ["Area of a triangle", "checked2015", "cosine rule", "Cosine Rule", "SFY0001", "Solving triangles", "Three side lengths", "Triangle"], "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}\\]

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"stepsPenalty": 1, "prompt": "

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

\n

Angle $A=$ [[0]]

\n

Angle $B=$ [[1]]

\n

Angle $C=$ [[2]]

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "scripts": {}, "precision": 4, "maxValue": "{aa0}+0.0001", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "marks": 2, "minValue": "{aa0}-0.0001", "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "scripts": {}, "precision": 4, "maxValue": "{bb0}+0.0001", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "marks": 2, "minValue": "{bb0}-0.0001", "type": "numberentry", "showPrecisionHint": false}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "scripts": {}, "precision": 4, "maxValue": "{cc0}+0.0001", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "marks": 2, "minValue": "{cc0}-0.0001", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "steps": [{"showCorrectAnswer": true, "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$.

", "marks": 0, "type": "information", "scripts": {}}], "type": "gapfill"}, {"stepsPenalty": 1, "prompt": "

The area is [[0]]

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "scripts": {}, "precision": 3, "maxValue": "{Area}+0.001", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": 0, "marks": 2, "minValue": "{Area}-0.001", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "steps": [{"showCorrectAnswer": true, "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$.

", "marks": 0, "type": "information", "scripts": {}}], "type": "gapfill"}], "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

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

I want acute triangles with side lengths $a,b,c$. I need $|a^2-b^2|<c^2<a^2+b^2$ along with corresponding conditions on $a,b$. In fact the conditions $a^2-b^2<c^2<a^2+b^2$ and $b^2-a^2<c^2<a^2+b^2$ imply also the corresponding conditions on $a,b$. Thus the design of the question involves choosing $a,b$ and then choosing $c$ to meet the required condition. The integer $c$ is chosen randomly between the ceiling of $\\sqrt{|a^2-b^2|}$ and the floor of $\\sqrt{a^2+b^2}$. The first is no greater than the second because $\\max\\{a,b\\}$ lies between them; if $a=b$, then $\\sqrt{a^2+b^2} > 1$. The range of values for $a$ and $b$ may be changed according to taste without invalidating the question, but questions arise about accuracy. My calculations suggest that values of $a,b,c$ between 5 and 100 are safe, but I have been more conservative than that.

\n \t\t \t\t

The second part tests the ability to apply the same principles as the first part but with a different orientation to the triangle: the first part seeks $b,C,c$ whereas the second seeks $b,A,a$.

\n \t\t \n \t\t", "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.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Robert Pullan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/766/"}]}]}], "contributors": [{"name": "Robert Pullan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/766/"}]}