// Numbas version: exam_results_page_options {"name": "5. Trigonometric Identities", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "preamble": {"css": "", "js": ""}, "name": "5. Trigonometric Identities", "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

Evaluate the following integral using polar coordinates.

\n

\$\\iint_D \\var{k} \\frac{x-y}{x+y} \\, \\mathrm{d}x \\, \\mathrm{d}y \\, ; \$

\n

D is the region enclosed by the $x$-axis,
the line inclined at an angle of $\\frac{\\pi}{\\var{1/t}}$ anticlockwise from the $x$-axis,
and the ring $\\var{r1}^2 \\leq x^2 + y^2 \\leq \\var{r2}^2$.

\n

{domain()}

We evaluate the integral by transforming it into polar coordinates,

\n

\\begin{align}
I = \\iint_D  \\var{k} \\frac{x - y}{x + y} \\, \\mathrm{d}x \\, \\mathrm{d}y
&= \\var{k} \\int_0^{\\simplify[fractionNumbers]{{t}}\\pi} \\int_{\\var{r1}}^{\\var{r2}} \\frac{\\cos \\theta - \\sin \\theta}{\\cos \\theta + \\sin \\theta} r \\, \\mathrm{d}r \\, \\mathrm{d}\\theta \\\\
&= \\simplify[fractionNumbers]{{k/2}}(\\var{r2}^2 - \\var{r1}^2) \\int_0^{\\simplify[fractionNumbers]{{t}}\\pi} \\frac{\\cos\\theta - \\sin\\theta}{\\cos\\theta + \\sin\\theta} \\, \\mathrm{d}\\theta\\,.
\\end{align}

\n

Multiply by $\\displaystyle\\frac{\\cos\\theta + \\sin\\theta}{\\cos\\theta + \\sin\\theta}$ to obtain

\n

\\begin{align}
I = \\simplify[fractionNumbers]{{k1}} \\int_0^{\\simplify[fractionNumbers]{{t}}\\pi} \\frac{\\cos^2\\theta - \\sin^2\\theta}{2\\cos\\theta\\sin\\theta + 1} \\, \\mathrm{d}\\theta
= \\simplify[fractionNumbers]{{k1}} \\int_0^{\\simplify[fractionNumbers]{{t}}\\pi} \\frac{\\cos2\\theta}{\\sin2\\theta + 1} \\, \\mathrm{d}\\theta\\,.
\\end{align}

\n

Now, because $\\displaystyle\\frac{1}{2}\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\sin2\\theta + 1) = \\cos2\\theta$, we can integrate again to get

\n

\\begin{align}
I = \\simplify[fractionNumbers]{{k1/2}} \\ln(\\sin2\\theta + 1) \\, \\bigg|_0^{\\simplify[fractionNumbers]{{t}}\\pi}
= \\simplify[fractionNumbers]{{k1/2}} \\ln(\\simplify{sqrt({s})/2+1})\\,.
\\end{align}

