Numerical Methods for Engineers
Numerical Methods for Engineers
7th Edition
ISBN: 9780073397924
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 11, Problem 1P

Perform the same calculations as in (a) Example 11.1, and (b) Example 11.3, but for the tridiagonal system,

[ 0.8 0.4 0.4 0.8 0.4 0.4 0.8 ] { x 1 x 2 x 3 } = { 41 25 105 }

(a)

Expert Solution
Check Mark
To determine

To calculate: The solution of following tridiagonal system with Thomas Algorithm:

0.80.40.40.80.40.40.8{x1x2x3}={4125105}

Answer to Problem 1P

Solution:

The solution is x1=173.8123, x2=245.1247 and x3=253.9371

Explanation of Solution

Given:

A tridiagonal system:

0.80.400.40.80.400.40.8{x1x2x3}={4125105}

Formula used:

(a) The decomposition is implemented as:

ek=ekfk1

fk=fkekgk1

(2) Forward substitution is implemented as:

rk=rkek rk1

(3) Back substitution is implemented as:

xn=rnfn,

For kn1

xk=rkgkxk+1fk

Calculation:

Consider the system of equation:

0.80.400.40.80.400.40.8{x1x2x3}={4125105}

Where,

[A]=0.80.400.40.80.400.40.8

f1=0.8, f2=0.8, f3=0.8

g1=0.4, g2=0.4

e2=0.4, e3=0.4

r1=41, r2=25, r3=105

First the decomposition is implemented as:

e2=e2f1=0.40.8=0.5

Now,

f2=f2e2.g1=0.8(0.5)(0.4)=0.80.2=0.6

And,

e3=e3f2=0.40.6=0.667

And,

f3=f3e3.g2=0.8(0.667)(0.4)=0.533

Thus, the matrix [A] is transformed to,

0.80.400.50.60.400.6670.533

Now, the LU decomposition of the above matrix is,

[A]=[L][U]=1000.51000.66710.80.4000.60.4000.533

The forward substitution is implemented as:

r2=r2e2.r1=25(0.5)(41)=25+20.5=45.5

And,

r3=r3e3.r2=105(0.667)(45.5)=135.3485

Thus, the right-hand-side vector is modified to,

{4145.5135.3485}

The right-hand-side vector can be used in conjunction with the [U] matrix to perform back substitution and obtain the solution as:

x3=r3f3=135.34850.533=253.9371

Also,

x2=r2g2.x3f2=45.5(0.4)(253.9371)0.6=245.1247

And,

x1=r1g1.x2f1=41(0.4)(245.1247)0.8=173.8123

Thus, the solution of the given system of equation is x1=173.8123, x2=245.1247 and x3=253.9371.

(b)

Expert Solution
Check Mark
To determine

To calculate: The solution of following tridiagonal system of equation with Gauss-Seidel method:

0.80.400.40.80.400.40.8{x1x2x3}={4125105}

Answer to Problem 1P

Solution:

Using Gauss-Seidel method four iteration are performed to get x1=150.234375, x2=221.484375 and x3=241.9921875.

Explanation of Solution

Given:

A system of equation:

0.80.400.40.80.400.40.8{x1x2x3}={4125105}

Formula used:

(1) The values of x1, x2 and x3 are given by the formula:

x1=b1a12x2a13x3a11 ,

x2=b2a21x1a23x3a22,

x3=b3a31x1a32x2a33

(2) True percent relative error is given by,

εt=true valueapproximationtrue value×100%

(3) Convergence can be checked using the criterion

|εa,i|=|xijxij1xij|100%<εs

For all i, where j and j- 1 are the present and previous iterations.

Calculation:

The true solution is x1=173.8123, x2=245.1247 and x3=253.9371.

Consider the system of equation:

0.80.400.40.80.400.40.8{x1x2x3}={4125105}

Where,

[A]=0.80.400.40.80.400.40.8

{X}={x1x2x3}

{B}={4125105}

First, solve each of the equations for its unknown on the diagonal

x1=41(0.4)x2(0)x30.8 ...... (1)

x2=25(0.4)x1(0.4)x30.8 ...... (2)

x3=105(0)x1(0.4)x20.8 ...... (3)

For initial guess, assume x2=0 and x3=0.

Thus, equation (1) becomes,

x1=41(0.4)x2(0)x30.8=41(0.4)(0)(0)(0)0.8=410.8=51.25

This value, along with the assumed value of x3=0, can be substituted in equation (2) to calculate,

x2=25(0.4)x1(0.4)x30.8=25(0.4)(51.25)(0.4)(0)0.8=45.50.8=56.875

