// Numbas version: finer_feedback_settings {"name": "When is a sequence within d of its limit?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"variables": ["a", "b1", "b", "c", "d"], "name": "x_n"}, {"variables": ["r1", "ep1", "tval", "N_1"], "name": "Part a"}, {"variables": ["r2", "ep2", "N_2"], "name": "Part b"}], "variables": {"ep1": {"templateType": "anything", "group": "Part a", "definition": "10^(-r1)", "name": "ep1", "description": ""}, "r1": {"templateType": "anything", "group": "Part a", "definition": "random(2,3,4,5,6)", "name": "r1", "description": ""}, "d": {"templateType": "anything", "group": "x_n", "definition": "random(1..20)", "name": "d", "description": ""}, "c": {"templateType": "anything", "group": "x_n", "definition": "random(1..20)", "name": "c", "description": ""}, "N_2": {"templateType": "anything", "group": "Part b", "definition": "ceil((abs(b*c-a*d)-d*c*ep2)/(ep2*c^2))", "name": "N_2", "description": ""}, "b1": {"templateType": "anything", "group": "x_n", "definition": "random(1,-1)*random(2..9)", "name": "b1", "description": ""}, "a": {"templateType": "anything", "group": "x_n", "definition": "random(2..20)", "name": "a", "description": ""}, "ep2": {"templateType": "anything", "group": "Part b", "definition": "10^(-r2)", "name": "ep2", "description": ""}, "b": {"templateType": "anything", "group": "x_n", "definition": "if(b1*c=a*d,b1+1,b1)", "name": "b", "description": ""}, "r2": {"templateType": "anything", "group": "Part b", "definition": "r1+random(1,-1)", "name": "r2", "description": ""}, "tval": {"templateType": "anything", "group": "Part a", "definition": "(1 / c) * ((10 ^ r1 * abs(b * c -(a * d))) / c -d)", "name": "tval", "description": ""}, "N_1": {"templateType": "anything", "group": "Part a", "definition": "ceil((abs(b*c-a*d)-d*c*ep1)/(ep1*c^2))", "name": "N_1", "description": ""}}, "ungrouped_variables": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "When is a sequence within d of its limit?", "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{N_1}", "minValue": "{N_1}", "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Find the least integer $N_1$ such that

\n

\\[\\left|\\simplify[std]{x_n -({a} / {c})}\\right| \\le 10 ^ { -\\var{r1}},  \\textrm{ for } n \\geq N_1\\]

\n

Least $N_1=$ [[0]]

", "marks": 0}, {"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{N_2}", "minValue": "{N_2}", "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Find the least integer $N_2$ such that

\n

\\[\\left|\\simplify[std]{x_n -({a} / {c})}\\right| \\le 10 ^ {- \\var{r2}}, \\textrm{ for } n \\geq N_2\\]

\n

Least $N_2 = $ [[0]]

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

Let \\[x_n=\\simplify[std]{({a}n+{b})/({c}n+{d})}, \\quad n=1,\\; 2,\\; 3 \\ldots \\]

", "tags": ["checked2015", "convergence of a sequence", "limit", "limit of a sequence", "limits", "MAS1601", "query", "sequences", "taking the limit", "tested1", "udf"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

4/07/2012:

\n

Checked calculations.

\n

Small changes to Advice display.

\n

Left inequalities as $\\lt$.

\n

21/07/2012:

\n

Added description.

\n

Added function chcop(a, b) to create coprime pairs - better display of solution.

\n

This finds an integer coprime to a in the range 1..20. b is set to a random value in the range.

\n

Changed definition of variables a, b, c, d.

\n

 27/7/2012:

\n

Added tags.

\n

Question appears to be working correctly.

\n

24/12/2012:

\n

Changed $\\lt$ to $\\le$ and $\\gt$ t $\\ge$ throughout in order to be consistent with question 2 in this assignment. Added query tag to check on this.

\n

Checked calculations, OK. Added tested1 tag.

\n

Added more information about the function chcop. Added udf tag.

\n

 

", "licence": "Creative Commons Attribution 4.0 International", "description": "

$x_n=\\frac{an+b}{cn+d}$. Find the least integer $N$ such that $\\left|x_n -\\frac{a}{c}\\right| \\le 10 ^{-r},\\;n\\geq N$, $2\\leq r \\leq 6$.

"}, "variablesTest": {"condition": "gcd(a,c)=1 and gcd(c,d)=1", "maxRuns": 100}, "advice": "

a)

\n

To find the least $N_1$ such that all terms from the the $N_1$th are within $10^{\\var{-r1}}$ of the limit we proceed as follows:

\n

\\begin{align}
\\left| \\simplify[std]{x_n -({a} / {c})} \\right| \\le 10^{ -\\var{r1}} &\\iff \\left| \\simplify[std]{({a}n+{b})/({c}n+{d})-{a}/{c}}\\right| \\le 10 ^ { -\\var{r1}} \\\\
&\\iff \\simplify[std]{abs({b*c-a*d})/({c^2}n+{c*d})}\\le 10 ^ { -\\var{r1}}
\\end{align}

\n

(We can get rid of the absolute value in the denominator as $\\simplify[std]{{c^2}n+{c*d}} \\gt 0$, $\\forall n=1,\\; 2,\\; 3 \\ldots$)

\n

Rearranging this last inequality by multiplying both sides by $(\\simplify[std]{{c^2}n+{c*d}}) \\times 10^{\\var{r1}}$ (this is positive and so the inequality does not reverse) we get:

\n

\\[ \\simplify[std]{{c^2}n+{c*d}} \\ge \\var{10^r1*abs(b*c-a*d)} \\iff n \\ge \\frac{1}{\\var{c^2}}\\left(\\simplify[std]{{10^r1*abs(b*c-a*d)}-{c*d}}\\right) = \\var{tval} \\]

\n

Hence the least integer value is given by $N_1=\\var{N_1}$.

\n

b)

\n

Using the same method you should obtain $N_2=\\var{N_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/"}]}