// Numbas version: exam_results_page_options {"name": "First Order Differential Equations - Coupled FINISHED", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["test1", "a21", "a22", "b1", "mna", "mnb", "s2", "s1", "a12", "test", "cn21", "a11", "that", "da", "a1", "c2", "c1", "mxb", "mxa", "a", "b", "tra", "n", "this", "s", "aa", "bb", "ConstA", "ConstB"], "name": "First Order Differential Equations - Coupled FINISHED", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
a)
\n\\[A - \\lambda I_2 = \\begin{pmatrix} \\var{a11}-\\lambda & \\var{a12}\\\\ \\var{a21} & \\var{a22}-\\lambda \\end{pmatrix}\\]
Hence the characteristic polynomial $p(\\lambda)$ is: \\[\\begin{eqnarray*} \\mathrm{det}\\left(A-\\lambda I_2 \\right)&=&\\simplify[zeroTerm]{({a11}-lambda)({a22}-lambda)-{a12}*{a21}}\\\\ &=& \\simplify[std]{lambda^2-{trA}*lambda+{dA}}\\\\ &=&\\simplify[std]{(lambda-{a})(lambda-{b})} \\end{eqnarray*} \\]
We see that on solving $p(\\lambda)=0$ we get the eigenvalues:
\\[\\lambda_1=\\var{mnA},\\;\\;\\;\\lambda_2=\\var{mxA}\\]
b)
\n1. $\\lambda=\\var{mnA}$
\nWe have the eigenspace is given by all $v=(x,y)^T$ such that $(\\simplify{A-{mnA}}I_2)v=(0,0)^T$ i.e.
\n\\[\\begin{pmatrix} \\var{a11-mnA}&\\var{a12}\\\\ \\var{a21}&\\var{a22-mnA} \\end{pmatrix}\\begin{pmatrix} x \\\\ y \\end{pmatrix} =\\begin{pmatrix} 0 \\\\ 0 \\end{pmatrix}\\]
\nThis gives the two equations:
\n\\[ \\begin{eqnarray*} \\simplify[std]{{a11-mnA}x + {a12}y}&=&0\\\\ \\simplify[std]{{a21}x + {a22-mnA}y}&=&0 \\end{eqnarray*} \\]
There is only one equation here as we see that the equations are the same (one is a multiple of the other).
So putting $x=1$ in the first equation we get $y_1=\\var{-s*(a11-mnA)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix}\\]
\n2. $\\lambda=\\var{mxA}$
\nIn this case we have the equations:
\n\\[ \\begin{eqnarray*} \\simplify[std]{{a11-mxA}x + {a12}y}&=&0\\\\ \\simplify[std]{{a21}x + {a22-mxA}y}&=&0 \\end{eqnarray*} \\]
\nOnce again there is only one equation, so putting $x=1$ in the first equation we get $y_2=\\var{-s*(a11-mxA)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix}\\]
\nc) The general solution is given by
\n\\[\\begin{pmatrix} f_1(x) \\\\ f_2(x) \\end{pmatrix} = A \\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix} e^{\\var{mnA} x} + B \\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix} e^{\\var{mxA} x}\\]
\nWe now apply the initial conditions that $f_1(0) = \\var{aa}$ and $f_2(0) = \\var{bb}$ to find.
\n\\[\\begin{pmatrix} \\var{aa} \\\\ \\var{bb} \\end{pmatrix} = A \\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix} + B \\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix}\\]
\nBy taking each component separatly we can write down a pair of simultaneous equations in A and B.
\n\\[ \\begin{eqnarray*} \\simplify[std]A + B&=& \\var{aa}\\\\ \\simplify[std]{{-s*(a11-mnA)}A + {-s*(a11-mxA)}B}&=&\\var{bb} \\end{eqnarray*} \\]
\nBy then solving these via subsitution or elimination we find $A = \\var{ConstA}$ and $B = \\var{ConstB}$. Giving us the final solution.
\n\\[\\begin{pmatrix} f_1(x) \\\\ f_2(x) \\end{pmatrix} = \\var{ConstA} \\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix} e^{\\var{mnA} x} + \\var{ConstB} \\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix} e^{\\var{mxA} x}\\]
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "To solve the problem, you should first find the eigenvalues of A. To calculate eignevalues you are required to use the result $\\det(A - \\lambda I ) = 0$
\nThe eigenvalues of $A$ are as follows:
\nLet $\\lambda_1$ be the least eigenvalue of $A,\\;\\;\\; \\lambda_1=\\;\\;$[[0]]
\nLet $\\lambda_2$ be the greatest eigenvalue of $A,\\;\\; \\lambda_2=\\;\\;$[[1]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{mnA}", "minValue": "{mnA}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{mxA}", "minValue": "{mxA}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "The next part of the problem is to calculate the eigenvectors of A. The eigenvectors for $A$ are as follows:
\nEigenvector for $\\lambda_1$.
\nLet $v_1 = (x_1,y_1)^T$ be an eigenvector corresponding to $\\lambda_1.\\;\\;\\;\\;$ $v_1 = \\;\\;\\bigg($ [[2]]$\\; , \\;$ [[0]] $\\bigg)^T$
\nEigenvector for $\\lambda_2$.
\nLet $v_2 = (x_2,y_2)^T$ be an eigenvector corresponding to $\\lambda_2.\\;\\;\\;\\;$ $v_2 = \\;\\;\\bigg($ [[3]] $\\; , \\;$ [[1]] $\\bigg)^T$
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{s*(mnA-a11)}", "minValue": "{s*(mnA-a11)}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{s*(mxA-a11)}", "minValue": "{s*(mxA-a11)}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "1", "minValue": "1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "1", "minValue": "1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "By using the initial conditions you should now write down the solution to each function.
\n$f_1(x) =\\;\\;$ [[0]]
\n$f_2(x) =\\;\\;$ [[1]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ConstA}e^({mnA}*x) + {ConstB}e^({mxA}*x)", "marks": "3", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ConstA}{s}{(mnA-a11)}e^({mnA}*x) + {s}{(mxA-a11)}{ConstB}e^({mxA}*x)", "marks": "3", "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "Solve following first order coupled differential equations
\n\\[f_1^\\prime(x) =\\simplify[basic,zerofactor,unitfactor]{{a11} f_1(x) + {a12} f_2(x)}\\]
\nand
\n\\[f_2^\\prime(x) =\\simplify[basic,zerofactor,unitfactor]{{a21} f_1(x) + {a22} f_2(x)}\\]
\nsubject to the initial conditions $f_1(0) = \\var{aa}$ and $f_2(0) = \\var{bb}$.
\nHINT: You should start by re-writng the problem as a matrix equation in the form $F^\\prime(x) = \\textbf{A} F(x)$ where $F^\\prime(x) = \\begin{pmatrix} f^\\prime_1(x) \\\\ f^\\prime_2(x) \\end{pmatrix}$ and $F(x) = \\begin{pmatrix} f_1(x) \\\\ f_2(x) \\end{pmatrix}$ where $\\textbf{A}$ is the matrix of coefficients.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"test1": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "test1", "description": ""}, "a21": {"definition": "-s*(a*b-a11*a-a11*b+a11^2)", "templateType": "anything", "group": "Ungrouped variables", "name": "a21", "description": ""}, "a22": {"definition": "a+b-a11", "templateType": "anything", "group": "Ungrouped variables", "name": "a22", "description": ""}, "ConstA": {"definition": "aa - (aa*(s*(mnA-a11))-bb)/(s*mnA - s*mxA)", "templateType": "anything", "group": "Ungrouped variables", "name": "ConstA", "description": ""}, "ConstB": {"definition": "(aa*(s*(mnA-a11)) - bb)/(s*mnA - s*mxA)", "templateType": "anything", "group": "Ungrouped variables", "name": "ConstB", "description": ""}, "b1": {"definition": "if(c2=a1,a1+random(1..3),c2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "mna": {"definition": "min(a,b)", "templateType": "anything", "group": "Ungrouped variables", "name": "mna", "description": ""}, "mnb": {"definition": "min(a1,b1)", "templateType": "anything", "group": "Ungrouped variables", "name": "mnb", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "that": {"definition": "if(mxB<0,mxB+random(1..6),mxB-random(1..6))", "templateType": "anything", "group": "Ungrouped variables", "name": "that", "description": ""}, "aa": {"definition": "random(-4..4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "aa", "description": ""}, "test": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "test", "description": ""}, "cn21": {"definition": "mnB^n-mxB^n", "templateType": "anything", "group": "Ungrouped variables", "name": "cn21", "description": ""}, "a11": {"definition": "switch(test=a,this,test=b,this,test)", "templateType": "anything", "group": "Ungrouped variables", "name": "a11", "description": ""}, "bb": {"definition": "random(-4..4 except 0 except a)", "templateType": "anything", "group": "Ungrouped variables", "name": "bb", "description": ""}, "a12": {"definition": "s", "templateType": "anything", "group": "Ungrouped variables", "name": "a12", "description": ""}, "da": {"definition": "{a11*a22-a12*a21}", "templateType": "anything", "group": "Ungrouped variables", "name": "da", "description": ""}, "a1": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "c2": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "c2", "description": ""}, "c1": {"definition": "random(-4..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "mxb": {"definition": "max(a1,b1)", "templateType": "anything", "group": "Ungrouped variables", "name": "mxb", "description": ""}, "mxa": {"definition": "max(a,b)", "templateType": "anything", "group": "Ungrouped variables", "name": "mxa", "description": ""}, "a": {"definition": "random(-4..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "if(c1=a,a+random(1..3),c1)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "tra": {"definition": "{a11+a22}", "templateType": "anything", "group": "Ungrouped variables", "name": "tra", "description": ""}, "n": {"definition": "random(4,5,6)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "this": {"definition": "if(mxA<0,mxA+random(1..6),mxA-random(1..6))", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}