// Numbas version: exam_results_page_options {"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 to true 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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "absolute convergence 1", "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. 

\n

When $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}}$.

\n

Therefore, 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}, \\]

\n

and 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}. \\]

\n

Hence 

\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

\n

Now, 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}.\\]

\n

But 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). 

\n

Then by Comparison Test, $\\displaystyle\\sum_{n=1}^\\infty \\frac{\\simplify{{p} + {k}}}{(\\var{t}n+1)\\var{j}^n}$ is convergent. 

\n

That 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.  

\n

Hence, $\\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": {}, "extensions": [], "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", "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}]}]}], "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}]}