// Numbas version: exam_results_page_options {"name": "Gauss-Seidel method", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "tags": [], "variables": {"b2": {"name": "b2", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(12..18#1)"}, "a3": {"name": "a3", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..5#1)"}, "r1": {"name": "r1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a1*x+b1*y+c1*z"}, "c2": {"name": "c2", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..5#1)"}, "y0": {"name": "y0", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "y-est"}, "y": {"name": "y", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(3..9#1)"}, "y2": {"name": "y2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r2-a2*x2-c2*z1)/b2"}, "x2": {"name": "x2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r1-b1*y1-c1*z1)/a1"}, "z": {"name": "z", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(12..21#1)"}, "a2": {"name": "a2", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..7#1)"}, "c3": {"name": "c3", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(15..20#1)"}, "b1": {"name": "b1", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..5#1)"}, "z3": {"name": "z3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r3-a3*x3-b3*y3)/c3"}, "z2": {"name": "z2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r3-a3*x2-b3*y2)/c3"}, "r2": {"name": "r2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a2*x+b2*y+c2*z"}, "c1": {"name": "c1", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..5#1)"}, "est": {"name": "est", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(0.5..2.5#0.5)"}, "x1": {"name": "x1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r1-b1*y0-c1*z0)/a1"}, "b3": {"name": "b3", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(6..10#1)"}, "y1": {"name": "y1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r2-a2*x1-c2*z0)/b2"}, "z1": {"name": "z1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r3-a3*x1-b3*y1)/c3"}, "a1": {"name": "a1", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(10..16#1)"}, "y3": {"name": "y3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r2-a2*x3-c2*z2)/b2"}, "x": {"name": "x", "templateType": "randrange", "description": "", "group": "Ungrouped variables", "definition": "random(2..8#1)"}, "r3": {"name": "r3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "a3*x+b3*y+c3*z"}, "x3": {"name": "x3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "(r1-b1*y2-c1*z2)/a1"}, "z0": {"name": "z0", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "z+est"}}, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "name": "Gauss-Seidel method", "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "gaps": [{"variableReplacements": [], "minValue": "x1", "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": "55", "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "x1", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "y1", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "y1", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "z1", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "z1", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "x2", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "x2", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "y2", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "y2", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "z2", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "z2", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "x3", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "x3", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "y3", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "y3", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}, {"variableReplacements": [], "minValue": "z3", "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, "showPrecisionHint": false, "correctAnswerFraction": false, "precision": "3", "strictPrecision": false, "mustBeReducedPC": 0, "mustBeReduced": false, "maxValue": "z3", "allowFractions": false, "scripts": {}, "marks": "0.5", "correctAnswerStyle": "plain"}], "prompt": "

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

\n

The first iteration gives:

\n

\\(x_1=\\) [[0]]

\n

\\(y_1=\\) [[1]]

\n

\\(z_1=\\) [[2]]

\n

The second iteration gives:

\n

\\(x_2=\\) [[3]]

\n

\\(y_2=\\) [[4]]

\n

\\(z_2=\\) [[5]]

\n

The third iteration gives:

\n

\\(x_3=\\) [[6]]

\n

\\(y_3=\\) [[7]]

\n

\\(z_3=\\) [[8]]

", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0}], "statement": "

Perform the first three iterations in the Gauss-Seidel method on the following system of equations:

\n

\\(\\var{a1}x+\\var{b1}y+\\var{c1}z=\\var{r1}\\)

\n

\\(\\var{a2}x+\\var{b2}y+\\var{c2}z=\\var{r2}\\)

\n

\\(\\var{a3}x+\\var{b3}y+\\var{c3}z=\\var{r3}\\)

\n

taking   \\(y_0=\\var{y0}\\)   and   \\(z_0=\\var{z0}\\)

\n

Give all your answers correct to three decimal places.

", "variable_groups": [], "rulesets": {}, "functions": {}, "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["y3", "a1", "b1", "c1", "a2", "b2", "c2", "a3", "b3", "c3", "x", "y", "z", "r1", "r2", "est", "y0", "r3", "z0", "x1", "y1", "z1", "x2", "y2", "z2", "x3", "z3"], "advice": "

\\(\\var{a1}x+\\var{b1}y+\\var{c1}z=\\var{r1}\\)

\n

\\(\\var{a2}x+\\var{b2}y+\\var{c2}z=\\var{r2}\\)

\n

\\(\\var{a3}x+\\var{b3}y+\\var{c3}z=\\var{r3}\\)

\n

Rearranging the equations gives:

\n

\\(x_{n+1}=\\frac{1}{\\var{a1}}\\left(\\var{r1}-\\var{b1}y_n-\\var{c1}z_n\\right)\\)

\n

\\(y_{n+1}=\\frac{1}{\\var{b2}}\\left(\\var{r2}-\\var{a2}x_{n+1}-\\var{c2}z_n\\right)\\)

\n

\\(z_{n+1}=\\frac{1}{\\var{c3}}\\left(\\var{r3}-\\var{a3}x_{n+1}-\\var{b3}y_{n+1}\\right)\\)

\n

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

\n

\\(x_{1}=\\frac{1}{\\var{a1}}\\left(\\var{r1}-\\var{b1}*(\\var{y0})-\\var{c1}(\\var{z0})\\right)=\\var{x1}\\)

\n

\\(y_{1}=\\frac{1}{\\var{b2}}\\left(\\var{r2}-\\var{a2}*(\\var{x1})-\\var{c2}(\\var{z0})\\right)=\\var{y1}\\)

\n

\\(z_{1}=\\frac{1}{\\var{c3}}\\left(\\var{r3}-\\var{a3}*(\\var{x1})-\\var{b3}(\\var{y1})\\right)=\\var{z1}\\)

\n

\n

\\(x_{2}=\\frac{1}{\\var{a1}}\\left(\\var{r1}-\\var{b1}*(\\var{y1})-\\var{c1}(\\var{z1})\\right)=\\var{x2}\\)

\n

\\(y_{2}=\\frac{1}{\\var{b2}}\\left(\\var{r2}-\\var{a2}*(\\var{x2})-\\var{c2}(\\var{z1})\\right)=\\var{y2}\\)

\n

\\(z_{2}=\\frac{1}{\\var{c3}}\\left(\\var{r3}-\\var{a3}*(\\var{x2})-\\var{b3}(\\var{y2})\\right)=\\var{z2}\\)

\n

\n

\\(x_{3}=\\frac{1}{\\var{a1}}\\left(\\var{r1}-\\var{b1}*(\\var{y2})-\\var{c1}(\\var{z2})\\right)=\\var{x3}\\)

\n

\\(y_{3}=\\frac{1}{\\var{b2}}\\left(\\var{r2}-\\var{a2}*(\\var{x3})-\\var{c2}(\\var{z2})\\right)=\\var{y3}\\)

\n

\\(z_{3}=\\frac{1}{\\var{c3}}\\left(\\var{r3}-\\var{a3}*(\\var{x3})-\\var{b3}(\\var{y3})\\right)=\\var{z3}\\)

", "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/"}]}