// Numbas version: finer_feedback_settings {"name": "Blathnaid's copy of Find limit of a sequence", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["r", "ep", "tval", "n"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Let $x_n=\\frac{an+b}{cn+d},\\;\\;n=1,\\;2\\ldots$. Find  $\\lim_{x \\to\\infty} x_n=L$ and find least $N$ such that $|x_n-L| \\le 10^{-r},\\;n \\geq N,\\;r \\in \\{2,\\;3,\\;4\\}$.

"}, "advice": "

a)

\n

The limit is $\\displaystyle \\simplify[std]{{a}/{c}}$.

\n

b)

\n

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

\n

\\begin{align}
\\left| \\simplify[std]{x_n -({a} / {c})} \\right| \\leq 10^{ -\\var{r}} &\\iff \\left| \\simplify[std]{({a}n+{b})/({c}n+{d})-{a}/{c}} \\right| \\leq 10 ^ { -\\var{r}} \\\\
&\\iff \\simplify[std]{abs({b*c-a*d})/({c^2}n+{c*d})}\\leq 10 ^ { -\\var{r}}
\\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{r}}$ (this is positive and so the inequality does not reverse), we get:

\n

\\[ \\simplify[std]{{c^2}n+{c*d}} \\geq \\var{10^r*abs(b*c-a*d)} \\iff n \\geq \\simplify[std]{{1}/{c^2}({10^r*abs(b*c-a*d)}-{c*d})}=\\var{tval}\\]

\n

{if(fract(tval)>0,\"The least integer value is given by rounding up, i.e.\",\"So\")} $N=\\var{N}$.

", "extensions": [], "variablesTest": {"condition": "gcd(a,b)=1 and gcd(c,d)=1", "maxRuns": 100}, "functions": {}, "parts": [{"variableReplacements": [], "gaps": [{"showpreview": true, "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "answersimplification": "std", "vsetrange": [0, 1], "showFeedbackIcon": true, "expectedvariablenames": [], "checkingaccuracy": 0.001, "notallowed": {"showStrings": false, "message": "

Enter your answer as a fraction or integer, not as a decimal.

", "partialCredit": 0, "strings": ["."]}, "answer": "{a}/{c}", "checkvariablenames": false, "vsetrangepoints": 5, "checkingtype": "absdiff", "type": "jme", "marks": 1, "scripts": {}}], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "prompt": "\n \n \n

What is the limit of this sequence?

\n \n \n \n

$\\displaystyle{\\lim_{x\\to\\infty} x_n=\\;\\;}$[[0]]

\n \n \n \n

Input the limit as a fraction or an integer and not a decimal.

\n \n \n", "showCorrectAnswer": true}], "variable_groups": [{"variables": ["a", "b1", "b", "c", "d"], "name": "x_n"}, {"variables": ["n1", "n2", "n3", "n4"], "name": "Wrong choices for N"}], "preamble": {"js": "", "css": ""}, "statement": "

Let

\n

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

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "name": "Blathnaid's copy of Find limit of a sequence", "tags": [], "variables": {"n1": {"group": "Wrong choices for N", "templateType": "anything", "name": "n1", "definition": "N+\nif(\n N>50,\n random(-1,1)*random(8..48#4),\n //otherwise\n random(1,3)\n)", "description": ""}, "r": {"group": "Ungrouped variables", "templateType": "anything", "name": "r", "definition": "random(2,3,4)", "description": "

Power of 10 to get within.

"}, "c": {"group": "x_n", "templateType": "anything", "name": "c", "definition": "random(1..20)", "description": ""}, "n2": {"group": "Wrong choices for N", "templateType": "anything", "name": "n2", "definition": "N+\nif(\n N>50,\n random(-1,1)*random(7..43#4),\n //otherwise\n random(2,4)\n)", "description": ""}, "n4": {"group": "Wrong choices for N", "templateType": "anything", "name": "n4", "definition": "N+\nif(\n N>50,\n random(-1,1)*random(5..41#4),\n //otherwise\n random(7,8)\n)", "description": ""}, "ep": {"group": "Ungrouped variables", "templateType": "anything", "name": "ep", "definition": "10^(-r)", "description": ""}, "b1": {"group": "x_n", "templateType": "anything", "name": "b1", "definition": "random(-1,1)*random(2..9)", "description": ""}, "d": {"group": "x_n", "templateType": "anything", "name": "d", "definition": "random(1..20)", "description": ""}, "n3": {"group": "Wrong choices for N", "templateType": "anything", "name": "n3", "definition": "N+\nif(\n N>50,\n random(-1,1)*random(6..42#4),\n //otherwise\n random(5,6)\n)", "description": ""}, "a": {"group": "x_n", "templateType": "anything", "name": "a", "definition": "random(2..9)", "description": ""}, "tval": {"group": "Ungrouped variables", "templateType": "anything", "name": "tval", "definition": "(1 / c) * ((10 ^ r * abs(b * c -(a * d))) / c -d)", "description": "

Value of $n$ when $x_n$ is exactly $10^{-r}$ away from the limit (not necessarily an integer)

"}, "n": {"group": "Ungrouped variables", "templateType": "anything", "name": "n", "definition": "ceil(tval)", "description": "

Smallest $N$ such that $x_n$ is within ep of its limit.

"}, "b": {"group": "x_n", "templateType": "anything", "name": "b", "definition": "if(a*d=b1*c,b1+1,b1)", "description": ""}}, "type": "question", "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}]}]}], "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}]}