Now, substitute the calculated values of x1=51.25 and x2=56.875 into equation (3) to calculate,

x3=105(0)x1(0.4)x20.8=105(0)(51.25)(0.4)(56.875)0.8=127.750.8=159.6875

For the second iteration, the same process is repeated with x2=56.875 and x3=159.6875 to compute,

x1=41(0.4)x2(0)x30.8=41(0.4)(56.875)(0)(159.6875)0.8=63.750.8=79.6875

The true percent relative error is εt=true valueapproximationtrue value100%

Thus,

|εt|=|173.812379.6875173.8123|×100%=0.5415×100%=54.15%

The value of x1=79.6875, along with the calculated value of x3=159.6875, can be used to get,

x2=25(0.4)x1(0.4)x30.8=25(0.4)(79.6875)(0.4)(159.6875)0.8=120.750.8=150.9375

Thus,

|εt|=|245.1247150.9375245.1247|×100%=0.3842×100%=38.42%

Now, substitute the calculated values of x1=79.6875 and x2=150.9375 to calculate,

x3=105(0)x1(0.4)x20.8=105(0)(79.6875)(0.4)(150.9375)0.8=165.3750.8=206.71875

Thus,

|εt|=|253.9371150.9375253.9371|×100%=0.4056×100%=40.56%

For the third iteration, the same process is repeated with x2=150.9375 and x3=206.71875 to compute

x1=41(0.4)x2(0)x30.8=41(0.4)(150.9375)(0)(206.71875)0.8=126.71875

The true percent relative error is εt=true valueapproximationtrue value100%

Thus,

|εt|=|173.8123126.71875173.8123|×100%=0.2709×100%=27.09%

The value of x1=126.71875, along with the calculated value of x3=206.71875, can be used to get,

x2=25(0.4)x1(0.4)x30.8=25(0.4)(126.71875)(0.4)(206.71875)0.8=197.96875

Thus,

|εt|=|245.1247197.96875245.1247|×100%=0.1923×100%=19.23%

Now, substitute the calculated values of x1=126.71875 and x2=197.96875 to calculate,

x3=105(0)x1(0.4)x20.8=105(0)(126.71875)(0.4)(197.96875)0.8=230.234375

Thus,

|εt|=|253.9371230.234375253.9371|×100%=0.0933×100%=9.33%

For the fourth iteration, the same process is repeated with x2=197.96875 and x3=230.234375 to compute

x1=41(0.4)x2(0)x30.8=41(0.4)(197.96875)(0)(230.234375)0.8=150.234375

The true percent relative error is εt=true valueapproximationtrue value100%

Thus,

|εt|=|173.8123150.234375173.8123|×100%=0.1356×100%=13.56%

The value of x1=150.234375, along with the calculated value of x3=230.234375, can be used to get,

x2=25(0.4)x1(0.4)x30.8=25(0.4)(150.234375)(0.4)(230.234375)0.8=221.484375

Thus,

|εt|=|245.1247221.484375245.1247|×100%=0.0964×100%=9.64%

Now, substitute the calculated values of x1=150.234375 and x2=221.484375 to calculate,

x3=105(0)x1(0.4)x20.8=105(0)(150.234375)(0.4)(221.484375)0.8=241.9921875

Thus,

|εt|=|253.9371241.9921875253.9371|×100%=0.0470×100%=4.70%

The method is thus converging on the true solution.

Now, estimate the error:

|εa,1|=|150.234375126.71875150.234375|×100%=0.1565×100%=15.65%

|εa,2|=|221.484375197.96875221.484375|×100%=0.1061×100%=10.61%

|εa,3|=|241.9921875230.234375241.9921875|×100%=0.0485×100%=4.85%

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Find the LCD of [(3/x + 1)and (5/x - 1)]
(1 + 1)e dr 5.
[2 -1 1] If A = 0 2, find A? 1. [1

Chapter 11 Solutions

Numerical Methods for Engineers

01 - What Is A Differential Equation in Calculus? Learn to Solve Ordinary Differential Equations.; Author: Math and Science;https://www.youtube.com/watch?v=K80YEHQpx9g;License: Standard YouTube License, CC-BY
Higher Order Differential Equation with constant coefficient (GATE) (Part 1) l GATE 2018; Author: GATE Lectures by Dishank;https://www.youtube.com/watch?v=ODxP7BbqAjA;License: Standard YouTube License, CC-BY
Solution of Differential Equations and Initial Value Problems; Author: Jefril Amboy;https://www.youtube.com/watch?v=Q68sk7XS-dc;License: Standard YouTube License, CC-BY