0% found this document useful (0 votes)
11 views

Spring 2025_MTH603_1_BC240219076

The document provides calculations for absolute and relative errors using given true and approximate values, resulting in an absolute error of 0.006 and a relative error of approximately 0.1908%. It also details iterations of various numerical methods (bisection, Regula-Falsi, Newton-Raphson, and Secant) to approximate roots of different functions, with each method yielding new approximations after one iteration. The results of each method are summarized, indicating the new intervals or approximations for further iterations.

Uploaded by

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

Spring 2025_MTH603_1_BC240219076

The document provides calculations for absolute and relative errors using given true and approximate values, resulting in an absolute error of 0.006 and a relative error of approximately 0.1908%. It also details iterations of various numerical methods (bisection, Regula-Falsi, Newton-Raphson, and Secant) to approximate roots of different functions, with each method yielding new approximations after one iteration. The results of each method are summarized, indicating the new intervals or approximations for further iterations.

Uploaded by

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

Question no 1:

To compute the absolute and relative errors, we use the following formulas:
Given:
 True value T=3.146T = 3.146
 Approximate value A=3.14A = 3.14

1. Absolute Error:

Absolute Error=∣T−A∣=∣3.146−3.14∣=0.006\text{Absolute Error} = |T - A| = |3.146 - 3.14| =


0.006

2. Relative Error:

Relative Error=∣T−A∣∣T∣=0.0063.146≈0.001908\text{Relative Error} = \frac{|T - A|}{|T|} = \


frac{0.006}{3.146} \approx 0.001908
You can also express the relative error as a percentage:
Relative Error (%)≈0.001908×100≈0.1908%\text{Relative Error (\%)} \approx 0.001908 \times
100 \approx 0.1908\%

Final Answers:
 Absolute Error = 0.006
 Relative Error = 0.001908 (or 0.1908%)

Question no 2
Let's perform one iteration of the bisection method to approximate a root of:
f(x)=x3−x−2f(x) = x^3 - x - 2
over the interval [1,2][1, 2].

Step 1: Evaluate f(a)f(a) and f(b)f(b)


Let a=1a = 1, b=2b = 2
f(1)=13−1−2=−2f(1) = 1^3 - 1 - 2 = -2 f(2)=23−2−2=8−4=4f(2) = 2^3 - 2 - 2 = 8 - 4 = 4

Since f(1)⋅f(2)=−2⋅4=−8<0f(1) \cdot f(2) = -2 \cdot 4 = -8 < 0, there is a root in the interval [1,2]
[1, 2].

Step 2: Compute the midpoint


c=a+b2=1+22=1.5c = \frac{a + b}{2} = \frac{1 + 2}{2} = 1.5

Step 3: Evaluate f(c)f(c)


f(1.5)=(1.5)3−1.5−2=3.375−1.5−2=−0.125f(1.5) = (1.5)^3 - 1.5 - 2 = 3.375 - 1.5 - 2 = -0.125

Step 4: Determine the new interval


 f(1)=−2f(1) = -2
 f(1.5)=−0.125f(1.5) = -0.125
Both are negative, so the sign does not change between a=1a = 1 and c=1.5c = 1.5.
But f(1.5)⋅f(2)=−0.125⋅4=−0.5<0f(1.5) \cdot f(2) = -0.125 \cdot 4 = -0.5 < 0, so the new interval
is:
[1.5,2][1.5, 2]

Result of One Iteration:


 Midpoint: c=1.5c = 1.5
 f(c)=−0.125f(c) = -0.125
 New interval: [1.5,2][1.5, 2]
Let me know if you want to do more iterations!
Question no 3
Let's apply one iteration of the Regula-Falsi (False Position) Method to the function:
f(x)=x2−2f(x) = x^2 - 2
with initial guesses:
 x0=1x_0 = 1
 x1=2x_1 = 2

Step 1: Evaluate f(x0)f(x_0) and f(x1)f(x_1)


f(1)=12−2=−1f(1) = 1^2 - 2 = -1 f(2)=22−2=4−2=2f(2) = 2^2 - 2 = 4 - 2 = 2

