// Numbas version: finer_feedback_settings {"name": "Classify fixed points of a 2D dynamical system", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Classify fixed points of a 2D dynamical system", "tags": ["checked2015"], "metadata": {"description": "

Nature of fixed points of a 2D dynamical system.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Consider the two-dimensional dynamical system

\n

\\[\\begin{align}\\dot{x}&=\\simplify[std]{{a}*x+{b}*y},\\\\\\dot{y}&=\\simplify[std]{{c}*x+{d}*y}.\\end{align}\\]

", "advice": "

a)

\n

The elements of the matrix $\\mathsf{A}$ are the coefficients of $x$ and $y$ in the system of equations, hence

\n

\\[\\mathsf{A}=\\pmatrix{\\var{a} & \\var{b}\\\\\\var{c} & \\var{d}}.\\]

\n

 

\n

b)

\n

The trace $\\tau$ and determinant $\\delta$ of a matrix

\n

\\[\\mathsf{A}=\\pmatrix{a & b\\\\c & d}\\]

\n

are given by $\\tau=a+d$ and $\\delta=ad-bc$.

\n

A straight forward substitution for $a=\\var{a}$, $b=\\var{b}$, $c=\\var{c}$, and $d=\\var{d}$ reveals that $\\tau=\\var{tau}$ and $\\delta=\\var{delta}$.

\n

 

\n

c)

\n

The eigenvalues $\\lambda$ of a matrix $\\mathsf{A}$ can be calculated from the expression

\n

\\[\\mathsf{A}\\boldsymbol{x}=\\lambda\\boldsymbol{x},\\]

\n

which is equivalent to

\n

\\[\\left(\\mathsf{A}-\\lambda\\mathsf{I}\\right)\\boldsymbol{x}=\\boldsymbol{0},\\]

\n

where $\\mathsf{I}$ is the identity matrix.

\n

This linear system has a solution only when

\n

\\[\\det\\left(\\mathsf{A}-\\lambda\\mathsf{I}\\right)=0,\\]

\n

i.e. when $(a-\\lambda)(d-\\lambda)-bc=0$.  This leads to $\\lambda^2-(a+d)\\lambda+(ad-bc)=0$, which is equivalent to

\n

\\[\\lambda^2-\\tau\\lambda+\\delta=0.\\]

\n

The eigenvalues $\\lambda_1$ and $\\lambda_2$ of the matrix $\\mathsf{A}$ are therefore given by

\n

\\[\\lambda_{1,2}=\\frac{\\tau\\pm\\sqrt{\\tau^2-4\\delta}}{2}.\\]

\n

Following through this calculation for the specific values of $a$, $b$, $c$, and $d$ in this question leads to $\\lambda_1=\\var{lam1}$ and $\\lambda_2=\\var{lam2}$.

\n

 

\n

d)

\n

The eigenvectors corresponding to the eigenvalues $\\lambda_1$ and $\\lambda_2$ can be found by solving the linear system of equations given by

\n

\\[\\mathsf{A}\\boldsymbol{x}=\\lambda\\boldsymbol{x},\\]

\n

or

\n

\\[\\begin{align}ax+by&=\\lambda x,\\\\cx+dy&=\\lambda y,\\end{align}\\]

\n

where $\\lambda$ is either $\\lambda_1$ or $\\lambda_2$.

\n

Because this is an eigenvalue problem, we can arbitrarily choose one of the eigenvector components to be $1$, the $x$-component in this case.  The $y$-component can then be found from

\n

\\[y=\\frac{x(\\lambda-a)}{b}\\quad\\text{or}\\quad y=\\frac{cx}{\\lambda-d},\\]

\n

with $x=1$.  Both expressions are equivalent, and will lead to the same value for $\\lambda$.

\n

Making the necessary substitutions reveals that the $y$-component of the eigenvector corresponding to $\\lambda_1$ is $\\var{vec1}$, and the $y$-component of the eigenvector corresponding to $\\lambda_2$ is $\\var{vec2}$.

\n

 

\n

e)

\n

The nature of the fixed point at the origin can be determined by examining the eigenvalues.  If the eigenvalues are real, then the sign of each eigenvalue determines the nature of the fixed point.  If the eigenvalues are complex, then the sign of the real part of each eigenvalue determines the nature of the fixed point.

\n

In this case, {naturetext}.

