// Numbas version: exam_results_page_options {"name": "Gauss-Seidel method #2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Gauss-Seidel method #2", "statement": "

Perform the first three iterations of the Jacobi method on the system of simultaneous linear equations below, taking   \\(y_0=\\var{y0},\\,\\,\\,z_0=\\var{z0}\\) as your initial guess.

\n

\\(\\var{a1}x+\\var{a2}y+\\var{a3}z=\\var{r}\\)

\n

\\(\\var{a4}x+\\var{a5}y+\\var{a6}z=\\var{s}\\)

\n

\\(\\var{a7}x+\\var{a8}y+\\var{a9}z=\\var{t}\\)

\n

Give all your answers correct to three decimal places.

", "preamble": {"css": "", "js": ""}, "rulesets": {}, "extensions": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "tags": [], "advice": "

Rearranging the equations gives the following:

\n

\\(x_{n+1}=\\frac{1}{\\var{a1}}(\\var{r}-\\var{a2}y_n-\\var{a3}z_n)\\)

\n

\\(y_{n+1}=\\frac{1}{\\var{a5}}(\\var{s}-\\var{a4}x_{n+1}-\\var{a6}z_n)\\)

\n

\\(z_{n+1}=\\frac{1}{\\var{a9}}(\\var{t}-\\var{a7}x_{n+1}-\\var{a8}y_{n+1})\\)

\n

\\(y_0=\\var{y0},\\,\\,\\,z_0=\\var{z0}\\)

\n

\n

\\(x_1=\\frac{1}{\\var{a1}}(\\var{r}-\\var{a2}(\\var{y0})-\\var{a3}(\\var{z0}))=\\frac{1}{\\var{a1}}(\\simplify{{r}-{a2}*{y0}-{a3}*{z0}})=\\var{x1}\\)

\n

\\(y_1=\\frac{1}{\\var{a5}}(\\var{s}-\\var{a4}(\\var{x1})-\\var{a6}(\\var{z0}))=\\frac{1}{\\var{a5}}(\\simplify{{s}-{a4}*{x1}-{a6}*{z0}})=\\var{y1}\\)

\n

\\(z_1=\\frac{1}{\\var{a9}}(\\var{t}-\\var{a7}(\\var{x1})-\\var{a8}(\\var{y1}))=\\frac{1}{\\var{a9}}(\\simplify{{t}-{a7}*{x1}-{a8}*{y1}})=\\var{z1}\\)

\n

\n

\\(x_1=\\var{x1},\\,\\,\\,y_1=\\var{y1},\\,\\,\\,z_1=\\var{z1}\\)

\n

\n

\\(x_2=\\frac{1}{\\var{a1}}(\\var{r}-\\var{a2}(\\var{y1})-\\var{a3}(\\var{z1}))=\\frac{1}{\\var{a1}}(\\simplify{{r}-{a2}*{y1}-{a3}*{z1}})=\\var{x2}\\)

\n

\\(y_2=\\frac{1}{\\var{a5}}(\\var{s}-\\var{a4}(\\var{x2})-\\var{a6}(\\var{z1}))=\\frac{1}{\\var{a5}}(\\simplify{{s}-{a4}*{x2}-{a6}*{z1}})=\\var{y2}\\)

\n

\\(z_2=\\frac{1}{\\var{a9}}(\\var{t}-\\var{a7}(\\var{x2})-\\var{a8}(\\var{y2}))=\\frac{1}{\\var{a9}}(\\simplify{{t}-{a7}*{x2}-{a8}*{y2}})=\\var{z2}\\)

\n

\n

\\(x_2=\\var{x2},\\,\\,\\,y_2=\\var{y2},\\,\\,\\,z_2=\\var{z2}\\)

\n

\n

\\(x_3=\\frac{1}{\\var{a1}}(\\var{r}-\\var{a2}(\\var{y2})-\\var{a3}(\\var{z2}))=\\frac{1}{\\var{a1}}(\\simplify{{r}-{a2}*{y2}-{a3}*{z2}})=\\var{x3}\\)

\n

\\(y_3=\\frac{1}{\\var{a5}}(\\var{s}-\\var{a4}(\\var{x3})-\\var{a6}(\\var{z2}))=\\frac{1}{\\var{a5}}(\\simplify{{s}-{a4}*{x3}-{a6}*{z2}})=\\var{y3}\\)

\n

\\(z_3=\\frac{1}{\\var{a9}}(\\var{t}-\\var{a7}(\\var{x3})-\\var{a8}(\\var{y3}))=\\frac{1}{\\var{a9}}(\\simplify{{t}-{a7}*{x3}-{a8}*{y3}})=\\var{z3}\\)

\n

