// 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": [{"name": "Graphing: circles - completing the square", "tags": ["circles", "completing the square", "graphing", "Graphing"], "metadata": {"description": "

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

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

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

", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "if(c*b=a*dd,dd+1,dd)", "description": "", "templateType": "anything", "can_override": false}, "div": {"name": "div", "group": "Ungrouped variables", "definition": "lcoeff/scoeff", "description": "", "templateType": "anything", "can_override": false}, "sqrtargtop": {"name": "sqrtargtop", "group": "Ungrouped variables", "definition": "sqrt(argtop)", "description": "", "templateType": "anything", "can_override": false}, "dd": {"name": "dd", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "ccoeff": {"name": "ccoeff", "group": "Ungrouped variables", "definition": "c*d", "description": "", "templateType": "anything", "can_override": false}, "argbot": {"name": "argbot", "group": "Ungrouped variables", "definition": "4*scoeff^2", "description": "", "templateType": "anything", "can_override": false}, "xcentre": {"name": "xcentre", "group": "Ungrouped variables", "definition": "-lcoeff/(2*scoeff)", "description": "", "templateType": "anything", "can_override": false}, "sqrtargbot": {"name": "sqrtargbot", "group": "Ungrouped variables", "definition": "sqrt(argbot)", "description": "", "templateType": "anything", "can_override": false}, "disc": {"name": "disc", "group": "Ungrouped variables", "definition": "(lcoeff^2-4*scoeff*ccoeff)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2,a,b,a*b,2*a,2*b,2*a*b)", "description": "

coeff of y

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

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

", "templateType": "anything", "can_override": false}, "argtop": {"name": "argtop", "group": "Ungrouped variables", "definition": "lcoeff^2-4*ccoeff*scoeff", "description": "", "templateType": "anything", "can_override": false}, "radius_num": {"name": "radius_num", "group": "Ungrouped variables", "definition": "if(switch=0,abs((a*d-b*c)),abs((a*d+b*c)))", "description": "", "templateType": "anything", "can_override": false}, "lcoeff": {"name": "lcoeff", "group": "Ungrouped variables", "definition": "a*d+b*c", "description": "", "templateType": "anything", "can_override": false}, "lengthdet": {"name": "lengthdet", "group": "Ungrouped variables", "definition": "abs(a*d-b*c)", "description": "", "templateType": "anything", "can_override": false}, "ycentre": {"name": "ycentre", "group": "Ungrouped variables", "definition": "-m/(2*scoeff)", "description": "", "templateType": "anything", "can_override": false}, "scoeff": {"name": "scoeff", "group": "Ungrouped variables", "definition": "a*b", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "if(switch=0,ccoeff+c+m^2/(4*a*b),m^2/(4a*b)+c)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet", "div", "argtop", "argbot", "sqrtargtop", "sqrtargbot", "m", "k", "xcentre", "ycentre", "radius_num", "switch"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

", "stepsPenalty": "3", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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)$. 

\n

\n

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_num^2/(2a*b)^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_num/(2a*b)}}\\right)^2$
\n

\n

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

"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{radius_num}/(2a*b)", "maxValue": "{radius_num}/(2a*b)", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{xcentre}", "maxValue": "{xcentre}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ycentre}", "maxValue": "{ycentre}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}