// Numbas version: exam_results_page_options {"name": "Series: alternating series", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["con", "id", "expression", "start", "con_to_zero", "div_to_inf", "con_to_non_zero", "div", "a", "d", "l", "b", "c", "f", "g", "p"], "extensions": [], "functions": {}, "rulesets": {}, "tags": [], "advice": "

An alternating series is a series that can be written as an alternating sum of postive and negative terms, for example

\n

\$\\sum_{n=1}^\\infty (-1)^{n} b_n \\text{ with } b_n>0\$

\n

or

\n

\$\\sum_{n=1}^\\infty (-1)^{n-1} b_n \\text{ with } b_n>0\$

\n

Note: some texts prefer to start the series as $n=0$ and also note that $(-1)^{n-1}=(-1)^{n+1}$.

\n

\n

Our series definitely has an alternating sign with positive $b_k$ (you should check this), although our index $k$ starts at $\\var{start}$. We can think of this as starting a finite number of terms further along in the series (which will not affect whether the series converges or diverges) or we could rewrite the series by using the substitution $n=k-\\var{start-1}$ so that the index starts at $1$. Therefore our series is, in fact, an alternating series

\n

\n

The alternating series $\\sum_{n=1}^\\infty (-1)^{n} b_n$, with $b_n>0$, converges if $b_{n+1}\\le b_n$ for all $n$ and $\\lim_{n\\rightarrow\\infty}b_n=0$. Better than that, we actually only need the $b_n$ to eventually  monotonically decrease and converge to $0$. That is, if there exist an $N$ such that $b_{n+1}\\le b_n$ for all $n>N$ and $\\lim_{n\\rightarrow\\infty}b_n=0$, then the alternating series converges.

\n

\n

#### Examples of determining whether the $b_k$ are eventually monotonically decreasing

\n

With some alternating series, it is easy enough to prove that $b_{n+1}\\le b_n$ for all $n$ algebraically (or prove that it is not!).

\n

For example, if we had $b_k=\\simplify{k!/(k+{a})!}$ then

\n

\\\begin{align}b_{k}-b_{k+1}&=\\frac{k!}{(k+\\var{a})!}-\\frac{(k+1)!}{(k+\\var{a+1})!}\\\\&=\\frac{k!(k+\\var{a+1})}{(k+\\var{a})!(k+\\var{a+1})}--\\frac{(k+1)!}{(k+\\var{a+1})!}\\\\&=\\frac{k!(k+\\var{a+1})}{(k+\\var{a+1})!}-\\frac{(k+1)!}{(k+\\var{a+1})!}\\\\&=\\frac{k!(k+\\var{a+1})-(k+1)!}{(k+\\var{a+1})!}\\\\&=\\frac{k!((k+\\var{a+1})-(k+1))}{(k+\\var{a+1})!}\\\\&=\\frac{k!\\var{a}}{(k+\\var{a+1})!}\\\\&\\ge0\\end{align}\

\n

But if that isn't easily done, for example, if we had $b_k=\\simplify{({a}k-{b})/((k-{c})*(k-{f}))}$, then we consider the related function $f(x)=\\simplify{({a}x-{b})/((x-{c})*(x-{f}))}$. We differentiate it with respect to $x$ and determine when this derivative is negative, since this is when the function (and hence the sequence of $b_k$) is decreasing. For example, using the quotient rule of differentiation we find $f'(x)=\\simplify{({-a}x^2+{2b}x+{a*c*f-b*f-b*c})/((x-{c})^2(x-{f})^2)}$. The denominator is always non-negative (although note that $x$, and hence $k$, can not be $\\var{c}$ or $\\var{f}$) so we really just need to ensure that the denominator becomes and stays less than or equal to zero. Which it certainly does, since it is a quadratic with a negative leading term!

\n

During any of these two approaches you might find that your series does not eventually decrease monotonically. You should still do the next step (and determine if the limit of the $b_k$ equals zero) regardless because if it isn't, then by the divergence test your series diverges.

\n

\n

#### Examples of determining whether the $b_k$ converge to $0$

\n

Recall to take the limit as $k\\rightarrow\\infty$ of a rational expression such as $\\simplify{({a}k-{b})/({d}k-{c})}$ we divide the numerator and denominator by the highest power of $k$ and then take the limit. That is:

\n

\\\begin{align}\\lim_{k\\rightarrow\\infty}\\simplify{({a}k-{b})/({d}k-{c})}&=\\lim_{k\\rightarrow\\infty} \\left(\\frac{\\var{a}+\\frac{\\var{-b}}{k}}{\\var{d}+\\frac{\\var{-c}}{k}}\\right)\\\\&=\\frac{\\lim_{k\\rightarrow\\infty} \\left(\\var{a}+\\frac{\\var{-b}}{k}\\right)}{\\lim_{k\\rightarrow\\infty} \\left(\\var{d}+\\frac{\\var{-c}}{k}\\right)}\\\\&=\\frac{\\var{a}+\\lim_{k\\rightarrow\\infty} \\left(\\frac{\\var{-b}}{k}\\right)}{\\var{d}+\\lim_{k\\rightarrow\\infty} \\left(\\frac{\\var{-c}}{k}\\right)}\\\\&=\\frac{\\var{a}}{\\var{d}}\\end{align}\

\n

And so we would conclude using the divergence test that this series diverges.

\n

