// Numbas version: exam_results_page_options {"name": "Series Homework 1", "metadata": {"description": "
Series Homework 2
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], []], "questions": [{"name": "Series: geometric series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": [], "variables": {"start": {"group": "Ungrouped variables", "description": "", "definition": "random(2..7)", "name": "start", "templateType": "anything"}, "r": {"group": "Ungrouped variables", "description": "", "definition": "random([1/3,1/4,1/6,-1/3,-1/4,-1/6,2/3,-2/3,3/4,-3/4,-2,-1.9,-1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,-1,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,-2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1])", "name": "r", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "random(-20..20 except 0)", "name": "a", "templateType": "anything"}}, "rulesets": {}, "variable_groups": [], "functions": {}, "ungrouped_variables": ["r", "a", "start"], "statement": "You are given the series
\n\\[\\sum_{k=\\var{start}}^\\infty\\var{a}\\left(\\var[fractionNumbers]{r}\\right)^k.\\]
", "metadata": {"description": "This question tests to see if students can recognise a geometric series and based on its common ratio determine if it is convergent or divergent.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "parts": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "prompt": "This is a [[0]] [[1]].
", "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"displayType": "dropdownlist", "minMarks": 0, "shuffleChoices": false, "displayColumns": 0, "variableReplacements": [], "type": "1_n_2", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0, "maxMarks": 0, "distractors": ["", ""], "choices": ["convergent
", "divergent
"], "matrix": ["if(abs(r)<1,1,0)", "if(abs(r)>=1,1,0)"]}, {"displayType": "dropdownlist", "minMarks": 0, "shuffleChoices": true, "displayColumns": 0, "variableReplacements": [], "type": "1_n_2", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0, "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "choices": ["p series
", "geometric series
", "arithmetic series
", "alternating series
", "Maclaurin series
", "Taylor series
"], "matrix": ["0", "1", 0, "if(r<0,1,0)", 0, 0]}], "showFeedbackIcon": true, "scripts": {}}], "preamble": {"js": "", "css": ""}, "advice": "A geometric series $\\sum_{n=0}^\\infty ar^n$ is convegent if $|r|<1$ with a sum of $\\frac{a}{1-r}$, and is divergent if $|r|\\ge1$.
\nOur series is $\\sum_{k=\\var{start}}^\\infty\\var{a}\\left(\\var[fractionNumbers]{r}\\right)^k$, which looks similar with an $r$ value of $\\var[fractionNumbers]{r}$. In fact, if we are worried that our series starts at $k=3$ instead of at $n=0$ notice:
\n\n$\\displaystyle\\sum_{k=\\var{start}}^\\infty \\var{a}\\left(\\var[fractionNumbers]{r}\\right)^k=\\sum_{k=\\var{start}}^\\infty \\var{a}\\left(\\var[fractionNumbers]{r}\\right)^{\\var{start}}\\left(\\var[fractionNumbers]{r}\\right)^{k-\\var{start}}$
\nwe now make the substitution $n=k-\\var{start}$ (which means when $k=\\var{start}$, $n=0$) and we have
\n$\\displaystyle\\sum_{n=0}^\\infty \\var{a}\\left(\\var[fractionNumbers]{r}\\right)^{\\var{start}}\\left(\\var[fractionNumbers]{r}\\right)^{n}$
\n\n\nand so even though our series seemed to start later on, it is still a geometric series with $a=\\var{a}\\left(\\var[fractionNumbers]{r}\\right)^{\\var{start}}$ and $r=\\var[fractionNumbers]{r}$. Also, note that adding or subtracting a finite number of terms to a series will not change whether it converges or diverges, nor will multiplying or dividing the series by a non-zero constant.
\nSo we have a convergent divergent geometric series with common ratio $r=\\var[fractionNumbers]{r}$.
\n\nSince this common ratio is negative, each time we multiply by it we alternate the sign of the term, that is, this series is also an alternating series. If we wanted to, we could pull the common factor of $-1$ out and write our series as a positive number multiplied by $(-1)^n$:
\n$\\displaystyle\\sum_{n=0}^\\infty (-1)^n\\var{abs(a)}\\left(\\var[fractionNumbers]{abs(r)}\\right)^{\\var{start}}\\left(\\var[fractionNumbers]{abs(r)}\\right)^{n}$
\nThe alternating series $\\sum_{n=0}^\\infty (-1)^n b_n$ where $b_n>0$, converges if $b_{n+1}\\le b_n$ for all $n$ and $\\lim_{n\\rightarrow\\infty}b_n=0$.
\n\nSince this common ratio is negative, each time we multiply by it we alternate the sign of the term, that is, this series is also an alternating series. If we wanted to, we could pull the common factor of $-1$ out and write our series as a positive number multiplied by $(-1)^{n+1}$:
\n$\\displaystyle\\sum_{n=0}^\\infty (-1)^{n+1}\\var{abs(a)}\\left(\\var[fractionNumbers]{abs(r)}\\right)^{\\var{start}}\\left(\\var[fractionNumbers]{abs(r)}\\right)^{n}$
\nThe alternating series $\\sum_{n=0}^\\infty (-1)^{n+1} b_n$ where $b_n>0$, converges if $b_{n+1}\\le b_n$ for all $n$ and $\\lim_{n\\rightarrow\\infty}b_n=0$.
\nTherefore, we also know our series converges based on this alternating series test.
\nTherefore, we also know our series diverges based on this alternating series test.
\n", "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question"}, {"name": "Series: p series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "statement": "You are given the series
\n\\[\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}.\\]
", "preamble": {"css": "", "js": ""}, "variables": {"den": {"definition": "random([2,3,5,7,11,13] except [num,-num])", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "den"}, "p": {"definition": "random(1,2,3,4,5,6,7,8,1/2,1/3,1/4,1/5,1/6,1/7,1/8)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "p"}, "start": {"definition": "random(list(2..7) except [num,den])", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "start"}, "num": {"definition": "random(2,3,5,7,11,13,-2,-3,-5,-7,-11,-13)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "num"}}, "rulesets": {}, "advice": "The $p$-series $\\sum_{n=1}^\\infty \\frac{1}{n^p}$ is convergent if $p>1$ and divergent if $p\\le 1$.
\nOur series is $\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}$, which looks similar with a $p$-value of $\\var[fractionNumbers]{p}$. In fact:
\n\\[\\begin{align}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}&=\\simplify[fractionNumbers]{{num}/{den}}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{1/(k^{p})}\\\\&=\\simplify[fractionNumbers]{{num}/{den}}\\left(-1+\\sum_{k=1}^\\infty \\simplify[fractionNumbers]{1/k^{p}}\\right)\\end{align}\\]
\n\\[\\begin{align}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}&=\\simplify[fractionNumbers]{{num}/{den}}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{1/(k^{p})}\\\\&=\\simplify[fractionNumbers]{{num}/{den}}\\left(-1-\\frac{1}{2^\\var[fractionNumbers]{p}}+\\sum_{k=1}^\\infty \\simplify[fractionNumbers]{1/k^{p}}\\right)\\end{align}\\]
\n\\[\\begin{align}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}&=\\simplify[fractionNumbers]{{num}/{den}}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{1/(k^{p})}\\\\&=\\simplify[fractionNumbers]{{num}/{den}}\\left(-1-\\frac{1}{2^\\var[fractionNumbers]{p}}-\\frac{1}{3^\\var[fractionNumbers]{p}}+\\sum_{k=1}^\\infty \\simplify[fractionNumbers]{1/k^{p}}\\right)\\end{align}\\]
\n\\[\\begin{align}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}&=\\simplify[fractionNumbers]{{num}/{den}}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{1/(k^{p})}\\\\&=\\simplify[fractionNumbers]{{num}/{den}}\\left(-1-\\frac{1}{2^\\var[fractionNumbers]{p}}-\\frac{1}{3^\\var[fractionNumbers]{p}}-\\frac{1}{4^\\var[fractionNumbers]{p}}+\\sum_{k=1}^\\infty \\simplify[fractionNumbers]{1/k^{p}}\\right)\\end{align}\\]
\n\\[\\begin{align}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}&=\\simplify[fractionNumbers]{{num}/{den}}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{1/(k^{p})}\\\\&=\\simplify[fractionNumbers]{{num}/{den}}\\left(-1-\\frac{1}{2^\\var[fractionNumbers]{p}}-\\frac{1}{3^\\var[fractionNumbers]{p}}-\\frac{1}{4^\\var[fractionNumbers]{p}}-\\frac{1}{5^\\var[fractionNumbers]{p}}+\\sum_{k=1}^\\infty \\simplify[fractionNumbers]{1/k^{p}}\\right)\\end{align}\\]
\n\\[\\begin{align}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{{num}/({den}*k^{p})}&=\\simplify[fractionNumbers]{{num}/{den}}\\sum_{k=\\var{start}}^\\infty \\simplify[fractionNumbers]{1/(k^{p})}\\\\&=\\simplify[fractionNumbers]{{num}/{den}}\\left(-1-\\frac{1}{2^\\var[fractionNumbers]{p}}-\\frac{1}{3^\\var[fractionNumbers]{p}}-\\frac{1}{4^\\var[fractionNumbers]{p}}-\\frac{1}{5^\\var[fractionNumbers]{p}}-\\frac{1}{6^\\var[fractionNumbers]{p}}+\\sum_{k=1}^\\infty \\simplify[fractionNumbers]{1/k^{p}}\\right)\\end{align}\\]
\nand so the convergence/divergence of our series depends on the convergence/divergence of the related $p$-series. Note that adding or subtracting a finite number of terms to a series will not change whether it converges or diverges (such as our missing first term terms), nor will multiplying or dividing the series by a non-zero constant (such as $\\frac{\\var{num}}{\\var{den}}$).
\nSo we have a
This question tests to see if students can recognise a $p$-series and based on its $p$-value determine if it is convergent or divergent.
"}, "ungrouped_variables": ["p", "num", "den", "start"], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "parts": [{"scripts": {}, "prompt": "This is a [[0]] [[1]].
", "gaps": [{"scripts": {}, "showFeedbackIcon": true, "displayType": "dropdownlist", "variableReplacements": [], "type": "1_n_2", "marks": 0, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "distractors": ["", ""], "choices": ["convergent
", "divergent
"], "minMarks": 0, "showCorrectAnswer": true, "matrix": ["if(p>1,1,0)", "if(p<=1,1,0)"], "shuffleChoices": false, "displayColumns": 0}, {"scripts": {}, "showFeedbackIcon": true, "displayType": "dropdownlist", "variableReplacements": [], "type": "1_n_2", "marks": 0, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "distractors": ["", "", "", "", "", ""], "choices": ["p series
", "geometric series
", "arithmetic series
", "alternating series
", "Maclaurin series
", "Taylor series
"], "minMarks": 0, "showCorrectAnswer": true, "matrix": ["1", 0, 0, "0", 0, 0], "shuffleChoices": true, "displayColumns": 0}], "showCorrectAnswer": true, "variableReplacements": [], "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "type": "question"}, {"name": "Series: ratio test", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "ungrouped_variables": ["seed", "percent", "limit", "a", "d", "coeff", "b", "c", "f", "g", "h", "alt", "cseed", "cexpression", "ratio_con_to_zero", "ratio_con_to_less_than_one", "ratio_con_to_one", "ratio_con_to_big", "ratio_div_to_inf", "start"], "functions": {}, "rulesets": {}, "tags": [], "advice": "The ratio test says, given a series $\\sum_{k=a}^\\infty t_k$
\nNotice, if the limit doesn't exist for some other reason or is equal to $1$ the test doesn't tell us anything, some might say the test is 'inconclusive' or 'fails'.
\n\na)
\nSince $\\lim_{k\\rightarrow\\infty}\\left|\\frac{t_{k+1}}{t_k}\\right|=\\frac{\\var{percent}}{100}<1$ the ratio test tells us that the series converges.
\nSince $\\lim_{k\\rightarrow\\infty}\\left|\\frac{t_{k+1}}{t_k}\\right|=\\frac{\\var{percent}}{100}>1$ the ratio test tells us that the series diverges.
\nSince $\\lim_{k\\rightarrow\\infty}\\left|\\frac{t_{k+1}}{t_k}\\right|=1$ the ratio test doesn't tell us anything.
\n\nb)
\nSince $\\lim_{k\\rightarrow\\infty}\\left|\\frac{t_{k+1}}{t_k}\\right|=\\var[fractionNumbers]{limit}<1$ the ratio test tells us that the series converges.
\nSince $\\lim_{k\\rightarrow\\infty}\\left|\\frac{t_{k+1}}{t_k}\\right|=\\var[fractionNumbers]{limit}>1$ the ratio test tells us that the series diverges.
\nSince $\\lim_{k\\rightarrow\\infty}\\left|\\frac{t_{k+1}}{t_k}\\right|=1$ the ratio test doesn't tell us anything.
\n\nc)
\nTo use the ratio test we need to determine the value that the absolute value of the ratio of consecutive terms converge to.
\nGiven $t_k=${cexpression} we use algebra and limit laws to determine
\n\\[\\lim_{k\\rightarrow\\infty}\\frac{t_{k+1}}{t_k}=0\\]
\n\\[\\lim_{k\\rightarrow\\infty}\\frac{t_{k+1}}{t_k}=\\simplify[fractionNumbers]{{1/a}}\\]
\n\\[\\lim_{k\\rightarrow\\infty}\\frac{t_{k+1}}{t_k}=1\\]
\n\\[\\lim_{k\\rightarrow\\infty}\\frac{t_{k+1}}{t_k}=\\var{a}\\]
\n\nand therefore by the ratio test the series converges.
\nand therefore by the ratio test the series diverges.
\nand therefore the ratio test doesn't tell us anything.
\n", "preamble": {"css": "", "js": ""}, "variable_groups": [], "parts": [{"distractors": ["", "", ""], "scripts": {}, "prompt": "A series is such that as we get further and further along the sequence, each term has an absolute value that approaches $\\var{percent}\\%$ of the absolute value of the previous term. What does the ratio test tell us about this series?
", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "shuffleChoices": false, "minMarks": 0, "displayColumns": 0, "choices": ["This series converges.
", "This series diverges.
", "It doesn't tell us anything.
"], "variableReplacements": [], "showCorrectAnswer": true, "displayType": "dropdownlist", "type": "1_n_2", "matrix": ["if(seed=-1,1,0)", "if(seed=1,1,0)", "if(seed=0,1,0)"], "maxMarks": 0}, {"distractors": ["", "", ""], "scripts": {}, "prompt": "A series, $\\displaystyle\\sum_{k=\\var{start}}^\\infty t_k$, is such that $\\displaystyle\\lim_{k\\rightarrow \\infty}\\left\\vert\\frac{t_{k+1}}{t_k}\\right\\vert $ $=\\var[fractionNumbers]{limit}$. What does the ratio test tell us about this series?
", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "shuffleChoices": false, "minMarks": 0, "displayColumns": 0, "choices": ["This series converges.
", "This series diverges.
", "It doesn't tell us anything.
"], "variableReplacements": [], "showCorrectAnswer": true, "displayType": "dropdownlist", "type": "1_n_2", "matrix": ["if(seed=1,1,0)", "if(seed=0,1,0)", "if(seed=-1,1,0)"], "maxMarks": 0}, {"distractors": ["", "", ""], "scripts": {}, "prompt": "Given the series
\n$\\displaystyle\\sum_{k=\\var{start}}^\\infty$ {cexpression}
\nWhat does the ratio test tell us about this series?
", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "shuffleChoices": false, "minMarks": 0, "displayColumns": 0, "choices": ["This series converges.
", "This series diverges.
", "It doesn't tell us anything.
"], "variableReplacements": [], "showCorrectAnswer": true, "displayType": "dropdownlist", "type": "1_n_2", "matrix": ["if(cseed=0 or cseed=0.5,1,0)", "if(cseed=2,1,0)", "if(cseed=1,1,0)"], "maxMarks": 0}], "variables": {"cseed": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "cseed", "definition": "random(0,0.5,1,1,2,2)"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d", "definition": "random(-12..12 except [0,a,-a])"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b", "definition": "coeff[0]"}, "g": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g", "definition": "coeff[3]"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a", "definition": "random(2..12)"}, "ratio_con_to_big": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ratio_con_to_big", "definition": "if(alt=1,\n[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}^(k+1))}\\$\",//ratio converges to a \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}^(k+2))*k!/(k+{a})!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}^k)*({a}k+{b})/({d}k^2+{f}k+{g})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}^(k+1))*({a}k^2+{b}k+{c})/({d}k^3+{f}k^2+{g}k+{h})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k*({a}^(k+2))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}^k*(k+{a})!/(k!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}^(k+1)*({d}k^2+{f}k+{g})/({a}k+{b})}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}^(k+2)*({d}k^3+{f}k^2+{g}k+{h})/({a}k^2+{b}k+{c})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}^k)*arctan(k)}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}^(k+1)*({a}k+{b})/({d}k+{f})}\\$\"\n]\n,\n[\n\"\\$\\\\displaystyle\\\\simplify{({a}^(k+1))}\\$\",//ratio converges to a \n\"\\$\\\\displaystyle\\\\simplify{({a}^(k+2)*k!)/(k+{a})!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}^k)*({a}k+{b})/({d}k^2+{f}k+{g})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}^(k+1))*({a}k^2+{b}k+{c})/({d}k^3+{f}k^2+{g}k+{h})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{k*({a}^(k+2))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{{a}^k*(k+{a})!/(k!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{{a}^(k+1)*({d}k^2+{f}k+{g})/({a}k+{b})}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{{a}^(k+2)*({d}k^3+{f}k^2+{g}k+{h})/({a}k^2+{b}k+{c})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}^k)*arctan(k)}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{{a}^(k+1)*({a}k+{b})/({d}k+{f})}\\$\"\n])"}, "limit": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "limit", "definition": "if(seed=1,random(1/9,1/8,1/7,1/5,1/4,1/3,1/2,1/10,1/100),if(seed=0,random(10/9,11/8,8/7,7/5,5/4,4/3,5/2,2,17/10,102/100),1))"}, "alt": {"group": "Ungrouped variables", "templateType": "anything", "description": "1 for alternating sign, 0 for not alternating sign
", "name": "alt", "definition": "random(0,1)"}, "ratio_con_to_less_than_one": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ratio_con_to_less_than_one", "definition": "if(alt=1,\n[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k/({a}^k)}\\$\",//ratio converges to 1/a \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/({a}^(k+1)*(k+{a})!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k+{b})/({a}^(k+2)*({d}k^2+{f}k+{g}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k^2+{b}k+{c})/({a}^k*({d}k^3+{f}k^2+{g}k+{h}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k/({a}^(k+1)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*(k+{a})!/({a}^(k+2)*k!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({d}k^2+{f}k+{g})/({a}^k*({a}k+{b}))}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({d}k^3+{f}k^2+{g}k+{h})/({a}^(k+1)*({a}k^2+{b}k+{c}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*arctan(k)/({a}^(k+2))}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k+{b})/({a}^k*({d}k+{f}))}\\$\"\n]\n,\n[\n\"\\$\\\\displaystyle\\\\simplify{1/({a}^k)}\\$\",//ratio converges to 1/a \n\"\\$\\\\displaystyle\\\\simplify{k!/({a}^(k+1)*(k+{a})!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}k+{b})/({a}^(k+2)*({d}k^2+{f}k+{g}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}k^2+{b}k+{c})/({a}^k*({d}k^3+{f}k^2+{g}k+{h}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{k/({a}^(k+1))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(k+{a})!/({a}^(k+2)*k!)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({d}k^2+{f}k+{g})/({a}^k*({a}k+{b}))}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{({d}k^3+{f}k^2+{g}k+{h})/({a}^(k+1)*({a}k^2+{b}k+{c}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{arctan(k)/({a}^(k+2))}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{({a}k+{b})/({a}^k*({d}k+{f}))}\\$\"\n])"}, "coeff": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "coeff", "definition": "shuffle(list(-12..12) +0+0+0+0+0+0+0+0+0+0+0+0)[0..5]"}, "ratio_div_to_inf": {"group": "Ungrouped variables", "templateType": "anything", "description": "I have omitted these but you might like to use them, it depends on what your course notes say about the ratio test...
", "name": "ratio_div_to_inf", "definition": "if(alt=1,\n[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/{a}}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/{a}^k}\\$\"\n],\n [\n\"\\$\\\\displaystyle\\\\simplify{k!/{a}}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{k!/{a}^k}\\$\"\n])"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c", "definition": "coeff[1]"}, "start": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "start", "definition": "random(0..5)"}, "seed": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "seed", "definition": "random(-1,0,1)"}, "ratio_con_to_zero": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ratio_con_to_zero", "definition": "if(alt=1,\n[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k/(k+1)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}/k!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}^k/k!}\\$\"\n],\n [\n\"\\$\\\\displaystyle\\\\simplify{1/(k+1)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{{a}/k!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{{a}^k/k!}\\$\"\n])"}, "cexpression": {"group": "Ungrouped variables", "templateType": "anything", "description": "random(0,0.5,1,2)
", "name": "cexpression", "definition": "if(cseed=0,random(ratio_con_to_zero),\nif(cseed=0.5,random(ratio_con_to_less_than_one),\nif(cseed=1,random(ratio_con_to_one),\n random(ratio_con_to_big))))\n"}, "percent": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "percent", "definition": "if(seed=-1,random(1..99), if(seed=0,100, random(101..200)))"}, "ratio_con_to_one": {"group": "Ungrouped variables", "templateType": "anything", "description": "These have ratios that converge to 1 and so the ratio test is inconclusive
", "name": "ratio_con_to_one", "definition": "if(alt=1,\n[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/(k+{a})!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k+{b})/({d}k^2+{f}k+{g})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k^2+{b}k+{c})/({d}k^3+{f}k^2+{g}k+{h})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*(k+{a})!/k!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({d}k^2+{f}k+{g})/({a}k+{b})}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({d}k^3+{f}k^2+{g}k+{h})/({a}k^2+{b}k+{c})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}*arctan(k)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k}\\$\"\n]\n,\n[\n\"\\$\\\\displaystyle\\\\simplify{k!/(k+{a})!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}k+{b})/({d}k^2+{f}k+{g})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}k^2+{b}k+{c})/({d}k^3+{f}k^2+{g}k+{h})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{k}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(k+{a})!/k!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({d}k^2+{f}k+{g})/({a}k+{b})}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{({d}k^3+{f}k^2+{g}k+{h})/({a}k^2+{b}k+{c})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{*{a}*arctan(k)}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{{a}}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{1}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{({a}k+{b})/({d}k+{f})}\\$\"\n])"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "f", "definition": "coeff[2]"}, "h": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "h", "definition": "coeff[4]"}}, "metadata": {"description": "Test whether a student knows the ratio test of a series, and how to use it. Series include those that the ratio test is inconclusive for. This question could be better in that it could go through the working of determining the limit but I hope to make a separate question which deals with that.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "This question is about the ratio test for series.
", "type": "question"}, {"name": "Series: comparison test", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": [], "variables": {"pc4": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{b}*sin(k)^2/({d}k^{a})}\\$'", "name": "pc4", "templateType": "anything"}, "percent": {"group": "Ungrouped variables", "description": "", "definition": "if(seed=-1,random(1..99), if(seed=0,100, random(101..200)))", "name": "percent", "templateType": "anything"}, "cexpression": {"group": "Ungrouped variables", "description": "", "definition": "switch(cseed='pc1',pc1,cseed='pc2',pc2,cseed='pc3',pc3,cseed='pc4',pc4,cseed='pd1',pd1,cseed='pd2',pd2,cseed='gc1',gc1,cseed='gc2',gc2,cseed='gc3',gc3,pd3)", "name": "cexpression", "templateType": "anything"}, "cseed": {"group": "Ungrouped variables", "description": "pc1 = p series convergent number 1
\ngd2= geometric series divergent number 2 etc
\n", "definition": "if(ccondiv='div',random('pd1','pd2','pd3'),random('pc1','pc2','pc3','pc4','gc1','gc2','gc3'))", "name": "cseed", "templateType": "anything"}, "pc2": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{a}/({d}k^{b}-{f}k-{g})}\\$'", "name": "pc2", "templateType": "anything"}, "pd2": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{a}/({d}*ln(k))}\\$'", "name": "pd2", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "coeff[0]", "name": "a", "templateType": "anything"}, "gc3": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{b}*sin(k)^2/({d}*{a}^k)}\\$'", "name": "gc3", "templateType": "anything"}, "limit": {"group": "Ungrouped variables", "description": "", "definition": "if(seed=1,random(1/9,1/8,1/7,1/5,1/4,1/3,1/2,1/10,1/100),if(seed=0,random(10/9,11/8,8/7,7/5,5/4,4/3,5/2,2,17/10,102/100),1))", "name": "limit", "templateType": "anything"}, "coeff": {"group": "Ungrouped variables", "description": "", "definition": "shuffle(2..12)[0..6]", "name": "coeff", "templateType": "anything"}, "start": {"group": "Ungrouped variables", "description": "", "definition": "coeff[5]", "name": "start", "templateType": "anything"}, "pc1": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{a}/({d}k^{b}+{f}k+{g})}\\$'", "name": "pc1", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "description": "", "definition": "coeff[1]", "name": "b", "templateType": "anything"}, "gc1": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify[fractionNumbers]{{a}/({d}^k+{f})}\\$'", "name": "gc1", "templateType": "anything"}, "pd3": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{d}k^{b-1}/(sqrt(k^{2*b}+{a}))}\\$'", "name": "pd3", "templateType": "anything"}, "f": {"group": "Ungrouped variables", "description": "", "definition": "coeff[3]", "name": "f", "templateType": "anything"}, "pd1": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{a}ln(k)/({d}*k)}\\$'", "name": "pd1", "templateType": "anything"}, "pc3": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{b}*cos(k)^2/({d}k^{a})}\\$'", "name": "pc3", "templateType": "anything"}, "seed": {"group": "Ungrouped variables", "description": "", "definition": "random(0..3)", "name": "seed", "templateType": "anything"}, "d": {"group": "Ungrouped variables", "description": "", "definition": "coeff[2]", "name": "d", "templateType": "anything"}, "ccondiv": {"group": "Ungrouped variables", "description": "", "definition": "random('con','div')", "name": "ccondiv", "templateType": "anything"}, "g": {"group": "Ungrouped variables", "description": "", "definition": "coeff[4]", "name": "g", "templateType": "anything"}, "gc2": {"group": "Ungrouped variables", "description": "", "definition": "'\\$\\\\displaystyle\\\\simplify{{b}*cos(k)^2/({d}*{a}^k)}\\$'", "name": "gc2", "templateType": "anything"}}, "rulesets": {}, "variable_groups": [], "functions": {}, "ungrouped_variables": ["seed", "percent", "limit", "ccondiv", "cseed", "cexpression", "coeff", "a", "b", "d", "f", "g", "start", "pc1", "pc2", "pc3", "pc4", "pd1", "pd2", "pd3", "gc1", "gc2", "gc3"], "statement": "This question is about the comparison test for series.
", "metadata": {"description": "Test whether a student knows the comparison test of a series, and how to use it. Series include those that the comparison test is inconclusive for.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "parts": [{"displayType": "dropdownlist", "minMarks": 0, "shuffleChoices": false, "prompt": "You have a series $\\sum t_k$ with positive terms. Each term in the series is greater than or equal to the corresponding term in another series of positive terms which is actually known to converge.
\nYou have a series $\\sum t_k$ with positive terms. Each term in the series is greater than or equal to the corresponding term in another series of positive terms which is actually known to diverge.
\nYou have a series $\\sum t_k$ with positive terms. Each term in the series is less than or equal to the corresponding term in another series of positive terms which is actually known to converge.
\nYou have a series $\\sum t_k$ with positive terms. Each term in the series is less than or equal to the corresponding term in another series of positive terms which is actually known to diverge.
\nWhat does the comparison test tell us about the series $\\sum t_k$?
", "displayColumns": 0, "variableReplacements": [], "type": "1_n_2", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0, "maxMarks": 0, "distractors": ["", "", ""], "choices": ["This series converges.
", "This series diverges.
", "It doesn't tell us anything.
"], "matrix": ["if(seed=1,1,0)", "if(seed=2,1,0)", "if(seed=0 or seed=3,1,0)"]}, {"displayType": "dropdownlist", "minMarks": 0, "shuffleChoices": false, "prompt": "Suppose you have two series, $\\sum a_n$ and $\\sum b_n$, where $a,b>0$, $a_n\\ge b_n$ for all $n$, and $\\sum a_n$ is convergent.
\nSuppose you have two series, $\\sum a_n$ and $\\sum b_n$, where $a,b>0$, $a_n\\ge b_n$ for all $n$, and $\\sum a_n$ is divergent.
\nSuppose you have two series, $\\sum a_n$ and $\\sum b_n$, where $a,b>0$, $a_n\\le b_n$ for all $n$, and $\\sum a_n$ is convergent.
\nSuppose you have two series, $\\sum a_n$ and $\\sum b_n$, where $a,b>0$, $a_n\\le b_n$ for all $n$, and $\\sum a_n$ is divergent.
\nWhat does the comparison test tell us about the series $\\sum b_n$?
", "displayColumns": 0, "variableReplacements": [], "type": "1_n_2", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0, "maxMarks": 0, "distractors": ["", "", ""], "choices": ["This series converges.
", "This series diverges.
", "It doesn't tell us anything.
"], "matrix": ["if(seed=0,1,0)", "if(seed=3,1,0)", "if(seed=1 or seed=2,1,0)"]}, {"displayType": "dropdownlist", "minMarks": 0, "shuffleChoices": false, "prompt": "Given the series
\n$\\displaystyle\\sum_{k=\\var{start}}^\\infty$ {cexpression}
\nWhat does the comparison test tell us about this series?
", "displayColumns": 0, "variableReplacements": [], "type": "1_n_2", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0, "maxMarks": 0, "distractors": ["", "", ""], "choices": ["This series converges.
", "This series diverges.
", "It doesn't tell us anything.
"], "matrix": ["if(ccondiv='con',1,0)", "if(ccondiv='div',1,0)", "0"]}], "preamble": {"js": "", "css": ""}, "advice": "The comparison test is as follows. Suppose that $0\\ge a_n\\ge b_n$ for sufficiently large $n$.
\n• If $a_n$ diverges, then $b_n$ also diverges.
\n• If $b_n$ converges, then $a_n$ also converges.
\nNotice, if $a_n$ converges or if $b_n$ diverges the test doesn't say anything, in these cases some might say the test is 'inconclusive' or 'fails'.
\n\na)
\nThe comparison test ensures us that our series converges (because a larger one does).
\nThe comparison test ensures us that our series diverges (because a smaller one does).
\nThe comparison test doesn't tell us anything about this situation.
\n\nb)
\nThe comparison test ensures us that our series converges (because a larger one does).
\nThe comparison test ensures us that our series diverges (because a smaller one does).
\nThe comparison test doesn't tell us anything about this situation.
\n\nc)
\nIn the denominator of {cexpression} the dominant term is $\\var{d}k^\\var{b}$, so we will compare our series with $\\sum_{k=\\var{start}}^\\infty\\frac{\\var{a}}{\\var{d}k^\\var{b}}$ which is a $p$-series with $p=\\var{b}$ and hence is convergent. Now for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{a}/({d}k^{b}+{f}k+{g})<{a}/({d}k^{b})}\\]
\nand therefore our series is also convergent.
\nIn the denominator of {cexpression} the dominant term is $\\var{d}k^\\var{b}$, so we will compare our series with $\\sum_{k=\\var{start}}^\\infty\\frac{\\var{a}}{\\var{d}k^\\var{b}}$ which is a $p$-series with $p=\\var{b}$ and hence is convergent. However, for $k\\ge\\var{start}$ we have
\n\\[\\simplify{{a}/({d}k^{b}-{f}k-{g})>{a}/({d}k^{b})}\\]
\nand so can't use the comparison test to compare it to that series. But, for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{a}/({d}k^{b}-{f}k-{g})<{a}/({d}k^{b+1})}\\]
\nand $\\sum_{k=\\var{start}}^\\infty \\simplify{{a}/({d}k^{b+1})}$ is a convergent $p$-series. Therefore our series is also convergent.
\nNotice that $0\\le \\cos^2(k)\\le 1$ and so for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{b}cos(k)^2/({d}k^{a})<={b}/({d}k^{a})}\\]
\nAlso notice, $\\sum_{k=\\var{start}}^\\infty \\frac{\\var{b}}{\\var{d}k^{\\var{a}}}$ is a convergent $p$-series with $p=\\var{a}$. Therefore our series is also convergent.
\nNotice that $0\\le \\sin^2(k)\\le 1$ and so for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{b}sin(k)^2/({d}k^{a})<={b}/({d}k^{a})}\\]
\nAlso notice, $\\sum_{k=\\var{start}}^\\infty \\frac{\\var{b}}{\\var{d}k^{\\var{a}}}$ is a convergent $p$-series with $p=\\var{a}$. Therefore our series is also convergent.
\nFor $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{a}ln(k)/({d}k)>{a}/({d}k)}\\]
\nand $\\sum_{k=\\var{start}}^\\infty \\simplify{{a}/({d}k)}$ is a divergent series (it is a scalar multiple of the harmonic series or a $p$-series with $p=1$). Therefore our series is also divergent.
\nFor $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{a}/({d}ln(k))>{a}/({d}k)}\\]
\nand $\\sum_{k=\\var{start}}^\\infty \\simplify{{a}/({d}k)}$ is a divergent series (it is a scalar multiple of the harmonic series or a $p$-series with $p=1$). Therefore our series is also divergent.
\nGiven $\\simplify{{d}k^{b-1}/(sqrt(k^{2*b}+{a}))}$ we might realise that
\n\\[\\simplify{{d}k^{b-1}/(sqrt(k^{2*b}+{a}))<{d}k^{b-1}/(sqrt(k^{2*b}))={d}k^{b-1}/(k^{b})={d}/k}\\]
\nhowever, $\\sum \\simplify{{d}/k}$ is divergent (it is a scalar multiple of the harmonic series or a $p$-series with $p=1$) and given the direction of the inequality we can't use the comparison test to test these two series. But, lets try something else:
\n\\[\\simplify{{d}k^{b-1}/(sqrt(k^{2*b}+{a}))>{d}k^{b-1}/(sqrt(k^{2*b}+{a}k^{2*b}))={d}k^{b-1}/(sqrt({a+1}k^{2*b}))={d}k^{b-1}/(sqrt({a+1})k^{b})={d}/(sqrt({a+1})k)}\\]
\nNotice, $\\sum_{k=\\var{start}}^\\infty \\simplify{{d}/(sqrt({a+1})k)}$ is a divergent series (it is a scalar multiple of the harmonic series or a $p$-series with $p=1$) and so our series is too.
\nIn the denominator of {cexpression} the dominant term is $\\var{d}^k$, so we will compare our series with $\\sum_{k=\\var{start}}^\\infty\\frac{\\var{a}}{\\var{d}^k}$ which is the same as $\\sum_{k=\\var{start}}^\\infty\\var{a}\\left(\\frac{1}{\\var{d}}\\right)^k$ and so is a convergent geometric series with common ratio $r=\\frac{1}{\\var{d}}$. Now for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{a}/({d}^k+{f})<{a}/({d}^k)}\\]
\nand therefore our series is also convergent.
\nNotice that $0\\le \\cos^2(k)\\le 1$ and so for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{b}cos(k)^2/({d}{a}^k)<={b}/({d}{a}^k)}\\]
\nAlso notice, $\\sum_{k=\\var{start}}^\\infty \\frac{\\var{b}}{\\var{d}\\times\\var{a}^k}$ is a convergent $p$-series with with $p=\\var{a}$. Therefore our series is also convergent.
\nNotice that $0\\le \\sin^2(k)\\le 1$ and so for $k\\ge\\var{start}$ we definitely have
\n\\[\\simplify{{b}sin(k)^2/({d}*{a}^k)<={b}/({d}*{a}^k)}\\]
\nAlso notice, $\\sum_{k=\\var{start}}^\\infty \\frac{\\var{b}}{\\var{d}\\times\\var{a}^k}$ is a convergent $p$-series with with $p=\\var{a}$. Therefore our series is also convergent.
\n", "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question"}, {"name": "ratio test - medium", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "ratio test question
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "Decide whether the following series converges:
", "advice": "a) Apply ratio test
\n\\[\\displaystyle\\lim_{n\\to \\infty} \\frac{\\frac{(n+1)^2+2(n+1)+1}{3^{n+1} + 2}}{\\frac{n^2+2n+1}{3^{n} + 2}} =
\\lim_{n\\to \\infty}\\left( \\frac{(n+1)^2+2(n+1)+1}{3^{n+1} + 2}\\cdot\\frac{ 3^{n} + 2}{n^2+2n+1}\\right)
= \\lim_{n\\to \\infty}\\left( \\frac{(n+1)^2+2(n+1)+1}{n^2+2n+1}\\cdot\\frac{ 3^{n} + 2}{3^{n+1 } + 2}\\right)
=\\frac{1}{3}.\\]
Since the limit is less than $1$, the series is convergent.
\n\nb)
\nApply ratio test
\n\\[\\displaystyle\\lim_{n\\to \\infty} \\frac{\\frac{(n+1)^2+2(n+1)+1}{(n+1)!}}{\\frac{n^2+2n+1}{n!}} =
\\lim_{n\\to \\infty}\\left( \\frac{(n+1)^2+2(n+1)+1}{(n+1)!}\\cdot\\frac{ n!}{n^2+2n+1}\\right)
= \\lim_{n\\to \\infty}\\left( \\frac{(n+1)^2+2(n+1)+1}{n^2+2n+1}\\cdot\\frac{ n!}{(n+1)!}\\right)
=\\lim_{n\\to \\infty}\\frac{1}{n} = 0.\\]
Since the limit is less than $1$, the series is convergent.
\n\nc)
\nApply ratio test
\n\\[\\displaystyle\\lim_{n\\to \\infty} \\frac{\\frac{(2(n+1)+1)}{5^{n+1}((n+1)!)^2}}{\\frac{(2n+1)}{5^{n}(n!)^2}} =
\\lim_{n\\to \\infty}\\left( \\frac{(2(n+1)+1)}{5^{n+1}((n+1)!)^2}\\cdot\\frac{5^{n}(n!)^2}{2n+1 }\\right)
= \\lim_{n\\to \\infty}\\left( \\frac{2(n+1)+1}{2n+1}\\cdot\\frac{ 5^{n}(n!)^2}{5^{n+1}((n+1)!)^2}\\right)
=\\lim_{n\\to \\infty}\\frac{1}{5n^2} = 0.\\]
Since the limit is less than $1$, the series is convergent.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "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": "$\\displaystyle\\sum_{n=1}^\\infty \\frac{n^2+2n+1}{3^n +2}$
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["converges", "diverges"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "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": "$\\displaystyle\\sum_{n=1}^\\infty \\frac{n^2+2n+1}{n!}$
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["converges", "diverges"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "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": "$\\displaystyle\\sum_{n=1}^\\infty \\frac{(2n+1)!}{5^n (n!)^2}$
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["converges", "diverges"], "matrix": ["1", 0], "distractors": ["", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "alternating series 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "alternating series
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "Decide whether the following series is convergent or not
", "advice": "It may not seem immediate, but we can use alternating series test. It is more visable when we write the first few terms of the series.
\n\\[\\displaystyle\\sum_{n=2}^\\infty \\left( \\frac{1}{\\sqrt[\\var{m}]{n}-1} - \\frac{1}{\\sqrt[\\var{m}]{n}+1}\\right) =
\\frac{1}{\\sqrt[\\var{m}]{2}-1} - \\frac{1}{\\sqrt[\\var{m}]{2}+1} + \\frac{1}{\\sqrt[\\var{m}]{3}-1} - \\frac{1}{\\sqrt[\\var{m}]{3}+1}
=\\frac{1}{\\sqrt[\\var{m}]{4}-1} - \\frac{1}{\\sqrt[\\var{m}]{4}+1} + \\ldots\\]
It is clear that this is an alternating series where we are summing the terms of the sequence
\n\\[u_n =\\left\\lbrace \\begin{array}{rl}
\\frac{1}{\\sqrt[\\var{m}]{n}-1}, &\\mbox{ if $n$ is even}\\\\
-\\frac{1}{\\sqrt[\\var{m}]{n-1}+1}, &\\mbox{ if $n$ is odd}
\\end{array}
\\right .\\]
with $n\\geq 2$.
\n\nWe need to check that $|u_{n+1}|\\leq |u_n|$. We have two cases:
\nFinally, we need to check that $\\displaystyle\\lim_{n\\to\\infty}u_n = 0$. Let $\\varepsilon>0$. Take $N > \\left(\\frac{1}{\\varepsilon} + 1\\right)^{\\var{m}} $. Then for all $n>N$ we get
\nThen by alternating series test, $\\displaystyle\\sum_{n=2}^\\infty \\left( \\frac{1}{\\sqrt[\\var{m}]{n}-1} - \\frac{1}{\\sqrt[\\var{m}]{n}+1}\\right)$ converges
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "random(list(2..9))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["m"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "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": "$\\displaystyle\\sum_{n=2}^\\infty \\left( \\frac{1}{\\sqrt[\\var{m}]{n}-1} - \\frac{1}{\\sqrt[\\var{m}]{n}+1}\\right)$
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["converges", "diverges"], "matrix": ["1", 0], "distractors": ["", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "alternating p-series", "extensions": [], "custom_part_types": [{"source": {"pk": 135, "author": {"name": "Daniella Leloch", "pk": 10165}, "edit_page": "/part_type/135/edit"}, "name": "Daniella's copy of True or False", "short_name": "daniella-s-copy-of-true-or-false", "description": "The student must write T or True for 'true', or F or False for 'false'. (Case doesn't matter)
", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "if(eval(settings[\"is_true\"]),settings[\"true_words\"][0],settings[\"false_words\"][0])", "hint": {"static": true, "value": ""}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(interpreted_answer);\napply(is_correct)\n\ninterpreted_answer:\nswitch(\n cleaned_studentAnswer in true_words,\n true,\n cleaned_studentAnswer in false_words,\n false,\n // otherwise\n warn(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0]);\n fail(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0])\n)\n\n\nis_correct:\ncorrectif(interpreted_answer=should_be_true)\n\ntrue_words:\nmap(lower(trim(x)),x,settings[\"true_words\"])\n\nfalse_words:\nmap(lower(trim(x)),x,settings[\"false_words\"])\n\ncleaned_studentAnswer:\nlower(trim(studentAnswer))\n\nshould_be_true:\neval(settings[\"is_true\"])", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(interpreted_answer);\napply(is_correct)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "switch(\n cleaned_studentAnswer in true_words,\n true,\n cleaned_studentAnswer in false_words,\n false,\n // otherwise\n warn(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0]);\n fail(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0])\n)\n"}, {"name": "is_correct", "description": "", "definition": "correctif(interpreted_answer=should_be_true)"}, {"name": "true_words", "description": "", "definition": "map(lower(trim(x)),x,settings[\"true_words\"])"}, {"name": "false_words", "description": "", "definition": "map(lower(trim(x)),x,settings[\"false_words\"])"}, {"name": "cleaned_studentAnswer", "description": "", "definition": "lower(trim(studentAnswer))"}, {"name": "should_be_true", "description": "", "definition": "eval(settings[\"is_true\"])"}], "settings": [{"name": "is_true", "label": "Is the answer 'true'?", "help_url": "", "hint": "An expression which evaluates totrue
or false
.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}, {"name": "true_words", "label": "Words to interpret as 'true'", "help_url": "", "hint": "Any of the words in this list will be interpreted as \"True\"", "input_type": "list_of_strings", "default_value": ["T", "True"], "subvars": true}, {"name": "false_words", "label": "Words to interpret as 'false'", "help_url": "", "hint": "Any of the words in this list will be interpreted as \"False\".", "input_type": "list_of_strings", "default_value": ["F", "False"], "subvars": true}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "Decide whether the series converges or not
", "advice": "Notice that this is an alternating series. We can use alternating series test.
\nThen by alternating series test the series is convergent
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"p": {"name": "p", "group": "Ungrouped variables", "definition": "random(1 .. 5#0.3)", "description": "", "templateType": "randrange", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p"], "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": "$\\displaystyle\\sum_{n=1}^\\infty \\frac{(-1)^{n+1}}{n^\\var{p}}$
\n[[0]]
", "gaps": [{"type": "daniella-s-copy-of-true-or-false", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"is_true": "true", "true_words": ["T", "True"], "false_words": ["F", "False"]}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "absolute convergence 1", "extensions": [], "custom_part_types": [{"source": {"pk": 135, "author": {"name": "Daniella Leloch", "pk": 10165}, "edit_page": "/part_type/135/edit"}, "name": "Daniella's copy of True or False", "short_name": "daniella-s-copy-of-true-or-false", "description": "The student must write T or True for 'true', or F or False for 'false'. (Case doesn't matter)
", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "if(eval(settings[\"is_true\"]),settings[\"true_words\"][0],settings[\"false_words\"][0])", "hint": {"static": true, "value": ""}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(interpreted_answer);\napply(is_correct)\n\ninterpreted_answer:\nswitch(\n cleaned_studentAnswer in true_words,\n true,\n cleaned_studentAnswer in false_words,\n false,\n // otherwise\n warn(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0]);\n fail(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0])\n)\n\n\nis_correct:\ncorrectif(interpreted_answer=should_be_true)\n\ntrue_words:\nmap(lower(trim(x)),x,settings[\"true_words\"])\n\nfalse_words:\nmap(lower(trim(x)),x,settings[\"false_words\"])\n\ncleaned_studentAnswer:\nlower(trim(studentAnswer))\n\nshould_be_true:\neval(settings[\"is_true\"])", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(interpreted_answer);\napply(is_correct)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "switch(\n cleaned_studentAnswer in true_words,\n true,\n cleaned_studentAnswer in false_words,\n false,\n // otherwise\n warn(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0]);\n fail(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0])\n)\n"}, {"name": "is_correct", "description": "", "definition": "correctif(interpreted_answer=should_be_true)"}, {"name": "true_words", "description": "", "definition": "map(lower(trim(x)),x,settings[\"true_words\"])"}, {"name": "false_words", "description": "", "definition": "map(lower(trim(x)),x,settings[\"false_words\"])"}, {"name": "cleaned_studentAnswer", "description": "", "definition": "lower(trim(studentAnswer))"}, {"name": "should_be_true", "description": "", "definition": "eval(settings[\"is_true\"])"}], "settings": [{"name": "is_true", "label": "Is the answer 'true'?", "help_url": "", "hint": "An expression which evaluates totrue
or false
.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}, {"name": "true_words", "label": "Words to interpret as 'true'", "help_url": "", "hint": "Any of the words in this list will be interpreted as \"True\"", "input_type": "list_of_strings", "default_value": ["T", "True"], "subvars": true}, {"name": "false_words", "label": "Words to interpret as 'false'", "help_url": "", "hint": "Any of the words in this list will be interpreted as \"False\".", "input_type": "list_of_strings", "default_value": ["F", "False"], "subvars": true}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "question involving caomparison test and absolute convergence
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "Decide on the convergence of the following series
", "advice": "First of all observe that this is an alternating series.
\nWhen $n$ is even we have $\\var{p}(-1)^n + \\var{k} = \\simplify{{p} + {k}}$, and when $n$ is odd $\\var{p}(-1)^n + \\var{k} = \\simplify{-{p} + {k}}$.
\nTherefore, when $n$ is even we have
\n\\[ [\\var{p}(-1)^n + \\var{k}] \\frac{1}{\\var{t}n + 1}\\left(\\frac{1}{\\var{j}}\\right)^n = \\frac{\\simplify{{p} + {k}}}{(\\var{t}n+1)\\var{j}^n}, \\]
\nand when $n$ is odd
\n\\[ [\\var{p}(-1)^n + \\var{k}] \\frac{1}{\\var{t}n + 1}\\left(\\frac{1}{\\var{j}}\\right)^n = \\frac{\\simplify{-{p} + {k}}}{(\\var{t}n+1)\\var{j}^n}. \\]
\nHence
\n\\[ \\left| [\\var{p}(-1)^n + \\var{k}] \\frac{1}{\\var{t}n + 1}\\left(\\frac{1}{\\var{j}}\\right)^n \\right| < \\frac{\\simplify{{p} + {k}}}{(\\var{t}n+1)\\var{j}^n}. \\]
\n\nNow, let us look at the series $\\displaystyle\\sum_{n=1}^\\infty \\frac{\\simplify{{p} + {k}}}{(\\var{t}n+1)\\var{j}^n}$. Observe that
\n\\[\\frac{\\simplify{{p} + {k}}}{(\\var{t}n+1)\\var{j}^n} < \\frac{\\simplify{{p} + {k}}}{\\var{j}^n}.\\]
\nBut we know that $\\displaystyle\\sum_{n=1}^\\infty \\frac{\\simplify{{p} + {k}}}{\\var{j}^n}$ is convergent (In fact one needs to show this. But it can be done easily).
\nThen by Comparison Test, $\\displaystyle\\sum_{n=1}^\\infty \\frac{\\simplify{{p} + {k}}}{(\\var{t}n+1)\\var{j}^n}$ is convergent.
\nThat in turn implies, again by comparison test, that $\\displaystyle\\sum_{n=1}^\\infty \\left| [\\var{p}(-1)^n + \\var{k}] \\frac{1}{\\var{t}n + 1}\\left(\\frac{1}{\\var{j}}\\right)^n \\right|$ is convergent.
\nHence, $\\displaystyle\\sum_{n=1}^\\infty [\\var{p}(-1)^n + \\var{k}] \\frac{1}{\\var{t}n + 1}\\left(\\frac{1}{\\var{j}}\\right)^n $ is absolutely convergent. So, it is convergent.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"p": {"name": "p", "group": "Ungrouped variables", "definition": "random(k+1..8)", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1 .. 9#1)", "description": "", "templateType": "randrange", "can_override": false}, "j": {"name": "j", "group": "Ungrouped variables", "definition": "random(2 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p", "k", "t", "j"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "daniella-s-copy-of-true-or-false", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\displaystyle\\sum_{n=1}^\\infty [\\var{p}(-1)^n + \\var{k}]\\frac{1}{\\var{t}n + 1}\\left(\\frac{1}{\\var{j}}\\right)^n$
", "settings": {"is_true": "true", "true_words": ["T", "True"], "false_words": ["F", "False"]}}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "extensions": [], "custom_part_types": [{"source": {"pk": 135, "author": {"name": "Daniella Leloch", "pk": 10165}, "edit_page": "/part_type/135/edit"}, "name": "Daniella's copy of True or False", "short_name": "daniella-s-copy-of-true-or-false", "description": "The student must write T or True for 'true', or F or False for 'false'. (Case doesn't matter)
", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "if(eval(settings[\"is_true\"]),settings[\"true_words\"][0],settings[\"false_words\"][0])", "hint": {"static": true, "value": ""}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(interpreted_answer);\napply(is_correct)\n\ninterpreted_answer:\nswitch(\n cleaned_studentAnswer in true_words,\n true,\n cleaned_studentAnswer in false_words,\n false,\n // otherwise\n warn(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0]);\n fail(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0])\n)\n\n\nis_correct:\ncorrectif(interpreted_answer=should_be_true)\n\ntrue_words:\nmap(lower(trim(x)),x,settings[\"true_words\"])\n\nfalse_words:\nmap(lower(trim(x)),x,settings[\"false_words\"])\n\ncleaned_studentAnswer:\nlower(trim(studentAnswer))\n\nshould_be_true:\neval(settings[\"is_true\"])", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(interpreted_answer);\napply(is_correct)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "switch(\n cleaned_studentAnswer in true_words,\n true,\n cleaned_studentAnswer in false_words,\n false,\n // otherwise\n warn(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0]);\n fail(\"Write \"+settings[\"true_words\"][0]+\" or \"+settings[\"false_words\"][0])\n)\n"}, {"name": "is_correct", "description": "", "definition": "correctif(interpreted_answer=should_be_true)"}, {"name": "true_words", "description": "", "definition": "map(lower(trim(x)),x,settings[\"true_words\"])"}, {"name": "false_words", "description": "", "definition": "map(lower(trim(x)),x,settings[\"false_words\"])"}, {"name": "cleaned_studentAnswer", "description": "", "definition": "lower(trim(studentAnswer))"}, {"name": "should_be_true", "description": "", "definition": "eval(settings[\"is_true\"])"}], "settings": [{"name": "is_true", "label": "Is the answer 'true'?", "help_url": "", "hint": "An expression which evaluates totrue
or false
.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}, {"name": "true_words", "label": "Words to interpret as 'true'", "help_url": "", "hint": "Any of the words in this list will be interpreted as \"True\"", "input_type": "list_of_strings", "default_value": ["T", "True"], "subvars": true}, {"name": "false_words", "label": "Words to interpret as 'false'", "help_url": "", "hint": "Any of the words in this list will be interpreted as \"False\".", "input_type": "list_of_strings", "default_value": ["F", "False"], "subvars": true}], "public_availability": "always", "published": true, "extensions": []}], "resources": []}