2e03 tutorial assignment 3

.docx

School

University of Waterloo *

*We aren’t endorsed by this school

Course

2E04

Subject

Civil Engineering

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by shehzernaumani

Report
McMaster University Faculty of Engineering Civil Engineering Department CIVENG 2E03 – Computer Applications in Civil Engineering Fall 2023 Assignment 3 Due: Friday, Oct. 6th at noon Problem 1 If the Taylor series expansion of ? ( ? ) = 𝒆? is given by the following equation: e x = 1 + x + x 2 2 + x 3 3 ! + x 4 4 ! + + x n n! Employ zero- through seventh-order versions of the series to estimate ? ( ? ) = e x at ? = ? . 𝟓 . For each case, evaluate | ? t| and | ? a|. True Value: f(1.5) = e 1.5 = 4.481689 Zero Order: f(1.5) = 1 | Ɛ | = | 4.481689 1 4.481689 × 100% = 77.68% | Ɛ a | = N.A. First Order F(1.5) = 1 + 1.5 = 2.5 | Ɛ | = | 4.481689 2.5 4.481689 | 100% = 44.22% | Ɛ a |= | 2.5 1 2.5 | 100% = 60% Second Order F(1.5) = 1 + 1.5 + (1.5^2)/2 = 3.625 | Ɛ | = | 4.481689 3.625 4.481689 | 100% = 19.12%
| Ɛ a | ¿ | 3.625 2.5 3.625 | 100% = 31.03% Third Order: F(1.5) = 1 + 1.5 + (1.5^2)/2 + (1.5^3)/3! = 4.1875 | Ɛ | = | 4.481689 4.1875 4.481689 | 100% = 6.56% | Ɛ a | ¿ | 4.1875 3.625 4.1875 | 100% = 13.43% Fourth Order: F(1.5) = 1 + 1.5 + (1.5^2)/2 + (1.5^3)/3! + (1.5^4)/4! = 4.3984375 | Ɛ | = | 4.481689 4.3984375 4.481689 | 100% = 1.86% | Ɛ a | = | 4.3984375 4.1875 4.3984375 | 100% = 4.80% Fifth order: F(1.5) = 1 + 1.5 + (1.5^2)/2 + (1.5^3)/3! + (1.5^4)/4! + (1.5^5)/5! = 4.46171875 | Ɛ | = | 4.481689 4.46171875 4.481689 | 100% = 0.45% | Ɛ a | = | 4.46171875 4.3984375 4.46171875 | 100% = ¿ 1.42% Sixth Order: F(1.5) = 1 + 1.5 + (1.5^2)/2 + (1.5^3)/3! + (1.5^4)/4! + (1.5^5)/5! +(1.5^6)/6! = 4.477539063 | Ɛ | = | 4.481689 4.477539063 4.481689 | 100% = 0.092% | Ɛ a | = | 4.477539063 4.46171875 4.477539063 | 100% = 0.35% Seventh Order: F(1.5) = 1 + 1.5 + (1.5^2)/2 + (1.5^3)/3! + (1.5^4)/4! + (1.5^5)/5! +(1.5^6)/6! + (1.5^7)/7! =4.480929129
| Ɛ | = | 4.481689 4.480929129 4.481689 | 100% = 0.017% | Ɛ a | = | 4.480929129 4.477539063 4.480929129 | 100% = 0.076% Problem 2 For the given function . . . ? ( ? ) = 𝟒?^(𝟑) 𝟔?^(𝟐) + 𝟕? 𝟐 . 𝟑 Employ the bisection method to locate the root. Use an initial guess of ?? = ? and ?? = ? and iterate until the estimated error 𝜺? falls below a level of 𝜺? = ?? %. f(0) = 4(0)^3 – 6(0)^2 + 7(0) – 2.3 = -2.3 f(1) = 4(1)^3 -6(1)^2 +7(1) – 2.3 = 2.7 f(x l ) and f(x u ): f(x l )*f(x u ) f(0)*f(1) = -2.3*2.7 = -6.21 < 0 xl Xu Xr F(xl) F(xu) F(xr) F(xl)*f(xr ) F(xu)*f(xr) Ɛ a % 0 1 0.50 -2.3 2.7 0.2 -0.46<0 0.54 NA 0 0.5 0.25 -2.3 0.2 -0.8625 1.98375>0 -0.1725 100 0 0.25 0.125 -2.3 -0.8625 -1.02906 2.487025 0.08883125 100 0.125 0.25 0.1875 -0.8625 -1.02906 -0.42444 0.3657853 0.4244365 33.33 0.125 0.1875 0.15625 -0.8625 -0.42444 -0.02975 0.029755 -0.012572 16.67 0.125 0.15625 0.140625 -0.8625 -0.02975 -0.00202 0.0017449 -0.000575 10 x r = xl + xu 2 , Ɛ a = | xr ( current ) xr ( previous ) xr ( current ) | 100% Therefore, the approximate root is 0.140625.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help