Homework 10 Solution

Homework 10 Solution - Lecture 10 MEEN 357 Homework...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 10 MEEN 357 Homework Solution 1 Lecture-10-Homework-Solution-2009.doc RMB 1. Problem 12.1(a) of the textbook. Solution : You are asked to use the Gauss-Seidel method to solve 1 2 3 0.8 0.4 0 41 0.4 0.8 0.4 25 0 0.4 0.8 105 x x x ⎡⎤ ⎢⎥ −− = ⎣⎦ (10.1) You are instructed to continue the iteration until the percent relative error falls below 5% s ε = . You can work this problem by hand or by use of the function mfile GaussSeidel.m introduced in class. The solution here uses the function file. The MATLAB script %Problem 12.1a of the textbook. clc, clear all A=[0.8,-0.4,0;-0.4,0.8,-0.4;0,-0.4,0.8] b=[41;25;105] x0=[0;0;0] x=GaussSeidel(A,b,x0,5) yields the output x = 167.8711 239.1211 250.8105 in 6 iterations. The above solution starts the iteration at x0=[0;0;0] . A different starting point would produce the same answer in a different number of iterations. 2. Problem 12.2 of the textbook. Solution : The problem is essentially the same as the first one above except that the system of equations is 1 2 3 10 2 1 27 3 6 2 61.5 1 1 5 21.5 x x x = (10.2)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture 10 MEEN 357 Homework Solution 2 Lecture-10-Homework-Solution-2009.doc RMB As with the first problem above, you are instructed to continue the iteration until the percent relative error falls below 5% s ε = .
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/28/2010 for the course MEEN 357 taught by Professor Anamalai during the Fall '07 term at Texas A&M.

Page1 / 5

Homework 10 Solution - Lecture 10 MEEN 357 Homework...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online