// Numbas version: finer_feedback_settings {"name": "Graphing: circles - completing the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet", "div", "argtop", "argbot", "sqrtargtop", "sqrtargbot", "m", "k", "xcentre", "ycentre", "radius", "switch"], "name": "Graphing: circles - completing the square", "tags": ["circles", "completing the square", "graphing"], "preamble": {"css": "", "js": ""}, "advice": "

Recall 

\n

$(x+a)^2=x^2+2ax+a^2$

\n

is called a perfect square. Now, notice if we let $b=2a$ this equation would become

\n

$\\left(x+\\frac{b}{2}\\right)^2=x^2+bx+\\left(\\frac{b}{2}\\right)^2$.

\n

We complete the squares:

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify[basic,basic,fractionNumbers]{{scoeff}x^2+{lcoeff}x+{scoeff}y^2+{m}y+{k}}$$=$$\\var{c}$
$\\simplify[basic,basic,fractionNumbers]{{scoeff}x^2+{lcoeff}x+{scoeff}y^2+{m}y}$ $=$$\\simplify[basic,fractionNumbers]{{c-k}}$(get all constants on the right hand side)
$\\simplify[basic,fractionNumbers]{x^2+{lcoeff}/{scoeff}x}+\\simplify[basic,fractionNumbers]{y^2+{m}/{scoeff}y}$$=$$\\simplify[basic,fractionNumbers]{{(c-k)/scoeff}}$(divide every term by the coefficient of $x^2$)
$\\simplify[basic,fractionNumbers]{x^2+{lcoeff/scoeff}x+{lcoeff^2/(4*scoeff^2)}}+\\simplify[basic,fractionNumbers]{y^2+{m/scoeff}y+{m^2/(4*scoeff^2)}}$$=$$\\simplify[basic,fractionNumbers]{{(c-k)/scoeff}}+\\simplify{{lcoeff^2}/{4*scoeff^2}}+\\simplify{{m^2}/{4*scoeff^2}}$\n

(for both $x$ and $y$: add to both sides the square of half the coefficient)

\n
$(\\simplify[basic,fractionNumbers]{x+{-xcentre}})^2+(\\simplify[basic,fractionNumbers]{y+{-ycentre}})^2$$=$$\\simplify[basic,fractionNumbers]{{radius^2}}$(rewrite the left hand side as two perfect squares)
$(\\simplify[basic,fractionNumbers]{x+{-xcentre}})^2+(\\simplify[basic,fractionNumbers]{y+{-ycentre}})^2$$=$$\\left(\\simplify[basic,fractionNumbers]{{radius}}\\right)^2$
\n

\n

From this equation we can conclude the equation is of a circle of radius $\\simplify[basic,fractionNumbers]{{radius}}$ with centre $\\left(\\simplify[basic,fractionNumbers]{{xcentre}},\\simplify[basic,fractionNumbers]{{ycentre}}\\right)$.

", "rulesets": {}, "parts": [{"stepsPenalty": "1", "prompt": "

The equation represents a circle with radius [[0]]  centred at the point $\\large($ [[1]], [[2]] $\\large)$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Put the equation of the circle into standard form, $(x-a)^2+(y-b)^2=r^2$, by completing the square for the $x$ terms and also for the $y$ terms. Once this is done you should recognise this as the equation of a circle of radius $r$ with centre $(a,b)$. 

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"integerPartialCredit": 0, "integerAnswer": true, "allowFractions": true, "variableReplacements": [], "maxValue": "{radius}", "minValue": "{radius}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{xcentre}", "minValue": "{xcentre}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{ycentre}", "minValue": "{ycentre}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

You are given the equation \\[\\simplify[basic,fractionNumbers]{{scoeff}x^2+{lcoeff}x+{scoeff}y^2+{m}y+{k}={c}}.\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "if(c*b=a*dd,dd+1,dd)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "div": {"definition": "lcoeff/scoeff", "templateType": "anything", "group": "Ungrouped variables", "name": "div", "description": ""}, "sqrtargtop": {"definition": "sqrt(argtop)", "templateType": "anything", "group": "Ungrouped variables", "name": "sqrtargtop", "description": ""}, "dd": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "dd", "description": ""}, "ccoeff": {"definition": "c*d", "templateType": "anything", "group": "Ungrouped variables", "name": "ccoeff", "description": ""}, "argbot": {"definition": "4*scoeff^2", "templateType": "anything", "group": "Ungrouped variables", "name": "argbot", "description": ""}, "xcentre": {"definition": "-lcoeff/(2*scoeff)", "templateType": "anything", "group": "Ungrouped variables", "name": "xcentre", "description": ""}, "sqrtargbot": {"definition": "sqrt(argbot)", "templateType": "anything", "group": "Ungrouped variables", "name": "sqrtargbot", "description": ""}, "disc": {"definition": "(lcoeff^2-4*scoeff*ccoeff)", "templateType": "anything", "group": "Ungrouped variables", "name": "disc", "description": ""}, "m": {"definition": "random(-1,1)*random(2,a,b,a*b,2*a,2*b,2*a*b)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": "

coeff of y

"}, "switch": {"definition": "random(0,0,0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "switch", "description": "

if 0 then small radius if 1 then larger (on average)

"}, "argtop": {"definition": "lcoeff^2-4*ccoeff*scoeff", "templateType": "anything", "group": "Ungrouped variables", "name": "argtop", "description": ""}, "radius": {"definition": "if(switch=0,abs((a*d-b*c)/(2a*b)),abs((a*d+b*c)/(2a*b)))", "templateType": "anything", "group": "Ungrouped variables", "name": "radius", "description": ""}, "lcoeff": {"definition": "a*d+b*c", "templateType": "anything", "group": "Ungrouped variables", "name": "lcoeff", "description": ""}, "lengthdet": {"definition": "abs(a*d-b*c)", "templateType": "anything", "group": "Ungrouped variables", "name": "lengthdet", "description": ""}, "ycentre": {"definition": "-m/(2*scoeff)", "templateType": "anything", "group": "Ungrouped variables", "name": "ycentre", "description": ""}, "scoeff": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "scoeff", "description": ""}, "k": {"definition": "if(switch=0,ccoeff+c+m^2/(4*a*b),m^2/(4a*b)+c)", "templateType": "anything", "group": "Ungrouped variables", "name": "k", "description": ""}}, "metadata": {"description": "

Completing the square twice to determine the radius and centre of a circle.

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