// Numbas version: finer_feedback_settings {"question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Simon's copy of Represent a linear map as a matrix with a given basis", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "ungrouped_variables": ["a", "c", "b", "d", "f"], "variables": {"c": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-9..9)", "name": "c"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(1..9 except 0)", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(1..9 except 0)", "name": "a"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except 0)", "name": "d"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except 0)", "name": "f"}}, "preamble": {"js": "", "css": ""}, "statement": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let the linear map \\[\\phi: P_4 \\rightarrow P_4 \\] be defined by:

\n

\\[\\phi(p(x)) = \\simplify[all,!collectnumbers]{{a} * p(x) + ({b} * x + {c}) * p'(x) + (x ^ 2 + {d} * x + {f}) * p''(x)}\\]

\n

where  $p'(x)$ is the first derivative of $p(x)$  and $p''(x)$ the second derivative. 

", "functions": {}, "metadata": {"description": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by:

\n

$\\phi(p(x))=ap(x) + (bx + c)p'(x) + (x ^ 2 + dx + f)p''(x)$

\n

Using the standard basis for range and domain find the matrix given by $\\phi$.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"gaps": [{"correctAnswerStyle": "plain", "minValue": "{a}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{c}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{c}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{2*f}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{2*f}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+b}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+b}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{2*d+2*c}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{2*d+2*c}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{6*f}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{6*f}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+2*b+2}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+2*b+2}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{3*c+6*d}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{3*c+6*d}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{12*f}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{12*f}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+3*b+6}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+3*b+6}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{4*c+12*d}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{4*c+12*d}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+4*b+12}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+4*b+12}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}], "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "prompt": "Using the ordered basis $\\{1,\\;x,\\;x^2,\\;x^3,\\;x^4\\}$ of $P_4$ for both range and domain, $\\phi$ is represented by a 5 x 5 matrix.\n \n Fill in the entries for this matrix below: \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\\[\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\][[0]][[1]][[2]]$0$$0$\\[\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\\]
[[3]][[4]][[5]][[6]]$0$
$0$[[7]][[8]][[9]][[10]]
$0$$0$[[11]][[12]][[13]]
$0$$0$$0$[[14]][[15]]
", "marks": 0, "customName": "", "unitTests": []}], "variable_groups": [], "tags": [], "advice": "

We have:

\n

\\[\\phi(1) =\\simplify[]{ {a} * 1 + ({b} * x + {c}) * 0 + (x ^ 2 + {d} * x + {f}) * 0 = {a} = {a} * 1 + 0 * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

which gives the first column of the matrix.

\n

\n

\\[\\phi(x) = \\simplify[]{{a} * x + ({b} * x + {c}) * 1 + (x ^ 2 + {d} * x + {f}) * 0 = {c} + {a + b} * x = {c} * 1 + {a + b} * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

gives the second column of the matrix.

\n

\n

\\[\\phi(x ^ 2) = \\simplify[]{{a} * x ^ 2 + ({b} * x + {c}) * 2 * x + (x ^ 2 + {d} * x + {f}) * 2 = {2 * f} + {2 * d + 2 * c} * x + {a + 2 * b + 2} * x ^ 2 = {2 * f} * 1 + {2 * d + 2 * c} * x + {a + 2 * b + 2} * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

gives the third column of the matrix.

\n

\n

Continuing on in this way for $\\phi(x^3),\\;\\phi(x^4)$ we obtain the matrix for $\\phi$ with respect to the given bases for domain and range.

\n

\\[\\begin{pmatrix}\\var{a}&\\var{c}&\\var{2*f}&0&0\\\\0&\\var{a+b}&\\var{2*d+2*c}&\\var{6*f}&0\\\\0&0&\\var{a+2*b+2}&\\var{3*c+6*d}&\\var{12*f}\\\\0&0&0&\\var{a+3*b+6}&\\var{4*c+12*d}\\\\0&0&0&0&\\var{a+4*b+12}\\end{pmatrix}\\]

", "type": "question"}, {"name": "Simon's copy of Row reducing a matrix and finding its rank and nullity-MA2223", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "metadata": {"description": "

Reduce a 5x6 matrix to row reduced form and using this find rank and nullity.

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"condition": "deter<>0\nand\nmax(map(testing(record[0][x]),x,0..length(record[0])-1))=0", "maxRuns": "200"}, "preamble": {"css": "", "js": "question.functions={};\nquestion.functions.ref=function(m){\n \n m = util.copyarray(m,true);\n \n function finish() {\n\n return rank;\n }\n\n\n\n var lead = 0;\n var rank = 0;\n var echelon=[];\n var rows = m.length;\n for(var i=0;i');\nvar n=matrix_list.length;\nvar m='';\nvar mess='';\nfor(var i=0;i'+mess+'');\ntable.append('');\ntable.append(''+m+''); \n}\nreturn table;\n", "type": "html", "language": "javascript"}, "echelon_form_matrix": {"parameters": [["n", "number"], ["r", "number"], ["m", "number"], ["max", "number"]], "definition": "\nfunction getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\n//generate a random echelon form\nfunction random_echelon_form(columns,rank){\nvar l=[];\nvar ech_form=[], ech_form1=[],b=[];\nfor(var i=1;i=ind?temp.push(getRandomInt(1,max)):temp.push(0);\n }\n for(var k=0;k(a)

\n

The following shows how $A$ is reduced to row-echelon form.

\n

\n

{solution(record_ops_matrix,record_ops_message)}

\n

\n

(b) 

\n

Once a matrix is in reduced row echelon form, we can find the rank simply by counting the number of nonzero rows. This is also the same as the number of leading 1s.

\n

Thus in our example $Rank(A)=\\var{rank}$.

\n

Remember that the Rank-Nullity Theorem says that:

\n

Number of Columns of $A = Rank(A) + Nullity(A)$

\n

\n

Hence $Nullity(A) = $ number of columns $-Rank(A)=5-\\var{rank}=\\var{nullity}$.

\n

\n

Also the dimensions of the row space and the column space are both equal to the rank.

\n

Finally, the dimension of the null space is the nullity.

\n

", "parts": [{"variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "gaps": [{"variableReplacements": [], "allowFractions": true, "type": "matrix", "extendBaseMarkingAlgorithm": true, "allowResize": false, "scripts": {}, "correctAnswer": "{echmatrix}", "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "tolerance": 0, "variableReplacementStrategy": "originalfirst", "markPerCell": false, "useCustomName": false, "customName": "", "numColumns": "5", "correctAnswerFractions": true, "numRows": "6", "marks": "4", "unitTests": []}], "prompt": "

\n

$R= $[[0]]

\n

All entries in the matrix must be input as fractions or integers and not as decimals.

\n

\n

", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "useCustomName": false, "customName": "", "marks": 0, "unitTests": []}, {"variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "gaps": [{"variableReplacements": [], "maxValue": "rank", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowFractions": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "correctAnswerFraction": false, "useCustomName": false, "customName": "", "mustBeReduced": false, "minValue": "rank", "mustBeReducedPC": 0, "marks": "0.2", "unitTests": []}, {"variableReplacements": [], "maxValue": "nullity", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowFractions": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "correctAnswerFraction": false, "useCustomName": false, "customName": "", "mustBeReduced": false, "minValue": "nullity", "mustBeReducedPC": 0, "marks": "0.2", "unitTests": []}, {"variableReplacements": [], "maxValue": "rank", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowFractions": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "correctAnswerFraction": false, "useCustomName": false, "customName": "", "mustBeReduced": false, "minValue": "rank", "mustBeReducedPC": 0, "marks": "0.2", "unitTests": []}, {"variableReplacements": [], "maxValue": "rank", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowFractions": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "correctAnswerFraction": false, "useCustomName": false, "customName": "", "mustBeReduced": false, "minValue": "rank", "mustBeReducedPC": 0, "marks": "0.2", "unitTests": []}, {"variableReplacements": [], "maxValue": "nullity", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowFractions": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFractionHint": true, "correctAnswerFraction": false, "useCustomName": false, "customName": "", "mustBeReduced": false, "minValue": "nullity", "mustBeReducedPC": 0, "marks": "0.2", "unitTests": []}], "prompt": "

\n

$\\operatorname{Rank}(A)=$[[0]]

\n

$\\operatorname{Nullity}(A)=$[[1]]

\n

$\\operatorname{dim}(\\operatorname{col}(A))=$[[2]]

\n

$\\operatorname{dim}(\\operatorname{row}(A))=$[[3]]

\n

$\\operatorname{dim}(\\operatorname{null}(A))=$[[4]]

\n

", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "useCustomName": false, "customName": "", "marks": 0, "unitTests": []}], "statement": "

Find the row-reduced echelon form $R$ of the following matrix $A$.

\n

$A=\\var{testmatrix}$

\n

\n

", "variable_groups": [], "ungrouped_variables": ["echelonform", "ech", "echform", "testmatrix", "record", "rref1", "record_ops_matrix", "record_ops_message", "rank", "maxint", "steps", "rdmat", "deter", "nullity", "echmatrix", "trtestmatrix", "rows", "columns", "column_basis", "sum", "null_basis", "ec", "chosen", "student_cols_matrix", "not_chosen_col"], "type": "question"}, {"name": "Simon's copy of Represent a linear map as a matrix given a basis", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["a", "c", "b"], "statement": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by:

\n

\\[\\phi(p(x))=p(\\var{a})+p(\\simplify{{b}x+{c}})\\]

\n

This is given by evaluating $p(x)$ at $x=\\var{a}$ and adding this to the polynomial given by replacing $x$ by $\\simplify{{b}x+{c}}$ in $p(x)$.

\n

For example:

\n

$\\phi(x^2+2x)=\\simplify[all,!collectnumbers,!noleadingminus]{{a}^2+2*{a}+({b}x+{c})^2+2*({b}x+{c})={a^2+2*a+2*c}+{2*b*c+2*b}*x+{b^2}*x^2}$.

\n

Using the standard basis for range and domain find the matrix given by $\\phi$.

", "parts": [{"type": "gapfill", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "prompt": "

Using the ordered basis $\\{1,\\;x,\\;x^2,\\;x^3,\\;x^4\\}$ of $P_4$ for both range and domain, $\\phi$ is represented by a 5 x 5 matrix. Fill in the entries for this matrix below:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\\[\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\][[0]][[1]][[2]][[3]][[4]]\\[\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\\]
$0$[[5]][[6]][[7]][[8]]
$0$$0$[[9]][[10]][[11]]
$0$$0$$0$[[12]][[13]]
$0$$0$$0$$0$[[14]]
", "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "sortAnswers": false, "marks": 0, "unitTests": [], "gaps": [{"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "2", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "2", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{a+c}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{a+c}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{a^2+c^2}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{a^2+c^2}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{a^3+c^3}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{a^3+c^3}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{a^4+c^4}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{a^4+c^4}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{b}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{b}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{2*b*c}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{2*b*c}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{3*b*c^2}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{3*b*c^2}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{4*b*c^3}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{4*b*c^3}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{b^2}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{b^2}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{3*b^2*c}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{3*b^2*c}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{6*b^2*c^2}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{6*b^2*c^2}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{b^3}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{b^3}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{4*b^3*c}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{4*b^3*c}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{b^4}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{b^4}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 0.6, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}], "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers. Let the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by: \\[\\phi(p(x))=p(a)+p(bx+c).\\]Using the standard basis for range and domain find the matrix given by $\\phi$.

"}, "tags": [], "functions": {}, "advice": "

We have:

\n

\\[\\phi(1)=\\simplify[]{1+1= 2*1= 2 * 1 + 0 * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

gives the first column of the matrix.

\n

\\[\\phi(x)=\\simplify[]{{a}+ ({b} * x + {c}) = {a+c} + {b} * x = {a+c} * 1 + {b} * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

gives the second column of the matrix.

\n

\\[\\phi(x^2)=\\simplify[]{ {a}^ 2 + ({b} * x + {c})^2 = {a^2+c^2} + {2 * b* c} * x + {b^2} * x ^ 2 = {a^2+c^2} * 1 + {2*b*c} * x + {b^2} * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

 gives the third column of the matrix.

\n

\n

Continuing on in this way for $\\phi(x^3),\\;\\phi(x^4)$:

\n

\\[\\phi(x^3)=\\simplify[]{ {a}^ 3 + ({b} * x + {c})^3}= ... \\]

\n

\\[\\phi(x^4)=\\simplify[]{ {a}^ 4 + ({b} * x + {c})^4}= ... \\]

\n

we obtain the matrix for $\\phi$ with respect to the given bases for domain and range.

\n

 

\n

\\[\\begin{pmatrix}\\var{2}&\\var{a+c}&\\var{a^2+c^2}&\\var{a^3+c^3}&\\var{a^4+c^4}\\\\0&\\var{b}&\\var{2*b*c}&\\var{3*b*c^2}&\\var{4*b*c^3}\\\\0&0&\\var{b^2}&\\var{3*b^2*c}&\\var{6*b^2*c^2}\\\\0&0&0&\\var{b^3}&\\var{4*b^3*c}\\\\0&0&0&0&\\var{b^4}\\end{pmatrix}\\]

", "preamble": {"js": "", "css": ""}, "variable_groups": [], "variables": {"c": {"name": "c", "definition": "random(-5..5 except 0)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a": {"name": "a", "definition": "random(-5..5 except 0)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b": {"name": "b", "definition": "random(1..5)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "type": "question"}, {"name": "Solve a separable first order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "b1"}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "c1"}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "a1"}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "d1"}}, "ungrouped_variables": ["a1", "c1", "b1", "d1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{-a1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Do not enter decimals in your answer.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "answersimplification": "all", "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "x^2+{2*b1}*x+{(a1+d1)^2-c1^2-2*b1*c1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Do not enter decimals in your answer, and expand $f(x)$ fully, so that no parentheses appear in the expression.

", "showStrings": true, "partialCredit": 0, "strings": [".", "(", ")"]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "

Solve the equation, and enter the value of $\\alpha$ and the expression for $f(x)$ in the boxes.  Do not enter decimals in your answers.

\n

$\\alpha=$ [[0]].

\n

$f(x)=$ [[1]].  (Expand $f(x)$ fully, so that no parentheses appear in the expression.)

", "variableReplacements": [], "marks": 0}], "statement": "

You are given the differential equation

\n

\\[(\\var{a1}+y)y'=\\var{b1}+x,\\]

\n

satisfying $y(\\var{c1})=\\var{d1}$.

\n

The solution can be written in the form $y=\\alpha\\pm\\sqrt{f(x)}$, where $\\alpha$ is a constant, and $f(x)$ is some function of $x$.

", "tags": ["checked2015", "MAS1603", "MAS2105"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

Jan 2016 (WHF)

\n

The bddy condition determines the solution, so not correct to have $\\pm$ in the solution.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Find the solution of a first order separable differential equation of the form $(a+y)y'=b+x$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The differential equation is separable, and can be immediately integrated to give

\n

\\[\\simplify{{a1}*y+(1/2)*y^2}=\\simplify{{b1}*x+(1/2)*x^2+c},\\]

\n

or

\n

\\[\\simplify{(1/2)*(y+{a1})^2-{a1^2}/2}=\\simplify{{b1}*x+(1/2)*x^2+c},\\]

\n

then the general solution of the equation is

\n

\\[y=\\var{-a1}\\pm\\simplify{sqrt(x^2+{2*b1}*x+2c+{a1^2})}\\]

\n

or, upon redefining the constant $c$,

\n

\\[y=\\var{-a1}\\pm\\simplify{sqrt(x^2+{2*b1}*x+c)}.\\]

\n

Then we have

\n

\\[\\var{d1}=y(\\var{c1})=\\var{-a1}\\pm\\simplify[std]{sqrt({c1}^2+{2*b1}*{c1}+c)}=\\var{-a1}\\pm\\simplify{sqrt({c1^2+2*b1*c1}+c)},\\]

\n

so

\n

\\[c=\\simplify[std]{({a1}+{d1})^2-{c1^2+2*b1*c1}}=\\simplify{{(a1+d1)^2-c1^2-2*b1*c1}}.\\]

\n

Then the full solution is

\n

\\[y=\\var{-a1}\\pm\\simplify{sqrt(x^2+{2*b1}*x+{(a1+d1)^2-c1^2-2*b1*c1})}.\\]

"}, {"name": "Find a basis for the row space of a matrix", "extensions": ["codewords", "permutations"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas-editor.mas.ncl.ac.uk/accounts/profile/3/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "variable_groups": [], "variables": {"codeword_matrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(\n matrix(map(x[0..word_length[j]],x,shown_words[j])),\n j,\n 0..num_parts-1\n)", "name": "codeword_matrix", "description": ""}, "word_length": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(4..6),num_parts)", "name": "word_length", "description": ""}, "generating_set": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(shuffle(allwords(word_length[j],field_size[j]))[0..random(3..4)],j,0..num_parts-1)", "name": "generating_set", "description": ""}, "shown_words": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(shuffle(span[j] except zero(word_length[j],field_size[j]))[0..random(3..4)],j,0..num_parts-1)", "name": "shown_words", "description": ""}, "num_parts": {"templateType": "anything", "group": "Ungrouped variables", "definition": "2", "name": "num_parts", "description": ""}, "field_size": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(2,3,5),num_parts)", "name": "field_size", "description": ""}, "rref": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(reduced_row_echelon_form(x),x,shown_words)", "name": "rref", "description": ""}, "basis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(rref[j] except zero(word_length[j],field_size[j]),j,0..num_parts-1)", "name": "basis", "description": ""}, "span": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(set_generated_by(x),x,generating_set)", "name": "span", "description": ""}, "rref_matrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(\n matrix(map(x[0..word_length[j]],x,rref[j])),\n j,\n 0..num_parts-1\n)", "name": "rref_matrix", "description": ""}}, "ungrouped_variables": ["num_parts", "field_size", "word_length", "generating_set", "span", "shown_words", "codeword_matrix", "rref", "rref_matrix", "basis"], "functions": {}, "preamble": {"css": "", "js": "question.mark_basis = function(part,field_size,shown_words) {\n with(Numbas.extensions.codewords) {\n // check input is valid and parse as a list of words\n mark_codeword_set(part,field_size,function(words) {\n // answer is valid\n this.answered = true;\n \n // check words given are linearly independent\n if(!linearly_independent(words)) {\n this.setCredit(0,\"The set of vectors you gave is not linearly independent.\");\n return;\n }\n \n // check that all of the shown words are in the set generated by the student's basis\n var span = new Code(set_generated_by(words));\n var not_generated = []\n shown_words.map(function(word) {\n if(!span.contains(word)) {\n not_generated.push(word);\n }\n });\n \n // if any words aren't generated by the basis, no marks\n if(not_generated.length) {\n this.setCredit(0,\"Your basis does not generate every row of the given matrix.\");\n return;\n }\n \n // otherwise, student's basis is correct!\n this.setCredit(1,\"Your answer is correct.\");\n });\n }\n}"}, "parts": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$\\var{matrix(map(x[0..word_length[0]],x,shown_words[0]))}$ in $\\mathbb{Z}_{\\var{field_size[0]}}$.

\n

[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "", "displayAnswer": "{join(map(string(x),x,basis[0]),',')}", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "matchMode": "regex", "showFeedbackIcon": true, "scripts": {"mark": {"script": "question.mark_basis(this,variables.field_size[0],variables.shown_words[0]);", "order": "instead"}, "validate": {"script": "return Numbas.extensions.codewords.validate_codeword_set(this);", "order": "instead"}}, "type": "patternmatch", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "2"}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$\\var{matrix(map(x[0..word_length[1]],x,shown_words[1]))}$ in $\\mathbb{Z}_{\\var{field_size[1]}}$.

\n

[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "", "displayAnswer": "{join(map(string(x),x,basis[1]),',')}", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "matchMode": "regex", "showFeedbackIcon": true, "scripts": {"mark": {"script": "question.mark_basis(this,variables.field_size[1],variables.shown_words[1]);", "order": "instead"}, "validate": {"script": "return Numbas.extensions.codewords.validate_codeword_set(this);", "order": "instead"}}, "type": "patternmatch", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "2"}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}], "statement": "

Find bases for the row spaces of the following matrices.

\n

Enter each answer as a list of vectors separated by commas.

", "tags": [], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given a matrix in the field $\\mathbb{Z}_n$. By reducing it to row-echelon form (or otherwise), find a basis for the row space of the matrix, as a list of vectors.

"}, "variablesTest": {"condition": "sum(map(\n if(linearly_independent(x),0,1),\n x,\n shown_words\n))>1", "maxRuns": 100}, "advice": "

a)

\n

We can find a basis by row-reducing the given matrix to echelon form:

\n

\\[ \\var{rref_matrix[0]} \\]

\n

Take the non-zero rows of this matrix as a set of basis vectors, i.e. $\\var{latex(join(map(latex(x),x,basis[0]),', '))}$. This is only one of many possible bases for the row space of the given matrix.

\n

b)

\n

We can find a basis by row-reducing the given matrix to echelon form:

\n

\\[ \\var{rref_matrix[1]} \\]

\n

Take the non-zero rows of this matrix as a set of basis vectors, i.e. $\\var{latex(join(map(latex(x),x,basis[1]),', '))}$. This is only one of many possible bases for the row space of the given matrix.

"}, {"name": "Simon's copy of Julie's copy of First order differential equations 5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "parts": [{"type": "gapfill", "prompt": "

Solution is:

\n

$y=\\;\\;$[[0]]

\n

Input all numbers as integers or fractions – not as decimals.

", "scripts": {}, "sortAnswers": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"type": "jme", "showPreview": true, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "notallowed": {"strings": ["."], "partialCredit": 0, "showStrings": false, "message": "

Input all numbers as integers or fractions.

"}, "scripts": {}, "vsetRange": [0.5, 1], "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "vsetRangePoints": 5, "showFeedbackIcon": true, "checkVariableNames": false, "unitTests": [], "showCorrectAnswer": true, "answerSimplification": "std", "checkingType": "absdiff", "answer": "({b} / {(a + n)}) * (x ^ {n} + ({c} * (x ^ { - a})))", "variableReplacements": [], "marks": 3, "failureRate": 1, "variableReplacementStrategy": "originalfirst"}], "extendBaseMarkingAlgorithm": true, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "metadata": {"description": "

Find the solution of $\\displaystyle x\\frac{dy}{dx}+ay=bx^n,\\;\\;y(1)=c$

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "c", "b", "n"], "variable_groups": [], "advice": "

$\\displaystyle{x\\frac{dy}{dx}+\\var{a}y=\\simplify[std]{{b}x^{n}}}$ can be solved by the integrating factor method.

\n

First we divide both sides by $x$ to obtain $\\displaystyle{\\frac{dy}{dx}+\\frac{\\var{a}}{x}y=\\simplify[std]{{b}x^{n-1}}}$

\n

This is now in the standard form $\\displaystyle{\\frac{dy}{dx}+a(x)y=b(x)}$ which we can solve by multiplying through by the integrating factor $e^{\\int a(x)dx}$

\n

\n

In our example, $a(x) = \\frac{\\var{a}}{x}$ so $e^{\\int a(x)dx}=e^{\\int{\\frac{\\var{a}}{x}dx}}=e^{\\var{a}\\ln(x)}=x^\\var{a}$

\n

\n

Hence multiplying both sides of $\\displaystyle{\\frac{dy}{dx}+\\frac{\\var{a}}{x}y=\\simplify[std]{{b}x^{n-1}}}$ by $x^\\var{a}$ gives

\n

$\\displaystyle{x^\\var{a}\\frac{dy}{dx}+\\var{a}x^{\\var{a-1}}y=\\simplify[std]{{b}x^{n-1+a}}}$

\n

We note that we can rewrite the left hand side as $\\frac{d(x^{\\var{a}}y)}{dx}$ (product rule) and hence:

\n

\\[\\frac{d(x^{\\var{a}}y)}{dx}=\\simplify[std]{{b}x^{a+n-1}}\\]
We can integrate both sides to get:
\\[x^{\\var{a}}y=\\simplify[std]{{b}/{a+n}x^{a+n}+A}\\]
to determine $A$ we use the condition $\\displaystyle{y(1)=\\simplify[std]{{b*(c+1)}/{a+n}}}$ and we see that:

\n

\\[\\simplify[std]{{b*(c+1)}/{a+n}}=\\simplify[std]{{b}/{a+n}+A}\\]
\\[A = \\simplify[std]{{b*(c+1)}/{a+n}} - \\simplify[std]{{b}/{a+n} = {b*c}/{a+n}}\\]
and so the solution is:
\\[x^{\\var{a}}y=\\simplify[std]{{b}/{a+n}x^{a+n}+{b*c}/{a+n}} \\Rightarrow y=\\simplify[std]{{b}/{a+n}*(x^{n}+{c}*x^{-a})}\\]

", "variables": {"a": {"definition": "random(2..8)", "group": "Ungrouped variables", "description": "", "name": "a", "templateType": "anything"}, "b": {"definition": "random(1..9)", "group": "Ungrouped variables", "description": "", "name": "b", "templateType": "anything"}, "c": {"definition": "random(1..5)", "group": "Ungrouped variables", "description": "", "name": "c", "templateType": "anything"}, "n": {"definition": "random(2..5)", "group": "Ungrouped variables", "description": "", "name": "n", "templateType": "anything"}}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "statement": "

Integrating Factor Method:

\n

Find the solution of:
\\[x\\frac{dy}{dx}+\\var{a}y=\\simplify[std]{{b}x^{n}}\\]

\n

which satisfies $\\displaystyle{y(1)=\\simplify[std]{{b*(c+1)}/{a+n}}}$

", "tags": [], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question"}, {"name": "Solve a constant coefficient second order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"correctform": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch (\n disc>0, forms[0],\n disc=0, forms[1],\n disc<0, forms[2]\n )", "description": "", "name": "correctform"}, "ltgteq": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch (\n disc>0, \"greater than\",\n disc=0, \"equal to\",\n disc<0, \"less than\"\n )", "description": "", "name": "ltgteq"}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "c1"}, "disc": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b1^2-4*a1*c1", "description": "", "name": "disc"}, "incorrectform": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch (\n disc>0, [forms[1],forms[2]],\n disc=0, [forms[0],forms[2]],\n disc<0, [forms[0],forms[1]]\n )", "description": "", "name": "incorrectform"}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "b1"}, "lambda2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((-b1-sqrt(disc))/(2*a1),3)", "description": "", "name": "lambda2"}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "description": "", "name": "a1"}, "lambda1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((-b1+sqrt(disc))/(2*a1),3)", "description": "", "name": "lambda1"}, "forms": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[\"$A\\\\mathrm{e}^{\\\\lambda_1 x}+B\\\\mathrm{e}^{\\\\lambda_2 x}$\",\"$(A+Bx)\\\\mathrm{e}^{\\\\lambda x}$\",\"$\\\\mathrm{e}^{\\\\alpha x}\\\\biggl(A\\\\cos(\\\\beta x)+B\\\\sin(\\\\beta x)\\\\biggr)$\"]", "description": "", "name": "forms"}}, "ungrouped_variables": ["a1", "correctform", "incorrectform", "forms", "disc", "b1", "c1", "lambda1", "lambda2", "ltgteq"], "functions": {}, "preamble": {"css": "", "js": ""}, "parts": [{"displayType": "radiogroup", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCellAnswerState": true, "choices": ["

{correctform}

", "

{incorrectform[0]}

", "

{incorrectform[1]}

"], "prompt": "

Which of the following choices defines the form of the general solution of the differential equation?

\n

In each case $A$ and $B$ are arbitrary constants, and $\\lambda_1$, $\\lambda_2$, $\\lambda$, $\\alpha$, and $\\beta$ are other constants arising from the solution of the auxiliary equation (their actual values are not important for this part of the question).

", "distractors": ["", "", ""], "matrix": [1, 0, 0], "unitTests": [], "shuffleChoices": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "displayColumns": 1, "showCorrectAnswer": true, "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

Find the general solution of the differential equation, by setting up an appropriate auxiliary equation, solving it, and entering the solutions  $\\lambda_1$ and $\\lambda_2$  of the auxiliary equation in the boxes.  If the solutions are real and distinct, enter the greatest solution as $\\lambda_1$; if the solutions are repeated, enter the same values for $\\lambda_1$ and $\\lambda_2$; if the solutions are complex, enter the solution with the greatest imaginary part as $\\lambda_1$.

\n

Enter your answers to 3 d.p.

\n

$\\lambda_1=$ [[0]]

\n

$\\lambda_2=$ [[1]]

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "{lambda1}", "showCorrectAnswer": true, "failureRate": 1, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "unitTests": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1}, {"answer": "{lambda2}", "showCorrectAnswer": true, "failureRate": 1, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "unitTests": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "statement": "

You are given the differential equation

\n

\\[\\simplify{{a1}*y''+{b1}*y'+{c1}*y=0}.\\]

", "tags": ["checked2015"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the solution of a constant coefficient second order ordinary differential equation of the form $ay''+by'+cy=0$.

"}, "type": "question", "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

To determine the form of the general solution of the equation

\n

\\[ay''+by'+c=0,\\]

\n

first set $y=\\mathrm{e}^{\\lambda x}$, and substitute to obtain

\n

\\[a\\lambda^2+b\\lambda+c=0,\\]

\n

for which the solutions are

\n

\\[\\lambda_{1,2}=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}.\\]

\n

If $b^2-4ac>0$, then the roots are real and distinct, and the solution takes the form

\n

\\[y(x)=\\var{forms[0]}.\\]

\n

If $b^2-4ac=0$, then the roots are real and repeated, and the solution takes the form

\n

\\[y(x)=\\var{forms[1]}.\\]

\n

If $b^2-4ac<0$, then the roots are complex, and the solution takes the form

\n

\\[y(x)=\\var{forms[2]},\\]

\n

where $\\lambda_1=\\alpha+i\\beta$ and $\\lambda_2=\\alpha-i\\beta$.

\n

a)

\n

In this question we have $\\simplify{{a1}*y''+{b1}*y'+{c1}*y=0}$, and then

\n

\\[b^2-4ac=\\var{b1^2}-4\\times(\\var{a1*c1})=\\var{disc},\\]

\n

which is {ltgteq} zero, so the general solution takes the form

\n

\\[y(x)=\\var{correctform}.\\]

\n

b)

\n

Making the substitution $y=\\mathrm{e}^{\\lambda x}$, then gives

\n

\\[\\simplify{{a1}*lambda^2+{b1}*lambda+{c1}=0},\\]

\n

which has solutions

\n

\\[\\lambda_1=\\frac{\\var{-b1}+\\sqrt{\\var{disc}}}{\\var{2*a1}}=\\var{lambda1} \\text{ to 3 d.p.,}\\]

\n

and

\n

\\[\\lambda_2=\\frac{\\var{-b1}-\\sqrt{\\var{disc}}}{\\var{2*a1}}=\\var{lambda2} \\text{ to 3 d.p.}\\]

"}, {"name": "Simon's copy of Julie's copy of Second order differential equations 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solve: $\\displaystyle \\frac{d^2y}{dx^2}+2a\\frac{dy}{dx}+(a^2+b^2)y=0,\\;y(0)=1$ and $y'(0)=c$. 

\n

rebelmaths

"}, "statement": "

Method of undetermined coefficients

\n

Solve:
\\[\\simplify[std]{(d^2y/dx^2)+{2*a}*(dy/dx)+{a^2+b^2}y}=0\\]
which satisfies $y(0)=1$ and $y'(0)=\\var{c}$ (where prime denotes the derivative).

", "advice": "

The auxillary equation is $\\simplify[std]{lambda^2+{2*a}lambda+{a^2+b^2}}=0$.

\n

On solving this equation we get $\\lambda=\\simplify[std]{{-a}+{b}i}$ and $\\lambda=\\simplify[std]{{-a}-{b}i}$.

\n

Hence the general solution is:
\\[y = \\simplify[std]{e^({-a}x)(A*sin({b}x)+B*cos({b}x))}\\]
Note that
\\[y'(x)=\\simplify[std]{-{a}e^({-a}x)(A*sin({b}x)+B*cos({b}x))+e^({-a}x)({b}*A*cos({b}x)-{b}*B*sin({b}x))}\\]
Using the conditions $y(0)=1$ and $y'(0)=\\var{c}$ gives:
\\[\\begin{eqnarray*} B &=& 1\\\\ \\simplify[std]{{b}A+{-a}B}&=& \\var{c} \\end{eqnarray*} \\]
This gives $\\displaystyle{A = \\simplify[std]{{c+a}/{b}}}$.

\n

Hence the solution is:

\n

\\[y=\\simplify[std]{exp({- a} * x) * (cos({b} * x) + ({c+a} / {b}) * sin({b} * x))}\\]

", "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "scripts": {}, "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "checkingAccuracy": 1e-05, "scripts": {}, "variableReplacementStrategy": "originalfirst", "notallowed": {"message": "

Input all numbers as integers or fractions.

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "expectedVariableNames": [], "answer": "exp({- a} * x) * (cos({b} * x) + ({c+a} / {b}) * sin({b} * x))", "marks": 3, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "jme", "checkingType": "absdiff", "vsetRange": [0, 1], "vsetRangePoints": 5, "checkVariableNames": false, "answerSimplification": "std", "failureRate": 1, "showPreview": true}], "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "prompt": "\n

Solution is:

\n

$y=\\;\\;$[[0]]

\n

Input all numbers as integers or fractions – not as decimals.

\n "}], "variable_groups": [], "preamble": {"js": "", "css": ""}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "functions": {"graphsolution": {"definition": "var c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//var m=Math.abs((c-d*Math.exp(a))/(-a)*Math.exp(-(1-c*a/(d*Math.exp(a)-c))));\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n {boundingBox:[-5,30,5,-30],\n axis:false,\n showNavigation:true,\n grid:true});\nvar brd = div.board; \n var xas = brd.create('line',[[0,0],[1,0]], { strokeColor: 'black',fixed:true});\n var xticks = brd.create('ticks',[xas,1],{\ndrawLabels: true,\nlabel: {offset: [-4, -10]},\nminorTicks: 0\n });\n var yas = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black',fixed:true});\n var yticks = brd.create('ticks',[yas,5],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n }); \nvar p=brd.create('point',[0,1],{fixed:true,name:''});\nvar q=brd.create('line',[[0,0],[1,c]],{fixed:true,name:'',dash:2});\nvar tree;\n//x is the variable in the equation to be input\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//create a functiongraph from the student input\nfunction userf(t){\nif(tree) {\n try {\nnscope.variables.x.value = t;\n//the user input is evaluated at x=t\n var val = Numbas.jme.evaluate(tree,nscope).value;\n return val;\n }\n catch(e) {\nreturn 0;\n }\n}\nelse\n return 0;\n}\nvar curve=brd.create('functiongraph',[userf,-10,10],{strokeColor:'red',strokeWidth:2});\n\n //pick up the student answer and is parsed\n question.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[0].gaps[0].display.studentAnswer();\ntry {\n tree = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n tree = null;\n}\ncurve.updateCurve();\n\nbrd.update();\n});\n }); \n\nreturn div;\n ", "language": "javascript", "parameters": [], "type": "html"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..5)", "templateType": "anything", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..7)", "templateType": "anything", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "templateType": "anything", "description": ""}}, "ungrouped_variables": ["a", "c", "b"], "type": "question"}, {"name": "Eigenvalues & eigenvectors of a 2x2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}], "functions": {}, "variables": {"a12": {"name": "a12", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "k*(a11-c1)"}, "lambda2": {"name": "lambda2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "max({c1},{a11}+{a22}-{c1})"}, "c1": {"name": "c1", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(14..20#1)"}, "k": {"name": "k", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(1..6#1)"}, "lambda1": {"name": "lambda1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "min({c1},{a11}+{a22}-{c1})"}, "a11": {"name": "a11", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(1..10#1)"}, "a22": {"name": "a22", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "{k}*{a21}+{c1}"}, "a21": {"name": "a21", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(1..5#1)"}}, "metadata": {"description": "

This question concerns the evaluation of the eigenvalues and corresponding eigenvectors of a 2x2 matrix.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"variableReplacements": [], "minValue": "lambda1", "showCorrectAnswer": true, "type": "numberentry", "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "precision": 0, "correctAnswerFraction": false, "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "lambda1", "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "lambda2", "showCorrectAnswer": true, "type": "numberentry", "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "precision": 0, "correctAnswerFraction": false, "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "lambda2", "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain"}], "prompt": "

Calculate the eigenvalues of the matrix A

\n

\\(\\lambda_1\\) is the lesser of the two eigenvalues and \\(\\lambda_2\\) is the greater of the two eigenvalues;

\n

\\(\\lambda_1\\) = [[0]]

\n

\\(\\lambda_2\\) = [[1]]

", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}, {"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"variableReplacements": [], "minValue": "{lambda1}-{a22}", "showCorrectAnswer": true, "type": "numberentry", "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "precision": 0, "correctAnswerFraction": false, "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "{lambda1}-{a22}", "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "{lambda2}-{a22}", "showCorrectAnswer": true, "type": "numberentry", "precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "precision": 0, "correctAnswerFraction": false, "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "{lambda2}-{a22}", "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "marks": 1, "correctAnswerStyle": "plain"}], "prompt": "

For the lesser eigenvalue \\(\\lambda_1\\) the corresponding eigenvector is \\(v_1=\\begin{pmatrix}x\\\\ \\var{a21}\\\\ \\end{pmatrix}\\)

\n

Enter the value for \\(x=\\) [[0]]

\n

For the greater eigenvalue \\(\\lambda_2\\) the corresponding eigenvector is \\(v_1=\\begin{pmatrix}x\\\\ \\var{a21}\\\\ \\end{pmatrix}\\)

\n

Enter the value for \\(x=\\) [[1]]

\n

", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}], "rulesets": {}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "tags": [], "statement": "

Given the matrix

\n

\\(A =\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\)

", "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a11", "c1", "a12", "k", "a21", "a22", "lambda1", "lambda2"], "advice": "

The eigenvalues of a matrix are the values of \\(\\lambda\\) that satisfy the relation

\n

\\(|A-\\lambda I| = 0\\)

\n

\\(\\begin{vmatrix} \\var{a11}-\\lambda&\\var{a12}\\\\ \\var{a21}&\\var{a22}-\\lambda\\\\ \\end{vmatrix}=0\\)

\n

This gives:

\n

\\((\\var{a11}-\\lambda)*(\\var{a22}-\\lambda)-(\\var{a12})*(\\var{a21})=0\\)

\n

\\(\\lambda^2-\\simplify{{a11}+{a22}}\\lambda+\\simplify{{a11}*{a22}-{a21}*{a12}}=0\\)

\n

This can be solved using factorisation or by formula to give:

\n

\\(\\lambda =\\var{lambda1}\\) and \\(\\lambda =\\var{lambda2}\\)

\n

An eigenvector \\(v=\\begin{pmatrix} x\\\\ y\\\\ \\end{pmatrix}\\) corresponding to an eigenvalue \\(\\lambda\\) must satisfy the relation:  \\((A-\\lambda I)v = 0\\)

\n

so for \\(\\lambda=\\var{lambda1}\\)  

\n

\\(\\begin{pmatrix} \\simplify{{a11}-{lambda1}}&\\var{a12}\\\\ \\var{a21}&\\simplify{{a22}-{lambda1}}\\\\ \\end{pmatrix}\\begin{pmatrix} x\\\\ \\var{a21}\\\\ \\end{pmatrix}=0\\)           

\n

thus

\n

\\(\\var{a21}x+\\simplify{{a22}-{lambda1}}*\\var{a21}=0\\)

\n

\\(\\var{a21}x=-\\simplify{({a22}-{lambda1})*{a21}}\\)

\n

\\(x=-\\simplify{({a22}-{lambda1})}\\)

\n

", "type": "question"}]}], "showstudentname": true, "timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}, "allowPause": true}, "name": "more sophisticated mathematics examples", "percentPass": 0, "navigation": {"reverse": true, "startpassword": "", "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "browse": true, "showfrontpage": true, "onleave": {"action": "none", "message": ""}}, "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "this is a collection of NUMBAS questions taken straight from the NUMBAS database with no editing."}, "duration": 0, "showQuestionGroupNames": false, "feedback": {"feedbackmessages": [], "showtotalmark": true, "intro": "", "advicethreshold": 0, "showanswerstate": true, "allowrevealanswer": true, "showactualmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "type": "exam", "contributors": [{"name": "Josh Lim", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2990/"}], "extensions": ["jsxgraph", "codewords", "permutations", "stats"], "custom_part_types": [], "resources": []}