// Numbas version: exam_results_page_options {"name": "Trigonometry equations: Solve asinx + bcosx = c", "extensions": ["stats", "jsxgraph", "permutations", "geogebra", "random_person", "codewords", "polynomials", "chemistry", "quantities"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "parts": [{"useCustomName": false, "prompt": "

Write $\\simplify{ {a} sin theta + {b}cos theta}$ in the form $\\ r \\sin(\\theta+ \\alpha)$

\n

\n

Write $r$ and $\\alpha$ correct to 3 d.p.

", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "scripts": {}, "answer": "{precround(r,3)}sin(theta+{precround(alpha,3)})", "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "checkingAccuracy": "0.002", "unitTests": [], "customName": "", "valuegenerators": [{"value": "", "name": "theta"}], "marks": "2", "customMarkingAlgorithm": "", "notallowed": {"strings": ["cos"], "message": "", "showStrings": false, "partialCredit": 0}, "vsetRangePoints": 5, "showFeedbackIcon": true, "musthave": {"strings": ["sin", "(", ")", "theta"], "message": "", "showStrings": false, "partialCredit": 0}, "vsetRange": [0, 1], "checkVariableNames": false, "failureRate": 1, "type": "jme", "showPreview": true}, {"useCustomName": false, "prompt": "

Hence solve $\\simplify{{a}sin theta +{b}cos theta={c}}$. 

\n

First find the smallest value of $\\theta$ such that $\\ 0\\leq\\theta<2\\pi$.

\n

[[0]]

\n

Now find the largest value of $\\theta$ such that $\\ 0\\leq\\theta<2\\pi$.

\n

[[1]]

", "extendBaseMarkingAlgorithm": true, "gaps": [{"strictPrecision": false, "useCustomName": false, "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "precision": "3", "customName": "", "showPrecisionHint": true, "precisionPartialCredit": 0, "marks": "2", "customMarkingAlgorithm": "", "minValue": "min(theta1,theta2)", "variableReplacements": [], "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "showFeedbackIcon": true, "mustBeReduced": false, "correctAnswerFraction": false, "maxValue": "min(theta1,theta2)"}, {"strictPrecision": false, "useCustomName": false, "precisionType": "dp", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "precision": "3", "customName": "", "showPrecisionHint": true, "precisionPartialCredit": 0, "marks": "2", "customMarkingAlgorithm": "", "minValue": "max(theta1,theta2)", "variableReplacements": [], "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "showFeedbackIcon": true, "mustBeReduced": false, "correctAnswerFraction": false, "maxValue": "max(theta1,theta2)"}], "sortAnswers": false, "unitTests": [], "scripts": {}, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "type": "gapfill", "customName": "", "marks": 0, "customMarkingAlgorithm": ""}], "ungrouped_variables": ["a", "b", "c", "rold", "alphaold", "theta1", "theta2", "asign", "bsign", "alphatemp", "alpha", "r", "alphaexplain", "thetatemp1", "thetatemp2"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "name": "Trigonometry equations: Solve asinx + bcosx = c", "rulesets": {}, "statement": "", "variable_groups": [], "advice": "

(a)

\n

Compare $\\simplify{ {a}sin theta + {b}cos theta}$ with the identity $\\ r \\sin(\\theta+ \\alpha) \\equiv r \\sin \\theta \\cos \\alpha + r \\cos \\theta \\sin \\alpha$

\n

Hence $ \\var{a} = r \\cos \\alpha $

\n

and $ \\var{b} = r \\sin \\alpha $

\n

So $ r^2 = \\var{abs(a)}^2 + \\var{abs(b)}^2$

\n

$r = \\sqrt{\\var{abs(a)}^2 + \\var{abs(b)}^2} = \\var{precround(abs(r),3)}$

\n

Calculate $ \\tan^{-1} ({\\var{abs(b)}/\\var{abs(a)}}) = \\var{precround({alphatemp},3)} $

\n

So our possible values of $\\alpha$ are:

\n

$\\var{precround(alphatemp,3)}$       ,       $\\pi-\\var{precround(alphatemp,3)}=\\var{precround(pi-alphatemp,3)}$       ,       $\\pi+\\var{precround(alphatemp,3)}=\\var{precround(pi+alphatemp,3)}$       ,       $2\\pi-\\var{precround(alphatemp,3)}=\\var{precround(2pi-alphatemp,3)}$

\n

\n

Since $ r\\cos\\alpha =\\var{a} \\var{asign} 0$ and $ r \\sin \\alpha =  \\var{b} \\var{bsign} 0$ we choose $\\alpha = \\var{precround(switch(a<0 and b<0,pi+{alphatemp},b<0,2pi-{alphatemp},a<0,pi-{alphatemp},{alphatemp}),3)}$ to be in the correct quadrant.

\n

Hence $\\simplify{ {a} sin theta + {b} cos theta} \\equiv \\var{precround(r,3)} \\sin (\\simplify{theta +{precround(alpha,3)}})$

\n

\n

(b)

\n

We now have $\\var{precround(r,3)} \\sin (\\simplify{theta +{precround(alpha,3)}}) = \\var{c} $

\n

So  $ \\sin (\\simplify{theta +{precround(alpha,3)}}) = \\var{c} / \\var{precround(r,3)} = \\var{precround(c/r,3)} $

\n

We obtain 2 solutions:  $\\simplify{theta  +{precround(alpha,3)}}=  \\sin^{-1}(\\var{precround(c/r,3)}) = \\var{precround(arcsin(c/r),3)}$    or    $\\simplify{theta +{precround(alpha,3)}}=  \\pi - \\var{precround(arcsin(c/r),3)} = \\var{precround(pi - arcsin(c/r),3)}$

\n

Hence $\\ \\theta =  \\var{precround(arcsin(c/r),3)} - \\var{precround(alpha,3)} = \\var{precround(thetatemp1,3)} $     or     $\\ \\theta =  \\var{precround(pi - arcsin(c/r),3)} - \\var{precround(alpha,3)} = \\var{precround(thetatemp2,3)} $

\n

\n

Remember we require solutions such that $\\ 0\\leq\\theta<2\\pi$. Since sin is periodic with period $2 \\pi$ we can add or subtract $2 \\pi$ to our answers if necessary to obtain final answers of

\n

$\\ \\theta = \\var{precround(theta1,3)}$   or   $\\var{precround(theta2,3)}$

", "functions": {}, "variables": {"alphaold": {"group": "Ungrouped variables", "name": "alphaold", "definition": "arctan(b/a)", "templateType": "anything", "description": ""}, "theta2": {"group": "Ungrouped variables", "name": "theta2", "definition": "mod(thetatemp2,2pi)", "templateType": "anything", "description": ""}, "alphaexplain": {"group": "Ungrouped variables", "name": "alphaexplain", "definition": "switch(a<0 and b<0,-pi+alphatemp,b<0,-alphatemp,a<0,pi-alphatemp,alphatemp)", "templateType": "anything", "description": ""}, "rold": {"group": "Ungrouped variables", "name": "rold", "definition": "{a}/cos({alpha})", "templateType": "anything", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(-9..9 except 0)", "templateType": "anything", "description": ""}, "thetatemp1": {"group": "Ungrouped variables", "name": "thetatemp1", "definition": "arcsin({c}/{r})-{alpha}", "templateType": "anything", "description": ""}, "r": {"group": "Ungrouped variables", "name": "r", "definition": "sqrt({a}^2+{b}^2)", "templateType": "anything", "description": ""}, "asign": {"group": "Ungrouped variables", "name": "asign", "definition": "if(a>0,\" > \",\" < \")", "templateType": "anything", "description": ""}, "bsign": {"group": "Ungrouped variables", "name": "bsign", "definition": "if(b>0,\" > \",\" < \")", "templateType": "anything", "description": ""}, "theta1": {"group": "Ungrouped variables", "name": "theta1", "definition": "mod(thetatemp1,2pi)", "templateType": "anything", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "definition": "random(-9..9 except 0 except a)", "templateType": "anything", "description": ""}, "alpha": {"group": "Ungrouped variables", "name": "alpha", "definition": "switch(a<0 and b<0,pi+alphatemp,b<0,2pi-alphatemp,a<0,pi-alphatemp,alphatemp)", "templateType": "anything", "description": ""}, "thetatemp2": {"group": "Ungrouped variables", "name": "thetatemp2", "definition": "pi-arcsin({c}/{r})-{alpha}", "templateType": "anything", "description": ""}, "alphatemp": {"group": "Ungrouped variables", "name": "alphatemp", "definition": "arctan(abs({b}/{a}))", "templateType": "anything", "description": ""}, "c": {"group": "Ungrouped variables", "name": "c", "definition": "random(-9..9 except 0)", "templateType": "anything", "description": ""}}, "tags": [], "variablesTest": {"condition": "c^2