Since f(1)⋅f(2)=−1⋅2=−2<0f(1) \cdot f(2) = -1 \cdot 2 = -2 < 0, a root exists in the interval [1,2]
[1, 2].

Step 2: Apply the Regula-Falsi Formula


The formula to compute the next approximation x2x_2 is:
x2=x1−f(x1)(x1−x0)f(x1)−f(x0)x_2 = x_1 - \frac{f(x_1)(x_1 - x_0)}{f(x_1) - f(x_0)}
Substitute the values:

x2=2−2(2−1)2−(−1)=2−2⋅13=2−23=43≈1.3333x_2 = 2 - \frac{2(2 - 1)}{2 - (-1)} = 2 - \frac{2 \


cdot 1}{3} = 2 - \frac{2}{3} = \frac{4}{3} \approx 1.3333

Step 3: Evaluate f(x2)f(x_2)


f(1.3333)≈(1.3333)2−2≈1.7777−2=−0.2222f(1.3333) \approx (1.3333)^2 - 2 \approx 1.7777 - 2 =
-0.2222

Final Answer (after one iteration):


 New approximation: x2≈1.3333x_2 \approx 1.3333
 f(x2)≈−0.2222f(x_2) \approx -0.2222
 The new interval is [x2,x1]=[1.3333,2][x_2, x_1] = [1.3333, 2], since the sign changes
between these two points.
Let me know if you’d like to continue with more iterations!
Queston no 4
Let's apply one iteration of the Newton-Raphson method to approximate a root of the function:
f(x)=x2−5f(x) = x^2 - 5
Step 1: Compute f(x)f(x) and f′(x)f'(x)
 f(x)=x2−5f(x) = x^2 - 5
 f′(x)=2xf'(x) = 2x

Step 2: Use the Newton-Raphson Formula


The update formula is:
xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}
Given x0=2x_0 = 2:
 f(2)=22−5=4−5=−1f(2) = 2^2 - 5 = 4 - 5 = -1

 f′(2)=2⋅2=4f'(2) = 2 \cdot 2 = 4
x1=2−−14=2+0.25=2.25x_1 = 2 - \frac{-1}{4} = 2 + 0.25 = 2.25

Final Answer (after one iteration):


 New approximation: x1=2.25x_1 = 2.25
Let me know if you want to continue with more iterations or try another method!
Question no 5
Let's apply one iteration of the Secant Method to approximate a root of:
f(x)=cos⁡(x)−xf(x) = \cos(x) - x
with initial guesses:
 x0=0.5x_0 = 0.5
 x1=1.0x_1 = 1.0

Step 1: Evaluate f(x0)f(x_0) and f(x1)f(x_1)


We’ll use approximate cosine values:
f(0.5)=cos⁡(0.5)−0.5≈0.8776−0.5=0.3776f(0.5) = \cos(0.5) - 0.5 \approx 0.8776 - 0.5 = 0.3776
f(1.0)=cos⁡(1.0)−1.0≈0.5403−1.0=−0.4597f(1.0) = \cos(1.0) - 1.0 \approx 0.5403 - 1.0 = -0.4597
Step 2: Apply the Secant Method Formula
The formula is:

x2=x1−f(x1)⋅x1−x0f(x1)−f(x0)x_2 = x_1 - f(x_1) \cdot \frac{x_1 - x_0}{f(x_1) - f(x_0)}


Substitute the values:

x2=1.0−(−0.4597)⋅1.0−0.5−0.4597−0.3776=1.0+0.4597⋅0.5−0.8373x_2 = 1.0 - (-0.4597) \cdot \


frac{1.0 - 0.5}{-0.4597 - 0.3776} = 1.0 + 0.4597 \cdot \frac{0.5}{-0.8373}
x2=1.0−0.229850.8373≈1.0−0.2746=0.7254x_2 = 1.0 - \frac{0.22985}{0.8373} \approx 1.0 -
0.2746 = 0.7254

Final Answer (after one iteration):


 New approximation: x2≈0.7254x_2 \approx 0.7254

You might also like