", "parts": [{"variableReplacements": [], "answer": "{2*k1/gcd1}/{4/gcd1} ln(sqrt({s/gcd2})/sqrt({4/gcd2})+1)", "checkingtype": "absdiff", "expectedvariablenames": [], "showFeedbackIcon": true, "scripts": {}, "type": "jme", "showCorrectAnswer": true, "showpreview": true, "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "vsetrangepoints": 5, "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst"}], "variable_groups": [], "ungrouped_variables": ["k", "r1", "r2", "t", "s", "k1", "gcd1", "gcd2"], "variables": {"s": {"definition": "precround(4*sin(2*t*pi)^2,0)", "name": "s", "description": "

same as   (2*sin t)^2

", "group": "Ungrouped variables", "templateType": "anything"}, "r2": {"definition": "random(r1+1..9)", "name": "r2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "t": {"definition": "random(1/6,1/4,1/3,1/2)", "name": "t", "description": "

random(1/6,1/4,1/3,1/2)

", "group": "Ungrouped variables", "templateType": "anything"}, "r1": {"definition": "random(1..8#1)", "name": "r1", "description": "", "group": "Ungrouped variables", "templateType": "randrange"}, "k": {"definition": "random(-9..9 except -1 except 0 except 1)", "name": "k", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "gcd1": {"definition": "gcd(2*k1,4)", "name": "gcd1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "k1": {"definition": "k/2*(r2^2 - r1^2)", "name": "k1", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "gcd2": {"definition": "gcd(s,4)", "name": "gcd2", "description": "", "group": "Ungrouped variables", "templateType": "anything"}}, "metadata": {"licence": "None specified", "description": "

I created this question, and every other question in Multiple Integration, for my dissertation `Computer-Aided Assessment of Multiple Integration'.

"}, "extensions": ["jsxgraph"], "tags": [], "functions": {"domain": {"language": "javascript", "definition": "var r1 = Numbas.jme.unwrapValue(scope.variables.r1); // define random parameter r1\nvar r2 = Numbas.jme.unwrapValue(scope.variables.r2); // define random parameter r2\nvar t = Numbas.jme.unwrapValue(scope.variables.t ); // define random parameter r2\npi = Math.PI\ncos1 = r1*Math.cos(t*pi)\ncos2 = r2*Math.cos(t*pi)\n\nvar makeboard = Numbas.extensions.jsxgraph.makeBoard\n('250px','250px',{boundingBox:[-1,r2+2,r2+2,-1], axis:true, grid:false}); // define how the graph is displayed\nvar board = makeboard.board; // generate the graph\n\nvar c1 = board.create('curve',\n [ function(r){ return r1;},\n [0,0], 0, t*pi]);\nvar c2 = board.create('curve',\n [ function(r){ return r2;},\n [0,0], 0, t*pi]);\n\nvar c1_dash = board.create('curve',\n [ function(r){ return r1;},\n [0,0], t*pi, 2*pi], {dash:2});\nvar c2_dash = board.create('curve',\n [ function(r){ return r2;},\n [0,0], t*pi, 2*pi], {dash:2});\n\nvar line = board.create('curve',\n [function(r){return r*Math.cos(t*pi);},\n function(r){return r*Math.sin(t*pi);},\n r1, r2]);\nvar line_dash = board.create('curve',\n [function(r){return r*Math.cos(t*pi);},\n function(r){return r*Math.sin(t*pi);},\n 0, (4/3)*r2], {dash:2});\n\nvar f = [];\nf.push(c2);\nf.push(line);\nf.push(c1);\nvar area = board.create('curve', [[], []], {color: 'blue', opacity: 0.4});\narea.updateDataArray = function () {\n // start and end\n var left = cos1, middle = r1, right = cos2,\n x = [], y = [];\n\n// go backwards around f[0]\n curve = f[0]; \n for (i = 0; i < curve.numberPoints; i++) {\n x.push(curve.points[i].usrCoords[1]);\n y.push(curve.points[i].usrCoords[2]);\n }\n \n// go backwards along f[1]\n curve = f[1]; \n for (i = curve.numberPoints - 1; i >= 0; i--) {\n x.push(curve.points[i].usrCoords[1]);\n y.push(curve.points[i].usrCoords[2]);\n }\n\n// go forwards around f[2]\n curve = f[2]; \n for (i = curve.numberPoints - 1; i >= 0; i--) {\n x.push(curve.points[i].usrCoords[1]);\n y.push(curve.points[i].usrCoords[2]);\n }\n \n// close the curve\n this.dataX = x;\n this.dataY = y;\n}\n\nreturn makeboard; // update the board", "parameters": [], "type": "html"}}, "type": "question", "contributors": [{"name": "Nicholas Barker", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1915/"}]}]}], "contributors": [{"name": "Nicholas Barker", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1915/"}]}