// Numbas version: exam_results_page_options {"name": "Kevin's copy of Complete the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "
Completing the square for the quadratic expression $\\simplify{{a*b}x^2+{-n1}x+{c*d}}$.
\\[\\begin{eqnarray} \\simplify{{a*b}x^2+{-n1}x+{c*d}}&=&\\var{n5}\\left(\\simplify{x^2+({-n1}/{a*b})x+ {c*d}/{a*b}}\\right)\\\\ &=&\\var{n5}\\left(\\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2+ \\simplify{{c*d}/{a*b}-({-n1}/({2*a*b}))^2}\\right)\\\\ &=&\\var{n5}\\left(\\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2 -\\simplify{ {n2^2}/{4*(a*b)^2}}\\right)\\\\ &=&\\var{n5}\\left(\\simplify{x+({-n1}/{2*n5})}\\right)^2 -\\simplify{ {n2^2}/{4*(n5)}} \\end{eqnarray} \\]
So to solve $\\simplify{{a*b}x^2+{-n1}x+{c*d}}=0$ we have to solve:
\\[\\begin{eqnarray} \\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2&\\phantom{{}}& -\\simplify{ {n2^2}/{4*(a*b)^2}}=0\\Rightarrow\\\\ \\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2&\\phantom{{}}&=\\simplify{ {n2^2}/{4*(a*b)^2}=({abs(n2)}/{2*a*b})^2} \\end{eqnarray}\\]
So we get the two {rep} solutions:
\\[\\begin{eqnarray} \\simplify{x+({-n1}/{2*a*b})}&=&\\simplify{{abs(n2)}/{2*a*b}} \\Rightarrow &x& = \\simplify{({abs(n2)+n1}/{2*a*b})}\\\\ \\simplify{x+({-n1}/{2*a*b})}&=&\\simplify{-({abs(n2)}/{2*a*b})} \\Rightarrow &x& = \\simplify{({n1-abs(n2)}/{2*a*b})} \\end{eqnarray}\\]
20/06/2012:
\n \t\tAdded tags.
\n \t\tImproved spacing, added some full stops!
\n \t\tChanged \"Using that\" to \"Hence\" in statement.
\n \t\t3/07/2012:
\n \t\tAdded tags.
\n \t\t4/07/2012:
In part a - When submitted answer c=7-(31^2)/48 is accepted however question asks for answer as a fraction or an integer but this is a combination of both.
\n \t\t9/07/2012:
\n \t\tAdded reminder about using integers or fractions in last part.
\n \t\t", "description": "Complete the square for a quadratic polynomial $q(x)$ by writing it in the form $a(x+b)^2+c$. Find both roots of the equation $q(x)=0$.
", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"showCorrectAnswer": true, "gaps": [{"answer": "{n5}(x+({-n1}/{2*n5}))^2-{n2^2}/{4*n5}", "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "vsetrangepoints": 5, "expectedvariablenames": [], "showpreview": true, "musthave": {"showStrings": false, "strings": ["(", ")", "^"], "partialCredit": 0, "message": "write in the form $a(x+b)^2+c$
"}, "marks": 2, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "notallowed": {"showStrings": false, "strings": [".", "x*x", "x x", "x(", "x (", ")x", ") x"], "partialCredit": 0, "message": "write in the form $a(x+b)^2+c$ without using decimals
"}, "answersimplification": "std"}], "stepsPenalty": 1, "scripts": {}, "type": "gapfill", "steps": [{"type": "information", "showCorrectAnswer": true, "prompt": "\n \n \nGiven the quadratic $\\simplify{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d}}$ we complete the square by:
\n \n \n \n1. Writing the quadratic as \\[\\var{n5}\\left(\\simplify{x^2+({-n1}/{n5})x+ {c*d}/{n5}}\\right)\\]
\n \n \n \n2. Then complete the square for the quadratic \\[\\simplify{x^2+({-n1}/{n5})x+ {c*d}/{n5}}\\]
\n \n \n \n3. Remember to multiply by {n5} the expression found from the second stage.
\n \n \n ", "marks": 0, "scripts": {}}], "prompt": "\n\\[q(x)=\\simplify[std]{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d}}\\]
Now write $q(x) = a(x+b)^2+c\\;\\;$ for fractions or integers $a$, $b$, $c$.
$q(x)=\\;$ [[0]]
You can get more information on completing the square by clicking on Show steps.
\nYou will lose 1 mark if you do so.
\nRemember: Input all numbers as fractions or integers and not as decimals.
\n ", "marks": 0}, {"showCorrectAnswer": true, "gaps": [{"answer": "{n1-n4}/{2*a*b}", "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "vsetrangepoints": 5, "expectedvariablenames": [], "showpreview": true, "marks": 1, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "notallowed": {"showStrings": false, "strings": ["."], "partialCredit": 0, "message": "input numbers as fractions or integers not as a decimals
"}, "answersimplification": "all,fractionNumbers"}, {"answer": "{n1+n4}/{2*a*b}", "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "vsetrangepoints": 5, "expectedvariablenames": [], "showpreview": true, "marks": 1, "checkingtype": "absdiff", "scripts": {}, "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "notallowed": {"showStrings": false, "strings": ["."], "partialCredit": 0, "message": "input numbers as fractions or integers not as a decimals
"}, "answersimplification": "all,fractionNumbers"}], "scripts": {}, "type": "gapfill", "prompt": "\nNow find the roots of the quadratic equation $\\simplify{{a*b}x^2+{-n1}x+{c*d}}=0$.
\nThe least root is $x=\\;$ [[0]]. The greatest root is $x=\\;$ [[1]].
\nInput numbers as fractions or integers not as a decimals
\n ", "marks": 0}], "type": "question", "variable_groups": [], "showQuestionGroupNames": false, "statement": "\nComplete the square for the quadratic expression $q(x)$ by writing it in the form \\[a(x+b)^2+c\\] for numbers $a,\\;b$ and $c$.
\nHence find both roots of the equation $q(x)=0$.
\n ", "tags": ["algebra", "algebraic manipulation", "checked2015", "completing the square", "functions", "MAS1601", "mas1601", "quadratic equations", "quadratic expressions", "quadratics", "roots of a quadratic", "solving a quadratic", "Steps", "steps"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "variablesTest": {"maxRuns": 100, "condition": ""}, "name": "Kevin's copy of Complete the square", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}]}