// Numbas version: finer_feedback_settings {"name": "Geometric series - practical application", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"correctAnswerFraction": false, "maxValue": "precround({n}*{m}^{{dayn}-1},0)", "showCorrectAnswer": true, "marks": 1, "integerAnswer": true, "prompt": "
How long will Catherine's treatment be on day $\\var{dayn}$?
", "integerPartialCredit": 0, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "precround({n}*{m}^{{dayn}-1},0)"}, {"correctAnswerFraction": false, "maxValue": "precround({n}*{m}^{{dur}-1},0)", "showCorrectAnswer": true, "marks": 1, "integerAnswer": true, "prompt": "How long will Catherine's treatment be on day $\\var{dur}$?
", "integerPartialCredit": 0, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "precround({n}*{m}^{{dur}-1},0)"}, {"correctAnswerFraction": false, "maxValue": "precround(({n}*(1-{m}^{dur}))/(1-{m}),0)", "showCorrectAnswer": true, "marks": 1, "integerAnswer": true, "prompt": "How much time will she spend in total having this treatment for her eczema?
", "integerPartialCredit": 0, "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPrecisionHint": false, "variableReplacements": [], "type": "numberentry", "allowFractions": false, "minValue": "precround(({n}*(1-{m}^{dur}))/(1-{m}),0)"}], "name": "Geometric series - practical application", "question_groups": [{"pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered", "questions": []}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "statement": "A hospital offers Catherine a $\\var{dur}$-day course of ultraviolet light therapy for her eczema.
\nOn day $i$ of the course, she is to have $t_i$ seconds of treatment, where:
\n$t_i = \\var{n}\\times (\\simplify[all,fractionnumbers]{{m}})$$^{i-1}$
\nGive your answers to the following questions correct to the nearest second.
", "variablesTest": {"condition": "{dayn}<{dur}", "maxRuns": 100}, "ungrouped_variables": ["dur", "n", "m2", "m1", "m", "dayn"], "rulesets": {}, "functions": {}, "variables": {"n": {"templateType": "anything", "name": "n", "description": "", "group": "Ungrouped variables", "definition": "random(120..150)"}, "dur": {"templateType": "anything", "name": "dur", "description": "", "group": "Ungrouped variables", "definition": "random(30..50)"}, "m": {"templateType": "anything", "name": "m", "description": "", "group": "Ungrouped variables", "definition": "1+1/m1"}, "dayn": {"templateType": "anything", "name": "dayn", "description": "", "group": "Ungrouped variables", "definition": "random(5..30)"}, "m1": {"templateType": "anything", "name": "m1", "description": "", "group": "Ungrouped variables", "definition": "random(8..15)"}, "m2": {"templateType": "anything", "name": "m2", "description": "", "group": "Ungrouped variables", "definition": "random(4..9)"}}, "preamble": {"js": "", "css": ""}, "tags": [], "variable_groups": [], "type": "question", "advice": "a) Substitute in $i=\\var{dayn}$
\nb) Substitute in $i=\\var{dur}$
\nc) Using the following formulae for the sum of a geometric series: $S_n=\\displaystyle\\sum\\limits_{i=1}^na(r)^{i-1}=a\\left(\\frac{1-r^n}{1-r}\\right)$
\nWe can substitute the known values of the first term $a$, the common ratio $r$ and the total number of terms (or in this case days of treatment) $n$:
\n$\\displaystyle\\sum\\limits_{i=1}^\\var{dur}\\var{n}\\left(\\simplify[all,fractionnumbers]{{m}}\\right)^{i-1}=\\var{n}\\left(\\frac{1-(\\simplify[all,fractionnumbers]{{m}})^{\\var{dur}}}{1-(\\simplify[all,fractionnumbers]{{m}})}\\right)$
\n", "extensions": [], "showQuestionGroupNames": false, "contributors": [{"name": "", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/514/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/514/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}