// Numbas version: exam_results_page_options {"name": "Integration: Solving Separable Differential Equations - Population Growth", "extensions": ["stats", "geogebra", "random_person", "chemistry", "programming"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Integration: Solving Separable Differential Equations - Population Growth", "tags": [], "metadata": {"description": "

Solving a separable differential equation that describes the population growth over time with a known initial condition to calculate the population after $n$ years. 

", "licence": "None specified"}, "statement": "

A population of $N$ individuals grows over time, $t$ years, according to the equation:
$\\frac{\\mathrm{d}N}{\\mathrm{d}t}=\\left(\\var{a}+ e^{\\simplify{-{b}t}}\\right)N $

\n

At time $t=0$, the population contains $\\var{N}$ individuals.

", "advice": "

To calculate the population $\\var{N}$ years later, we need an expression for how the population, $N$, changes in terms of time, $t$. This is given by the differential equation,

\n

\\[ \\frac{dN}{dt}=\\left(\\var{a}+ e^{\\simplify{-{b}t}}\\right)N \\]

\n

which we can solve using separation of variables.

\n

First, we need to separate the variables between the two sides:

\n

\\[ \\frac{1}{N}dN=\\left( \\var{a}+e^{\\simplify{-{b}t}}\\right)dt \\]

\n

Now, we integrate both sides:

\n

\\[ \\begin{split} \\int\\frac{1}{N}dN &=\\int\\left( \\var{a}+e^{\\simplify{-{b}t}}\\right)dt \\\\ \\ln{N} &= \\simplify{{a}*t}+\\left(-\\simplify{1/{b}*e}^{\\simplify{-{b}t}}\\right)+c \\\\ \\ln{N} &= \\simplify{{a}*t}-\\simplify{1/{b}*e}^{\\simplify{-{b}t}}+c \\end{split} \\]

\n

To find the value of $c$, we can use the fact that when $t=0$, $N=\\var{N}$. By substituting in the values in the equation we get:

\n

\\[ \\begin{split} \\ln(\\var{N}) &= \\var{a} \\times 0-\\simplify{1/{b}*e}^{-\\simplify{{b}* 0}}+c \\\\ \\ln(\\var{N}) &= -\\simplify{1/{b}*e}^{0}+c \\\\ \\ln(\\var{N}) &= -\\simplify{1/{b}* 1}+c \\\\ \\ln(\\var{N}) &= -\\simplify{1/{b}}+c \\\\ c&=\\simplify{ ln{{N}}+1/{b}}\\end{split} \\]

\n

Therefore $c=\\simplify{ln{{N}}+1/{b}}=\\var{c}$. So, 

\n

\\[ \\begin{split} \\ln({N}) &= \\simplify{{a}*t}-\\simplify{1/{b}*e}^{-\\simplify{{b}*t}}+\\simplify{ln{{N}}+1/{b}} \\end{split} \\]

\n

Taking the exponential of both sides:

\n

\\[ \\begin{split} N &= e^{\\simplify{{a}*t}-\\simplify{1/{b}e}^{-\\simplify{{b}*t}}+\\simplify{ln{{N}}+1/{b}}} \\end{split} \\]

\n

We can now substitute $t=\\var{t0}$ to calculate the population:

\n

\\[ \\begin{split} N &= e^{\\var{a} \\times \\var{t0}-\\simplify{1/{b}*e}^{-\\var{b} \\times \\var{t0}}+\\simplify{ln{{N}}+1/{b}}} \\\\ N&=\\var{step3} \\end{split} \\]

\n

Thus, the population $\\var{t0}$ years later will be $\\var{ans}$ individuals.

", "rulesets": {}, "extensions": ["chemistry", "geogebra", "programming", "random_person", "stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(50..500)", "description": "", "templateType": "anything", "can_override": false}, "t0": {"name": "t0", "group": "Ungrouped variables", "definition": "random(5..15)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "int (exp(a*t0-b^(-1)*exp(-b*t0)+c))", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "ln(n)+b^(-1)", "description": "", "templateType": "anything", "can_override": false}, "step1": {"name": "step1", "group": "Ungrouped variables", "definition": "exp(-b*t0)*b^(-1)", "description": "", "templateType": "anything", "can_override": false}, "step2": {"name": "step2", "group": "Ungrouped variables", "definition": "a*t0-step1+c", "description": "", "templateType": "anything", "can_override": true}, "step3": {"name": "step3", "group": "Ungrouped variables", "definition": "exp(step2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "(C>0)and(ans<1000000000)", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n", "t0", "ans", "C", "step1", "step2", "step3"], "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": "

How many individuals are in the population $\\var{t0}$ years later?

\n

The population is [[0]] individuals.

\n

If needed, round your answer to the nearest integer. 

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Evi Papadaki", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18113/"}]}]}], "contributors": [{"name": "Evi Papadaki", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18113/"}]}