", "variable_groups": [{"name": "Unnamed group", "variables": []}], "variables": {"a5": {"name": "a5", "definition": "random(9..15#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "a7": {"name": "a7", "definition": "random(2..6#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "x3": {"name": "x3", "definition": "({r}-{a2}*{y2}-{a3}*{z2})/{a1}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x2": {"name": "x2", "definition": "({r}-{a2}*{y1}-{a3}*{z1})/{a1}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "s": {"name": "s", "definition": "{a4}*{x}+{a5}*{y}+{a6}*{z}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "z3": {"name": "z3", "definition": "({t}-{a7}*{x3}-{a8}*{y3})/{a9}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a6": {"name": "a6", "definition": "random(1..4#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "z1": {"name": "z1", "definition": "({t}-{a7}*{x1}-{a8}*{y1})/{a9}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a3": {"name": "a3", "definition": "random(1..3#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y": {"name": "y", "definition": "random(1..6#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "a2": {"name": "a2", "definition": "random(2..5#1)", "description": "

b

", "templateType": "randrange", "group": "Ungrouped variables"}, "z2": {"name": "z2", "definition": "({t}-{a7}*{x2}-{a8}*{y2})/{a9}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "z0": {"name": "z0", "definition": "{z}+1", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "z": {"name": "z", "definition": "random(1..10#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y3": {"name": "y3", "definition": "({s}-{a4}*{x3}-{a6}*{z2})/{a5}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a4": {"name": "a4", "definition": "random(2..5#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y0": {"name": "y0", "definition": "{y}+1", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a9": {"name": "a9", "definition": "a8+a7+2", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "t": {"name": "t", "definition": "{a7}*{x}+{a8}*{y}+{a9}*{z}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a1": {"name": "a1", "definition": "random(8..12#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "a8": {"name": "a8", "definition": "random(2..7#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y2": {"name": "y2", "definition": "({s}-{a4}*{x2}-{a6}*{z1})/{a5}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x": {"name": "x", "definition": "random(-3..3#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y1": {"name": "y1", "definition": "({s}-{a4}*{x1}-{a6}*{z0})/{a5}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x1": {"name": "x1", "definition": "({r}-{a2}*{y0}-{a3}*{z0})/{a1}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "r": {"name": "r", "definition": "{a1}*{x}+{a2}*{y}+{a3}*{z}", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "ungrouped_variables": ["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "x", "y", "z", "r", "s", "t", "y0", "z0", "x1", "y1", "z1", "x2", "y2", "z2", "x3", "y3", "z3"], "parts": [{"showFeedbackIcon": true, "marks": 0, "type": "gapfill", "variableReplacements": [], "scripts": {}, "gaps": [{"allowFractions": false, "precision": "3", "showPrecisionHint": false, "marks": "0.5", "precisionPartialCredit": 0, "variableReplacements": [], "mustBeReduced": false, "precisionType": "dp", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "showFeedbackIcon": true, "minValue": "{x1}", "strictPrecision": false, "correctAnswerStyle": "plain", "type": "numberentry", "maxValue": "{x1}", "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst"}, {"allowFractions": false, "precision": "3", "showPrecisionHint": false, "marks": "0.5", "precisionPartialCredit": 0, "variableReplacements": [], "mustBeReduced": false, "precisionType": "dp", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "showFeedbackIcon": true, "minValue": "{y1}", "strictPrecision": false, "correctAnswerStyle": "plain", "type": "numberentry", "maxValue": "{y1}", "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst"}, {"allowFractions": false, "precision": "3", "showPrecisionHint": false, "marks": "0.5", "precisionPartialCredit": 0, "variableReplacements": [], "mustBeReduced": false, "precisionType": "dp", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "showFeedbackIcon": true, "minValue": "{z1}", "strictPrecision": false, "correctAnswerStyle": "plain", "type": "numberentry", "maxValue": "{z1}", "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "prompt": "

\\(y_0=\\var{y0},\\,\\,\\,z_0=\\var{z0}\\)

\n

\\(x_1=\\) [[0]]  \\(y_1=\\) [[1]]  \\(z_1=\\) [[2]]

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

\\(x_2=\\) [[0]]  \\(y_2=\\) [[1]]  \\(z_2=\\) [[2]]

", "variableReplacementStrategy": "originalfirst"}, {"showFeedbackIcon": true, "marks": 0, "type": "gapfill", "variableReplacements": [], "scripts": {}, "gaps": [{"allowFractions": false, "precision": "3", "showPrecisionHint": false, "marks": "0.5", "precisionPartialCredit": 0, "variableReplacements": [], "mustBeReduced": false, "precisionType": "dp", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "showFeedbackIcon": true, "minValue": "{x3}", "strictPrecision": false, "correctAnswerStyle": "plain", "type": "numberentry", "maxValue": "{x3}", "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst"}, {"allowFractions": false, "precision": "3", "showPrecisionHint": false, "marks": "0.5", "precisionPartialCredit": 0, "variableReplacements": [], "mustBeReduced": false, "precisionType": "dp", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "showFeedbackIcon": true, "minValue": "{y3}", "strictPrecision": false, "correctAnswerStyle": "plain", "type": "numberentry", "maxValue": "{y3}", "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst"}, {"allowFractions": false, "precision": "3", "showPrecisionHint": false, "marks": "0.5", "precisionPartialCredit": 0, "variableReplacements": [], "mustBeReduced": false, "precisionType": "dp", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "showFeedbackIcon": true, "minValue": "({t}-{a7}*{x3}-{a8}*{y3})/{a9}", "strictPrecision": false, "correctAnswerStyle": "plain", "type": "numberentry", "maxValue": "({t}-{a7}*{x3}-{a8}*{y3})/{a9}", "precisionMessage": "You have not given your answer to the correct precision.", "scripts": {}, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "prompt": "

\\(x_3=\\) [[0]]  \\(y_3=\\) [[1]] \\(z_3=\\) [[2]] 

", "variableReplacementStrategy": "originalfirst"}], "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}