// Numbas version: exam_results_page_options {"name": "Jacobi method #2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"y3": {"description": "", "name": "y3", "templateType": "anything", "definition": "(s-c*x2)/d", "group": "Ungrouped variables"}, "x2": {"description": "", "name": "x2", "templateType": "anything", "definition": "(r-b*y1)/a", "group": "Ungrouped variables"}, "y": {"description": "", "name": "y", "templateType": "randrange", "definition": "random(-6..6#1)", "group": "Ungrouped variables"}, "n": {"description": "", "name": "n", "templateType": "randrange", "definition": "random(1..3#1)", "group": "Ungrouped variables"}, "r": {"description": "", "name": "r", "templateType": "anything", "definition": "a*x+b*y", "group": "Ungrouped variables"}, "x3": {"description": "", "name": "x3", "templateType": "anything", "definition": "(r-b*y2)/a", "group": "Ungrouped variables"}, "x1": {"description": "", "name": "x1", "templateType": "anything", "definition": "(r-b*y0)/a", "group": "Ungrouped variables"}, "x0": {"description": "", "name": "x0", "templateType": "anything", "definition": "x+n", "group": "Ungrouped variables"}, "x": {"description": "", "name": "x", "templateType": "randrange", "definition": "random(1..10#1)", "group": "Ungrouped variables"}, "y0": {"description": "", "name": "y0", "templateType": "anything", "definition": "y-n", "group": "Ungrouped variables"}, "s": {"description": "", "name": "s", "templateType": "anything", "definition": "c*x+d*y", "group": "Ungrouped variables"}, "y2": {"description": "", "name": "y2", "templateType": "anything", "definition": "(s-c*x1)/d", "group": "Ungrouped variables"}, "d": {"description": "", "name": "d", "templateType": "randrange", "definition": "random(8..15#1)", "group": "Ungrouped variables"}, "c": {"description": "", "name": "c", "templateType": "randrange", "definition": "random(2..7#1)", "group": "Ungrouped variables"}, "y1": {"description": "", "name": "y1", "templateType": "anything", "definition": "(s-c*x0)/d", "group": "Ungrouped variables"}, "a": {"description": "", "name": "a", "templateType": "randrange", "definition": "random(6..12#1)", "group": "Ungrouped variables"}, "b": {"description": "

b

", "name": "b", "templateType": "randrange", "definition": "random(2..5#1)", "group": "Ungrouped variables"}}, "ungrouped_variables": ["a", "b", "c", "d", "x", "y", "r", "s", "x0", "n", "y0", "x1", "y1", "x2", "y2", "x3", "y3"], "tags": [], "preamble": {"css": "", "js": ""}, "rulesets": {}, "functions": {}, "advice": "

Rearranging the equations gives the following:

\n

\\(x_{n+1}=\\frac{1}{\\var{a}}(\\var{r}-\\var{b}y_n)\\)

\n

\\(y_{n+1}=\\frac{1}{\\var{d}}(\\var{s}-\\var{c}x_n)\\)

\n

\\(x_0=\\var{x0},\\,\\,\\,y_0=\\var{y0}\\)

\n

\\(x_1=\\frac{1}{\\var{a}}(\\var{r}-\\var{b}(\\var{y0}))=\\frac{1}{\\var{a}}(\\simplify{{r}-{b}*{y0}})=\\var{x1}\\)

\n

\\(y_1=\\frac{1}{\\var{d}}(\\var{s}-\\var{c}(\\var{x0}))=\\frac{1}{\\var{d}}(\\simplify{{s}-{c}*{x0}})=\\var{y1}\\)

\n

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

\n

\\(x_2=\\frac{1}{\\var{a}}(\\var{r}-\\var{b}(\\var{y1}))=\\frac{1}{\\var{a}}(\\simplify{{r}-{b}*{y1}})=\\var{x2}\\)

\n

\\(y_2=\\frac{1}{\\var{d}}(\\var{s}-\\var{c}(\\var{x1}))=\\frac{1}{\\var{d}}(\\simplify{{s}-{c}*{x1}})=\\var{y2}\\)

\n

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

\n

\\(x_3=\\frac{1}{\\var{a}}(\\var{r}-\\var{b}(\\var{y2}))=\\frac{1}{\\var{a}}(\\simplify{{r}-{b}*{y2}})=\\var{x3}\\)

\n

\\(y_3=\\frac{1}{\\var{d}}(\\var{s}-\\var{c}(\\var{x2}))=\\frac{1}{\\var{d}}(\\simplify{{s}-{c}*{x2}})=\\var{y3}\\)

", "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "name": "Jacobi method #2", "statement": "

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

\n

\\(\\var{a}x+\\var{b}y=\\var{r}\\)

\n

\\(\\var{c}x+\\var{d}y=\\var{s}\\)

\n

Give all your answers correct to three decimal places.

", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "parts": [{"type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

\\(x_0=\\var{x0},\\,\\,\\,y_0=\\var{y0}\\)

\n

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

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

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

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

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

", "gaps": [{"minValue": "{x3}", "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "type": "numberentry", "allowFractions": false, "precision": "3", "precisionPartialCredit": 0, "correctAnswerFraction": false, "strictPrecision": false, "mustBeReducedPC": 0, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "precisionType": "dp", "marks": "0.5", "showPrecisionHint": false, "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{x3}", "mustBeReduced": false}, {"minValue": "{y3}", "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "type": "numberentry", "allowFractions": false, "precision": "3", "precisionPartialCredit": 0, "correctAnswerFraction": false, "strictPrecision": false, "mustBeReducedPC": 0, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "precisionType": "dp", "marks": "0.5", "showPrecisionHint": false, "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{y3}", "mustBeReduced": false}]}], "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/"}]}