0% found this document useful (0 votes)
25 views3 pages

Numerical Methods Homework 2 3

Numerical Methods HW 2 3

Uploaded by

max.nurislom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views3 pages

Numerical Methods Homework 2 3

Numerical Methods HW 2 3

Uploaded by

max.nurislom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Numerical Methods For Engineers: Homework 2

&3

December 2023

1 Numerical Differentiation and Integration


1. Use the formulas given in the section 4.1 in the textbook to determine,
as accurately as possible, approximations for each missing entry in the
following tables.

x f (x) f ′ (x)
2.1 -1.709845
2.2 -1.373823
2.3 -1.119214
2.4 -0.9160143
2.5 -0.7470223
2.6 -0.6015966

2. Perform the integration of the function f (x) = e2x sin(x + 1) + x21+1 over
the interval [0, 2], utilizing a step size of h = 0.2. Apply the following
numerical methods for this computation:
a) Composite Trapezoidal Rule;
b) Composite Simpson’s Rule; and
c) Composite Midpoint Rule.
3. Employ the Romberg integration method to calculate R3,3 and R4,4 values
for the integral of the function f (x) = x sin2 (x) − 2x sin(x) + 1 over the
interval [1, 4].

2 Initial-Value Problems for Ordinary Differen-


tial Equations
1. Solve the initial-value problem y ′ = t12 − yt − y 2 for 1 ≤ t ≤ 2 with the
initial condition y(1) = −1 by approximating y(2) using Euler’s method.

1
Perform the calculations with step sizes h = 0.2, h = 0.1, and h = 0.05.
Subsequently, compare the resulting approximate values with the actual
solution y(t) = − 1t , analyzing the actual errors.
2. Address the initial-value problem presented in Ex. 1 by employing Taylor’s
method of both second and fourth order, utilizing a step size of h =
0.1. After computing the solution, compare it with the exact solution by
determining the actual errors.
3. Apply the second-order and fourth-order Runge-Kutta methods to solve
the initial-value problem y ′ = −5y + 5t2 + 2t in the interval 0 ≤ t ≤ 1,
given the initial condition y(0) = 31 and a step size of h = 0.1. Then,
compare the obtained solutions with the actual solution y(t) = t2 + 31 e−5t
to evaluate their accuracy.

3 Direct Methods For Solving Linear System of


Equations
1. Apply the Gaussian Elimination Algorithm, including row interchanges as
needed, to solve the given linear systems:
(a)

x1 + x2 + x4 = 2,
2x1 + x2 − x3 + x4 = 1,
− x1 + 2x2 + 3x3 − x4 = 4,
3x1 − x2 − x3 + 2x4 = −3.

(b)

x1 + 1/2 · x2 + 1/3 · x3 + 1/4 · x4 = 1/6,


1/2 · x1 + 1/3 · x2 + 1/4 · x3 + 1/5 · x4 = 1/7,
1/3 · x1 + 1/4 · x2 + 1/5 · x3 + 1/6 · x4 = 1/8,
1/4 · x1 + 1/5 · x2 + 1/6 · x3 + 1/7 · x4 = 1/9.

2. Determine the LU decomposition for the given matrices.


 
3 −7 −2
(a) A = −3 5 1
6 −4 0
 
1 −2 −4 −3
2 −7 −7 −6
(b) A = −1

2 6 4
−4 −1 9 8

2
4 Iterative Techniques in Matrix Algebra
1. Determine the eigenvalues and their corresponding eigenvectors for the
matrices listed below:
 
−1 −1
(a)
1/3 1/6
 
3 2 −1
(b) 1 −2 3 
2 0 4
2. Perform the first 10 iterations using the Jacobi method, starting with
x(0) = 0, to approximate the solution of the linear system. Subsequently,
estimate the infinity norm ||x10 − x9 ||∞ .

x1 + 2x2 − 2x3 = 7,
x1 + x2 + x3 = 2,
2x1 + 2x2 + x3 = 5,

3. Perform the first 10 iterations using the Gauss-Seidel method, starting


with x(0) = 0, to approximate the solution of the linear system. Subse-
quently, estimate the infinity norm ||x10 − x9 ||∞ .

2x1 − x2 + x3 = −1,
2x1 + 2x2 + 2x3 = 4,
− x1 − x2 + 2x3 = −5,

You might also like