Uploaded by Sanchez Jhundell R. - BSME 2C

Numerical Methods Exercise 2 Solution: Integration Techniques

advertisement
11/21/24, 11:43 AM
Science
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
Engineering
Numerical Methods for Engineers (7th Edition)
Exercise 2
Chapter 21, Page 629
Numerical Methods for Engineers
ISBN: 9780073397924
Table of contents
Solution
Verified
3.8 (5 ratings)
Answered 1 month ago
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
1/7
11/21/24, 11:43 AM
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
1 of 5
Step 1
(a)
3
3
1
∫ (1 − e ) dx = (x + e−2x )
2
0
0
1 −6
1 0
=3+ e −0− e
2
2
1
= 3 + 6 − 0.5 ≈ 2.5012
2e
−2x
​
​
​
​
​
​
​
​
​
(b) The approximation of the value of the given integral using the trapezoidal rule can
be calculated by substituting the corresponding values into formula . The limits are
a = 0 and b = 3 and the function of interest is f (x) = 1 − e−2x .
I = (3 − 0 )
f (0) + f (3)
= 1.5 ⋅ (1 − e0 + 1 − e−6 ) ≈ 1.4963
2
​
​
(c) For n = 2, the distance between base points is
h=
3−0
= 1.5
2
​
and the base points are x0 = 0, x1 = 1.5 and x2 = 3. The integral approximation is
​
​
​
calculated using as follows. Note that because of (b), we already know that f (0) = 0
and f (3) = 0.99752
f (0) + 2f (1.5) + f (3)
2⋅2
−3
= 0.75 ⋅ (0 + 2 ⋅ (1 − e ) + 0.99752)
I = (3 − 0 )
​
= 2.1735
​
​
Explain this step
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
2/7
11/21/24, 11:43 AM
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
2 of 5
Step 2
For n = 4, the distance between base points is
h=
3−0
= 0.75
4
​
and the base points are x0 = 0, x1 = 0.75, x2 = 1.5, x3 = 2.25 and x4 = 3. The
​
​
​
​
​
integral approximation is calculated using as follows.
f (0) + 2 (f (0.75) + f (1.5) + f (2.25)) + f (3)
2⋅4
−1.5
−3
= 0.375 ⋅ (0 + 2 ⋅ (1 − e
+ 1 − e + 1 − e−4.5 ) + 0.99752)
I = (3 − 0 )
​
= 2.4111
​
​
(d) The approximation using this method is given by for x0 = 0, x1 = 1.5 and x2 = 3
​
​
​
.
f (0) + 4f (1.5) + f (3)
6
−3
= 0.5 ⋅ (0 + 4 ⋅ (1 − e ) + 0.99752)
I = (3 − 0 )
​
= 2.3992
​
​
(e) For n = 4, the distance between base points is
h=
3−0
= 0.75
4
​
and the base points are x0 = 0, x1 = 0.75, x2 = 1.5, x3 = 2.25 and x4 = 3. The
​
​
​
​
​
integral approximation is calculated using as follows.
f (0) + 4 (f (0.75) + f (2.25)) + 2f (1.5) + f (3)
3⋅4
−1.5
−4.5
= 0.25 ⋅ (0 + 4 ⋅ (1 − e
+ 1 − e ) + 2 (1 − e−3 ) + 0.99752)
I = (3 − 0 )
​
= 2.4902
​
​
Explain this step
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
3/7
11/21/24, 11:43 AM
pla
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
t s step
3 of 5
Step 3
(f) The approximation using this method is given by for x0 = 0, x1 = 1, x2 = 2 and
​
​
​
x3 = 3 .
​
f (0) + 3 (f (1) + f (2)) + f (3)
8
−2
= 0.375 ⋅ (0 + 3 ⋅ (1 − e + 1 − e−4 ) + 0.99752)
I = (3 − 0 )
​
= 2.4512
​
​
(g) As demonstrated in (b) part of , calculate the integral for the first two segments
using the 1/3 rule and the integral for the other segments using the 3/8 rule. Since
n = 5,
3−0
= 0.6
5
h=
​
Hence, the base points are x0 = 0, x1 = 0.6, x2 = 1.2, x3 = 1.8, x4 = 2.4 and
​
​
​
​
​
x5 = 3. Values of f at those points are
​
f (0) = 0
f (1.2) = 0.909282
f (2.4) = 0.99177
​
f (0.6) = 0.69881
f (1.8) = 0.972676
f (3) = 0.997521
​
Now evaluate the two integrals using formulae given by and and determine their sum
to obtain the final approximation as shown below.
f (0) + 4f (0.6) + f (1.2)
6
= 0.2 ⋅ (0 + 4 ⋅ 0.69881 + 0.909282)
= 0.7409
I1 = (1.2 − 0)
​
​
f (1.2) + 3 (f (1.8) + f (2.4)) + f (3)
8
= 0.225 ⋅ (0.909282 + 4 (0.972676 + 0.99177) + 0.997521)
I2 = (3 − 1.2)
​
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
​
​
4/7
11/21/24, 11:43 AM
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
= 2.197
I = I1 + I2 = 0.7409 + 2.197 = 2.938
​
​
​
Explain this step
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
5/7
11/21/24, 11:43 AM
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
4 of 5
Step 4
Finally, determine the percent relative error of each approximation as the ratio of the
difference between the true value of the integral and the approximation to the true
value. For example, for (b) part, the error is
εr =
​
1.4963 − 2.5012
= −40.18%
2.5012
​
Other errors are calculated in the same way.
method
approximation
εr
(b)
1.4963
−40.18%
(c)
2.1735
−13.1%
2.4111
−3.6%
(d)
2.3992
−4.08%
(e)
2.4902
−0.44%
(f)
2.4512
−1.99%
​
n=2
(c)
n=4
%
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
6/7
11/21/24, 11:43 AM
Numerical Methods for Engineers - 9780073397924 - Exercise 2 | Quizlet
(g)
2.3992
17.46%
Explain this step
5 of 5
Result
method
approximation
εr
(b)
1.4963
−40.18%
(c)
2.1735
−13.1%
2.4111
−3.6%
(d)
2.3992
−4.08%
(e)
2.4902
−0.44%
(f)
2.4512
−1.99%
(g)
2.3992
17.46%
​
n=2
(c)
n=4
file:///C:/Users/user/Downloads/Numerical_Methods_for_Engineers_-_9780073397924_-_Exercise_2___Quizlet.html
7/7
Download