You are on page 1of 6

Computational Methods MU

MEKELLE UNIVERSITY
COLLEGE OF NATURAL & COMPUTATIONAL SCIENCES
DEPARTMENT OF MATHEMATICS

Computational Methods Work Sheet I and II


1. If u = xy + yz + zx, find the relative percentage error in the evaluation of u for x = 2.104, y =
1.935, z = 0.845, which are the approximate values of the last digit.

2. If y = 0.31x+2.73
x+0.35 where the coefficients are round-off, find the absolute and relative errors of
y when x = 0.5 ± 0.1.

3. Use the Bisection Method to find out the positive square root of 30 correct to 2-decimal
places.

4. The displacement of a body moving in a simple harmonic motion is

y(t) = 2e(−t) sin(2t − 0.5), t≥0

find the value of t for which y(t) = 0.5. Use method of false position for obtaining the solution
with relative error less than 0.001.

5. The current in an electric circuit follows the equation I = 6e(−0.8t) sin(2t), where time t is
expressed in seconds. Determine the value of time when I = 4. Use secant method for solving
this equation and correct to four decimal places.

6. You are designing a spherical tank to hold water for a small village in a developing country.
The volume of the liquid it can hold can be computed as V = 31 πh2 (3R−h). where V=volume
[m2 ], h=depth of water in tank [m], and R=the tank radius [m].

Figure 1: Water Tank

If R = 3 m to what depth must the tank be filled so that it holds 30 m3 . Use four iteration
of Bisection method, Employ initial guess of 0 and R. Determine the number of iteration to
satisfy  = 0.001 using this method.

By: Natnael W. Page 1 natwel10@gmail.com


Computational Methods MU

7. Solve the following set of simultaneous linear equations using the LU decomposition method
 
 x+y+z =9  2x + y − z = 6
(a) 2x − 3y + 4z = 13 (b) x − 3y + 5z = 11
3x + y + 5z = 40 −x + 5y + 4z = 13
 

i. Using the LU decomposition (Doolittle’s method/Crout’s method )


ii. Using Gauss-Elimination method

8. An electronic company produces transistors, resistors, and computer chips. Each transistor
requires four units of copper, one units of zinc, and two units of glass. Each resistor requires
three, three, and one units of the three materials, respectively, and each computer chip requires
two, one, and three units of the three materials, respectively. Putting this information into
table form, we get: Supplies of these materials vary from week to week, so the company needs

Figure 2: Electronic Products

to determine a different production run each week. For example, one week the total amounts
of materials available are 960 units of copper, 510 units of zinc, and 610 units of glass. Set
up the system of equations modeling the production run, and solve in any direct method for
the number of transistors, resistors, and computer chips to manufacture this week.

9. A civil engineer involved in construction requires 4800, 5800, and 5700 m3 of sand, fine gravel,
and coarse gravel, respectively, for a building project. There are three pits from which these
materials can be obtained. The composition of these pits is How many cubic meters must be

Figure 3: Construction Material

hauled from each pit in order to meet the engineer’s needs? Solve using Gauss-Seidel iteration
method to an error less than one percent.

By: Natnael W. Page 2 natwel10@gmail.com


Computational Methods MU

10. Solve the current values based on KCL and KVL for the figure below

Figure 4: Electrical Circuit

(a) Using Gauss Elimination Method


(b) Using Gauss Seidel Iteration Method, where  = 0.001

11. The population of a town from national census agency was as given below.
t, (year) 1971 1981 1991 2001 2011
P (t), (P opulation) 46,000 66,000 81,000 93,000 101,000
Estimate the population for the year 2018.

12. The following data represents the function f (x) = cos(x + 1).
x 0.0 0.2 0.4 0.6
f (x) 0.5403 0.3624 0.1700 -0.0292
Estimate f (0.5) using Newton’s backward difference interpolation.

13. For the function f the Newton divided difference formula gives the interpolating polynomial
p3 (x) = 1 + 4x + 4x(x − 0.25) + 16/3x(x − 0.25)(x − 0.5) on the nodes x0 = 0, x1 = 0.25, x2 =
0.5, & x3 = 0.75. Find f (0.75).

14. The function y = f (x) is given at the points (7, 3), (8, 1), (9, 1), (10, 9). Find the value of y
for x = 9.5 using Lagrange’s interpolation formula.

15. Dynamic viscosity of water µ is related to temperature T in the following manner:


T (◦ C) 0 10 20 30 40
−3 2
µ (10 N.s/m ) 1.787 1.307 1.002 0.7975 0.6529

(a) Use Newton’s interpolation method to predict µ at T = 5 ◦ C.


(b) Fit the data to exponential µ = aebT and estimate µ at T = 5 ◦ C.
(c) Compare the results in (a) and (b) with the exact solution µ(5) = 1.519 × 10−3 ◦ C.

16. Use Newton’s divided difference formula and find f (7) if f (3) = 24, f (5) = 120, f (8) =
504, f (9) = 720, & f (12) = 1716.

17. The acceleration due to gravity at an altitude y above the surface of the earth is given by
y (m) 0 30,000 60,000 90,000 120,000
g (m/s2 ) 9.8100 9.7487 9.6879 9.6278 9.5682
Compute gravity g at an altitude y = 55, 000 m.

