// Numbas version: exam_results_page_options {"name": "Jacobi iterative method", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Jacobi iterative method", "rulesets": {}, "functions": {}, "statement": "

Perform three iterations of the Jacobi method, taking  \$$x_0=\\var{x0}\$$  and  \$$y_0=\\var{y0}\$$  as your initial estimates, to partially solve the following system of equations:

\n

\$$\\var{a}x+\\var{b}y=\\var{r}\$$

\n

\$$\\var{c}x+\\var{d}y=\\var{s}\$$

\n

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

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

\n

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

\n

Rearrange equation (i) to make \$$x\$$ the subject and rearrange equation (ii) to make \$$y\$$ the subject

\n

(i)     \$$x_{n+1}=\\frac{1}{\\var{a}}[\\var{r}-\\var{b}y_{n}]\$$

\n

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

\n

\n

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

\n

\$$x_{1}=\\frac{1}{\\var{a}}[\\var{r}-\\var{b}*(\\var{y0})]=\\var{x1}\$$

\n

\$$y_{1}=\\frac{1}{\\var{d}}[\\var{s}-\\var{c}*(\\var{x0})]=\\var{y1}\$$

\n

\n

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

\n

\$$x_{2}=\\frac{1}{\\var{a}}[\\var{r}-\\var{b}*(\\var{y1})]=\\var{x2}\$$

\n

\$$y_{2}=\\frac{1}{\\var{d}}[\\var{s}-\\var{c}*(\\var{x1})]=\\var{y2}\$$

\n

\n

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

\n

\$$x_{3}=\\frac{1}{\\var{a}}[\\var{r}-\\var{b}*(\\var{y2})]=\\var{x3}\$$

\n

\$$y_{3}=\\frac{1}{\\var{d}}[\\var{s}-\\var{c}*(\\var{x2})]=\\var{y3}\$$

\n

\n

\$$(x_3,y_3)=(\\var{x3},\\,\\var{y3})\$$

\n

", "variable_groups": [], "variables": {"x2": {"name": "x2", "definition": "(r-b*y1)/a", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "y0": {"name": "y0", "definition": "y+e2", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "y": {"name": "y", "definition": "random(2..16#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "a": {"name": "a", "definition": "random(9..19#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "x": {"name": "x", "definition": "random(1..12#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y2": {"name": "y2", "definition": "(s-c*x1)/d", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "y1": {"name": "y1", "definition": "(s-c*x0)/d", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x4": {"name": "x4", "definition": "(r-b*y3)/a", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "s": {"name": "s", "definition": "c*x+d*y", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "d": {"name": "d", "definition": "random(7..16#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "y4": {"name": "y4", "definition": "(s-c*x3)/d", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "e2": {"name": "e2", "definition": "random(0.5..2#0.5)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "b": {"name": "b", "definition": "random(1..8#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "c": {"name": "c", "definition": "random(1..6#1)", "description": "", "templateType": "randrange", "group": "Ungrouped variables"}, "x0": {"name": "x0", "definition": "x+e1", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "r": {"name": "r", "definition": "a*x+b*y", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x3": {"name": "x3", "definition": "(r-b*y2)/a", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "y3": {"name": "y3", "definition": "(s-c*x2)/d", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x1": {"name": "x1", "definition": "(r-b*y0)/a", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "e1": {"name": "e1", "definition": "random(0.5..2.5#0.5)", "description": "

e1

\n

The initial estimates are:

\n

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

\n

The values generated by the first iteration are:

\n

\$$(x_1,y_1)=\$$ [[0]]

\n

The values generated by the second iteration are:

\n

\$$(x_2,y_2)=\$$ [[1]]

\n

The values generated by the third iteration are:

\n

\$$(x_3,y_3)=\$$ [[2]]

\n

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