// Numbas version: exam_results_page_options {"name": "Divide two elements of $\\mathbb{Z}[\\sqrt{2}]$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "name": "v"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(m=1,random(2..5),if(m=2,random(3,4,5),if(m=3,random(1,2,4,5),if(m=4,random(1,3,5),random(1..4)))))", "description": "", "name": "n"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "d*t+c*v+n", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(2*n-m)*p", "description": "", "name": "c"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(m-n)*p", "description": "", "name": "d"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "name": "t"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "", "name": "p"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "c*t+2*d*v+m", "description": "", "name": "a"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "m"}}, "ungrouped_variables": ["a", "c", "b", "d", "m", "n", "p", "t", "v"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Divide two elements of $\\mathbb{Z}[\\sqrt{2}]$", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "{m}+{n}sqrt(2)", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all,!collectNumbers", "marks": 1, "vsetrangepoints": 5}, {"answer": "{t}+{v}*sqrt(2)", "musthave": {"message": "

Please input your answer in the form a+b*sqrt(2) where a and b are integers.

", "showStrings": false, "partialCredit": 0, "strings": ["sqrt(2)"]}, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

Please input your answer in the form a+b*sqrt(2) where a and b are integers. Do not include decimal numbers.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all,!collectNumbers", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

Remainder $r=\\;$[[0]]

\n

Find $z=c+d\\sqrt{2}$ such that $\\simplify[all,!collectNumbers]{{a}+{b}*sqrt(2)=({c}+{d}*sqrt(2))*z+r}$

\n

$z=\\;$[[1]]

\n

Please input your answers in the form a+b*sqrt(2) where a and b are integers. Do not include decimal numbers.

", "showCorrectAnswer": true, "marks": 0}], "statement": "

In the quadratic number ring $\\mathbb{Z}[\\sqrt{2}]$ , find the remainder $r=a+b\\sqrt{2}$, where $a \\gt 0,\\;b \\gt 0$ , on dividing $\\simplify[all,!collectNumbers]{{a}+{b}*sqrt(2)}$ by $\\simplify[all,!collectNumbers]{{c}+{d}*sqrt(2)}$ .

", "tags": ["checked2015", "division rings", "euclidean rings", "quadratic number rings", "rings"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

In the ring $\\mathbb{Z}[\\sqrt{2}]$ , find the remainder $r=r_1+r_2\\sqrt{2}$, where $a \\gt 0,\\;b \\gt 0$ , on dividing $a+b\\sqrt{2}$ by $c+d\\sqrt{2}$ .

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

We have:

\n

\\[\\begin{align}\\simplify[all,!collectNumbers]{({a} + {b} * sqrt(2)) / ({c} + {d} * sqrt(2))}& = \\simplify[all,!collectNumbers]{(({a} + {b} * sqrt(2)) * ({c} + { -d} * sqrt(2))) / (({c} + {d} * sqrt(2)) * ({c} + { -d} * sqrt(2)))}\\\\
& = \\simplify{{a * c - 2*b * d} / {c ^ 2 -2*d ^ 2} + ({b * c -(a * d)} / {c ^ 2 - 2*d ^ 2}) * sqrt(2)}\\\\&=\\simplify[all,!collectNumbers]{{(a * c - 2*b * d) / (c ^ 2 - 2*d ^ 2)} + {(b * c -(a * d)) / (c ^ 2 - 2*d ^ 2)} * sqrt(2)}\\\\
& \\approx  \\simplify[all,!collectNumbers]{{t} + {v}* sqrt(2)}\\end{align}\\]

\n

on taking the nearest integer values.

\n

Taking $z= \\simplify[all,!collectNumbers]{{t} + {v}* sqrt(2)}$ and on calculating we find:

\n

\\[\\simplify[all,!collectNumbers]{{a} + {b} * sqrt(2) = ({c} + {d} * sqrt(2)) * ({t} + {v} * sqrt(2)) + {m} + {n} * sqrt(2)}\\]

\n

So the remainder is $r=\\simplify[all,!collectNumbers]{{m}+{n}*sqrt(2)}$.

\n

Note that: \\[N(r) = \\simplify[all,!collectNumbers]{Abs({m ^ 2 -(2 * n ^ 2)}) = {Abs(m ^ 2 -(2 * n ^ 2))}} \\lt\\simplify[all,!collectNumbers]{ N({c} + {d} * Sqrt(2)) = Abs({c ^ 2 -(2 * d ^ 2)}) = {Abs(c ^ 2 -(2 * d ^ 2))}}.\\]

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}