By: Natnael W. Page 3 natwel10@gmail.com


Computational Methods MU

18. The following table gives the marks scored by 100 students in Mechanical Engineering.
Range of marks 30-40 40-50 50-60 60-70 70-80 80-90 90-100
Marks 7 14 35 18 15 7 4

(a) Find the number of students who got more than 55 marks
(b) Find the number of students who scored marks less than 55 but not less than 50

19. Three disease-carrying organisms decay exponentially in Lake water according the following
model:
p(t) = Ae−1.5t + Be−0.3t + Ce−0.005t
Estimate the initial populations of each organism (A, B, and C) given the following measure-
t, hr 0.5 1 2 3 4 5 6 7 9
ments:
p(t) 6.0 4.4 3.2 2.7 2.2 1.9 1.7 1.4 1.1

20. The following table represents the velocity of a body during the time t.
t, time (sec.) 1 2 3 4 5
v, velocity (m/s) 3 5 8 11 12
Then find

(a) The displacement (s) of the body at t = 5 Using Simpson’s rule.


(b) The acceleration of the body at t = 1.

21. Working throughout with six decimal places accuracy, the approximate value of
Z 2
1+x
√3
dx
2
x + 2x + 5
0

Using the Trapezoidal rule with h = 0.25 and compute the maximum error.

22. If the velocity distribution of a fluid flowing through a pipe is known, the flow rate Q (that
R is,
the volume of water passing through the pipe per unit time) can computed by Q = v dA,
where v is the velocity and A is the pipes cross-sectional area. For circular pipe, A = πr2 and
dA = 2πrdr. where r is the radial distance measured outward from the center of the pipe. If
1
the velocity distribution is given by v = 2(1 − rr0 ) 6 where r0 is the total radius (in this case,
Rr
3cm). Compute Q from the integral 0 v dA using

(a) Trapezoidal rule, h = 1 (b) Simpson 1/3 rule, h = 0.5

Figure 5: Pipe

By: Natnael W. Page 4 natwel10@gmail.com


Computational Methods MU

23. A jet fighter’s position on aircraft carrier’s runway was timed during landing:
t, s 0 0.52 1.04 1.56 2.08 2.60 3.12
x, m 153 185 210 243 255 266 269
where x is the distance of the carrier. Estimate

(a) the velocity at t = 0.80 s (b) the acceleration at t = 2.80 s

dy d2 y
24. Using the given table ,find dx and dx2
at

(a) x = 1.0 (b) x = 1.1 (c) x = 2.1

x 1.0 1.2 1.4 1.6 1.8 2.0 2.2


y 2.7183 3.3201 4.0552 4.9530 6.0496 7.3891 9.0250

25. Evaluate the double integral


!
Z 2 Z 3
1
1 dx dy
1 1 (x2 + y 2 ) 2

using

(a) Trapezoidal rule with h = k = 0.5 (b) Simpson’s rule h = k = 0.25

26. Solve the differential equations by using Euler’s, Modified Euler’s, and Rung-Kutta
Methods for the following
dy
(a) dx = −2y + 4e−x from x = 0 to x = 1 using a step size of h = 0.2 with y(0) = 2.
dy 2
(b) dx = − xy3 from x = 0 to x = 1 using a step size of h = 0.2 with y(0) = 4.

Assignment In Group (5 to 6 students) 10 %


Numbers: #1, #6, #8, and #10 Submitted Date: 28/12/2018
Numbers: #13, #15, #19, #22, #25, and #26 Submitted Date: 24/01/2019

By: Natnael W. Page 5 natwel10@gmail.com


Computational Methods MU

MATLAB Program Assignment In Group (5 to 6 students)


1. The concentration of Pollutant bacteria in a lake decreases according to

C = 75e−1.5t + 20e−0.075t

Determine the time required for the bacteria concentration to be reduce to 15 using
Newton’s Raphson with an initial guess of t = 6.
2. Create a variable ftemp to restore a temperature in degrees Fahrenheit (F ). Convert
the degrees Celsius and store the result in a variable ctemp. The conversion factor is

C = 5/9 ∗ (F − 32)

3. Suppose the vehicle starts from rest at time t = 0 and its measured acceleration is
given in the following table.
x 0 1 2 3 4 5 6 7 8 9 10
y 0 2 4 7 11 17 24 32 41 48 51
Estimate the velocity after 10 seconds (Hint: Using Simpsons 1/3 rule)
4. On average, the surface area A of human beings is related to weight W and height H.
Measurements on a number of individuals of height 180 cm and different weights (kg)
give values of A (m2 ) in the following table:
W 70 75 77 80 82 84 87 90
A 2.10 2.12 2.15 2.20 2.22 2.23 2.26 2.30
Show that a power law A = aW b fits these data reasonably well. Evaluate the constants
a and b, and predict for the surface area is for a 95 kg person.
5. Develop Functional Matlab code for Regula-Falsi Method.
6. Develop Functional Matlab code for Lagrange’s interpolation formula and the plotting.

Submitted by soft copy (15 %)


Submitted Date: Jun, 24, 2019

By: Natnael W. Page 6 natwel10@gmail.com

You might also like