// Numbas version: finer_feedback_settings {"name": "Solution in the Bloodstream", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Solution in the Bloodstream", "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

The differential equation for $y_2(t)$ is:

\n

$\\frac{dy_2}{dt} = k_a y_1 - k_c y_2$

\n

Substituting $y_1(t) = c_0 e^{-k_at}$ into the differential equation for $y_2(t)$ we obtain:

\n

$\\frac{dy_2}{dt} = k_ac_0e^{-k_a t} - k_cy_2$

\n

We can define a test solution of the form:

\n

$y_2(t) = A e^{-k_a t} + B e^{-k_c t}$

\n

where $A$ and $B$ are constants to be determine.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"c_0": {"name": "c_0", "group": "Ungrouped variables", "definition": "random(150 .. 550#1)", "description": "", "templateType": "randrange"}, "k_a": {"name": "k_a", "group": "Ungrouped variables", "definition": "random(0.05 .. 0.25#0.01)", "description": "", "templateType": "randrange"}, "k_c": {"name": "k_c", "group": "Ungrouped variables", "definition": "random(0.3 .. 2.7#0.01)", "description": "", "templateType": "randrange"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c_0", "k_a", "k_c"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Substitute the test solution into the right-hand side of the differential equation for $y_2(t)$. 

\n

Tips: Use an underscore to represent a subscript. Use '*' to represent multiplication. Use 'exp()' to represent an exponential.

", "answer": "k_a c_0 exp(-k_a t)-k_c A exp(-k_a t) - k_c B exp(-k_c t)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "c_0", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}, {"name": "t", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Differentiate the test solution to obtain $\\frac{dy_2}{dt}$.

", "answer": "-k_a A exp(-k_a t) - k_c B exp(-k_c t)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}, {"name": "t", "value": ""}]}, {"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": "

Set the derivative of the test solution equal to the answer from part a so that you have an expression involving $A$, $B$, $e^{-k_a t}$, $e^{-k_c t}$ on both left- and right-hand sides. You should see the term $c_0$ appear exactly once, on the right-hand side.

\n

[[0]] = [[1]]

", "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": "-k_a A exp(-k_a t) - k_c B exp(-k_c t)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}, {"name": "t", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "k_a c_0 exp(-k_a t) - k_c A exp(-k_a t) - k_c B exp(-k_c t)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "c_0", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}, {"name": "t", "value": ""}]}], "sortAnswers": false}, {"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": "

Factorise the above equation by grouping all terms involving $e^{-k_at}$ together on each side, and all terms involving $e^{-k_ct}$ together on each side.

\n

\n

$e^{-k_a t}\\times$[[0]]$+e^{-k_c t} \\times$[[1]] $ = e^{-k_a t}\\times$ [[2]] $+e^{-k_ct}\\times$ [[3]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "k_a A", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "k_a", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "k_c B", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "b", "value": ""}, {"name": "k_c", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "k_c A - k_a c_0", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "c_0", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}]}, {"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": "k_c B", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "b", "value": ""}, {"name": "k_c", "value": ""}]}], "sortAnswers": false}, {"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": "

Consider the terms multiplying by $e^{-k_a t}$ on each side. These terms inside the brackets on each side must be equal in order for the solution to be valid.

\n

Setting the left-hand group with $e^{-k_a t}$ equal to the right-hand group with $e^{-k_a t}$, determine a function for $A$.

\n

A = [[0]]

\n

Using your values of $k_a = ${k_a}, $k_c = ${k_c} and $c_0 = ${c_0}, calculate the value of $A$.

\n

A = [[1]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-k_a c_0)/(k_a - k_c)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c_0", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{k_a}*{c_0}/({k_c}-{k_a})", "maxValue": "{k_a}*{c_0}/({k_c}-{k_a})", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "information", "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": "

We cannot use the same technique to solve for $B$, unfortunately. We will use our initial condition for $y_2(t)$ to obtain $B$ instead. 

"}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Substitute the function you found for $A$ into the test solution and solve for $B$ as a function of the parameters $k_a$, $k_c$, and $c_0$.

\n

As a reminder, the test solution is:

\n

$$y_2(t) = A e^{-k_a t} + B e^{-k_c t}$$.

", "answer": "(k_a c_0)/(k_a - k_c)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c_0", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Substitute the functions for $A$ and $B$ into the test solution to obtain $y_2(t)$.

", "answer": "(k_a c_0)/(k_c-k_a)*(exp(-k_a t) - exp(-k_c t))", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c_0", "value": ""}, {"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}, {"name": "t", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

For what value for $t$ is the amount of Theophylline in the bloodstream maximised? Note: Answer as a function of the parameters $k_a$, $k_c$ and $c_0$. 

", "answer": "(ln(k_c) -ln(k_a))/(k_c - k_a)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "k_a", "value": ""}, {"name": "k_c", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Belinda Spratt", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7204/"}], "resources": []}]}], "contributors": [{"name": "Belinda Spratt", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7204/"}]}