", "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "extensions": [], "variables": {"natures": {"name": "natures", "group": "Ungrouped variables", "definition": "shuffle(['unstable node','stable node','saddle point','unstable spiral','stable spiral','centre'] except nature)", "description": "", "templateType": "anything"}, "vec2": {"name": "vec2", "group": "Ungrouped variables", "definition": "(lam2-a)/b", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-1,1)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "sign(b)*((tau-d)*d-delta)", "description": "", "templateType": "anything"}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(2..18#2 except abs(tau))", "description": "", "templateType": "anything"}, "delta": {"name": "delta", "group": "Ungrouped variables", "definition": "0.25*(tau^2+sign(random(-1,1))*r^2)", "description": "", "templateType": "anything"}, "tau": {"name": "tau", "group": "Ungrouped variables", "definition": "random([0]+repeat(2*random(0..9)*sign(random(-1,1)),5))", "description": "", "templateType": "anything"}, "lam2": {"name": "lam2", "group": "Ungrouped variables", "definition": "(tau-sqrt(disc))/2", "description": "", "templateType": "anything"}, "nature": {"name": "nature", "group": "Ungrouped variables", "definition": "if (im(lam1)=0 and im(lam2)=0,\n switch (\n lam1>0 and lam2>0, 'unstable node',\n lam1<0 and lam2<0, 'stable node',\n lam1>0 and lam2<0, 'saddle point'\n ),\n switch (\n re(lam1)>0, 'unstable spiral',\n re(lam1)<0, 'stable spiral',\n re(lam1)=0, 'centre'\n )\n )", "description": "", "templateType": "anything"}, "lam1": {"name": "lam1", "group": "Ungrouped variables", "definition": "(tau+sqrt(disc))/2", "description": "", "templateType": "anything"}, "disc": {"name": "disc", "group": "Ungrouped variables", "definition": "tau^2-4*delta", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "tau-d", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..15 except abs(tau))*sign(random(-1,1))", "description": "", "templateType": "anything"}, "vec1": {"name": "vec1", "group": "Ungrouped variables", "definition": "(lam1-a)/b", "description": "", "templateType": "anything"}, "naturetext": {"name": "naturetext", "group": "Ungrouped variables", "definition": "switch (\n nature='unstable node', \"because $\\\\lambda_1>0$ and $\\\\lambda_2>0$, the fixed point is an unstable node\",\n nature='stable node', \"because $\\\\lambda_1<0$ and $\\\\lambda_2<0$, the fixed point is a stable node\",\n nature='saddle point', \"because $\\\\lambda_1>0$ and $\\\\lambda_2<0$, the fixed point is a saddle point\",\n nature='unstable spiral', \"because $\\\\mathrm{Im}(\\\\lambda_1)\\\\ne 0$ and $\\\\mathrm{Im}(\\\\lambda_2)\\\\ne 0$, and $\\\\mathrm{Re}(\\\\lambda_1)=\\\\mathrm{Re}(\\\\lambda_2)>0$, the fixed point is an unstable spiral\",\n nature='stable spiral', \"because $\\\\mathrm{Im}(\\\\lambda_1)\\\\ne 0$ and $\\\\mathrm{Im}(\\\\lambda_2)\\\\ne 0$, and $\\\\mathrm{Re}(\\\\lambda_1)=\\\\mathrm{Re}(\\\\lambda_2)<0$, the fixed point is a stable spiral\",\n nature='centre', \"because $\\\\mathrm{Im}(\\\\lambda_1)\\\\ne 0$ and $\\\\mathrm{Im}(\\\\lambda_2)\\\\ne 0$, and $\\\\mathrm{Re}(\\\\lambda_1)=\\\\mathrm{Re}(\\\\lambda_2)=0$, the fixed point is a centre\",\n false\n )", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["a", "tau", "c", "b", "d", "nature", "vec1", "lam2", "lam1", "vec2", "naturetext", "delta", "r", "disc", "natures"], "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": "

The system can be written in the form $\\dot{\\boldsymbol{x}}=\\mathsf{A}\\boldsymbol{x}$, where $\\boldsymbol{x}=\\pmatrix{x,y}^\\mathsf{T}$.

\n

Identify the components of the matrix $\\mathsf{A}$.

\n

$\\mathsf{A}=$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([[a,b],[c,d]])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "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": "

Calculate the trace $\\tau$, and the determinant $\\delta$ of the matrix $\\mathsf{A}$.

\n

Trace $\\tau=$ [[0]].

\n

Determinant $\\delta=$ [[1]].

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Trace $\\tau$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "tau", "maxValue": "tau", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Determinant $\\delta$", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "delta", "maxValue": "delta", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": "0", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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": "

Calculate the eigenvalues $\\lambda_1$ and $\\lambda_2$ of the matrix $\\mathsf{A}$.

\n

If the eigenvalues have zero imaginary part, enter the eigenvalue with the largest real part first.  If the eigenvalues have non-zero imaginary part, enter the eigenvalue with the largest imaginary part first.

\n

$\\lambda_1=$ [[0]]

\n

$\\lambda_2=$ [[1]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "$\\lambda_1$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{lam1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "$\\lambda_2$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{lam2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}], "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": "

Assuming that the $x$-component of each eigenvector is $1$, find the $y$-components of the eigenvectors corresponding to the eigenvalues $\\lambda_1$ and $\\lambda_2$.

\n

$y$-component of eigenvector corresponding to $\\lambda_1$: [[0]].

\n

$y$-component of eigenvector corresponding to $\\lambda_2$: [[1]].

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Corresponding to $\\lambda_1$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{vec1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "Corresponding to $\\lambda_2$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{vec2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "1_n_2", "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": "

Determine the nature of the fixed point at the origin.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 1, "showCellAnswerState": true, "choices": ["

{nature}

", "

{natures[0]}

", "

{natures[1]}

", "

{natures[2]}

", "

{natures[3]}

", "

{natures[4]}

"], "matrix": [1, 0, 0, 0, 0, 0], "distractors": ["", "", "", "", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}