For other functions you might need to fall back on your knowledge of the graph of the function, for example you might be able to sketch the inverse of $\\tan$, that is $y=\\arctan(x)$, and so you would see that the $\\lim_{x\\rightarrow\\infty}\\arctan(x)=\\frac{\\pi}{2}$, and so if your $b_k$ were $\\arctan(k)$ then you would know the series diverges (again by the divergence test).

\n

\n

\n

For your series $\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}, the $b_k$ are eventually monotonically decreasing and converge to $0$ as $k\\rightarrow\\infty$ and therefore by the alternating series test this alternating series converges.

\n

For your series $\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}, the $b_k$ diverge to infinity as $k\\rightarrow\\infty$ and so the alternating series test doesn't tell us anything. However, the divergence test tells us that this alternating series diverges.

\n

For your series $\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}, the $b_k$ diverge (they do not tend to a single number) as $k\\rightarrow\\infty$ and so the alternating series test doesn't tell us anything. However, the divergence test tells us that this alternating series diverges.

\n

For your series $\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}, the $b_k$ converge to $\\simplify[fractionNumbers]{{d/2}pi}$ as $k\\rightarrow\\infty$ and so the alternating series test doesn't tell us anything. However, the divergence test tells us that this alternating series diverges.

\n

For your series $\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}, the $b_k$ converge to $\\simplify[fractionNumbers]{{a/d}}$ as $k\\rightarrow\\infty$ and so the alternating series test doesn't tell us anything. However, the divergence test tells us that this alternating series diverges.

\n

For your series $\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}, the $b_k$ converge to $1$ as $k\\rightarrow\\infty$ and so the alternating series test doesn't tell us anything. However, the divergence test tells us that this alternating series diverges.

\n

", "preamble": {"css": "", "js": ""}, "variable_groups": [], "name": "Series: alternating series", "parts": [{"scripts": {}, "prompt": "

This is a [] [].

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "gaps": [{"distractors": ["", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "shuffleChoices": false, "minMarks": 0, "displayColumns": 0, "choices": ["

convergent

", "

divergent

"], "variableReplacements": [], "showCorrectAnswer": true, "displayType": "dropdownlist", "type": "1_n_2", "matrix": ["if(con=1,1,0)", "if(con=0,1,0)"], "maxMarks": 0}, {"distractors": ["", "", "", "", "", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "shuffleChoices": true, "minMarks": 0, "displayColumns": 0, "choices": ["

p series

", "

geometric series

", "

arithmetic series

", "

alternating series

", "

Maclaurin series

", "

Taylor series

"], "variableReplacements": [], "showCorrectAnswer": true, "displayType": "dropdownlist", "type": "1_n_2", "matrix": ["0", "0", 0, "1", 0, 0], "maxMarks": 0}], "type": "gapfill"}], "variables": {"div": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "div", "definition": "[\n \"\\$\\\\displaystyle\\\\simplify{(-1)^k*abs(sin(k))}\\$\", //id=18\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*abs(tan(k))}\\$\" //id=19\n \"\\$\\\\displaystyle\\\\simplify{(-1)^k*abs(cos(k))}\\$\", //id=20 \n ]"}, "l": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "l", "definition": "shuffle([-2,-3,-5,-7,-11,-13,-17])"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c", "definition": "l"}, "g": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g", "definition": "l"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a", "definition": "random(2,3,5,7,11,13,17)"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d", "definition": "random([2,3,5,7,11,13,17] except a)"}, "div_to_inf": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "div_to_inf", "definition": "[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({d}*k-{b})/{a}}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/{a}}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*(k+{a})!/k!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/{a}^k}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*(k-{c})(k-{f})/({a}k-{b})}\\$\"\n]"}, "p": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "p", "definition": "random([1/3,2/3,1/4,3/4,1/5])"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "description": "

b

", "name": "b", "definition": "l"}, "con_to_non_zero": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "con_to_non_zero", "definition": "[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{d}*arctan(k)}\\$\",//id=15\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k-{b})/({d}k-{c})}\\$\", //id=16 \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*(k-{c})(k-{f})/((k-{b})*(k-{d}))}\\$\" //id=17\n]"}, "start": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "start", "definition": "random(2..7)"}, "con_to_zero": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "con_to_zero", "definition": "[\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}/({d}*k-{b})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}/k!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*k!/(k+{a})!}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}^k/k!}\\$\", \n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*({a}k-{b})/((k-{c})*(k-{f}))}\\$\",\n\"\\$\\\\displaystyle\\\\simplify{(-1)^k*{a}/root(k,{d})}\\$\",\n\"\\$\\\\displaystyle\\\\simplify[fractionNumbers]{(-1)^k*{a}/k^{p}}\\$\" \n]"}, "expression": {"group": "Ungrouped variables", "templateType": "anything", "description": "

id:=if(con=1,random(0..4),random(10..19))

", "name": "expression", "definition": "if(con=1,con_to_zero[id],\n if(id<15,div_to_inf[id-10],\n if(id<18,con_to_non_zero[id-15],\n div[id-18])))"}, "id": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "id", "definition": "if(con=1,random(0..5),random(10..20))"}, "con": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "con", "definition": "random(0,1)"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "f", "definition": "l"}}, "metadata": {"description": "

This question tests to see if students can recognise an alternating series and based on the alternating series test and the divergence test determine if it is convergent or divergent.

\n

\n

At the moment there is no example included with $b_n\\rightarrow 0$ which isn't eventually monotonically convergent.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

You are given the series

\n

$\\displaystyle\\sum_{k=\\var{start}}^\\infty${expression}

\n

", "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}