BCS-054 Solved Free Assignment 2024-25 Sem 5






Question 1.


(a) Explain each of the following concepts, along with at least one suitable example for each: (i) Fixed-point number representation (ii) round-off error (iii) representation of zero as floating point number (iv) significant digits in a decimal number representation (v) normalized representation of a floating point number (vi) overflow 

Ans:- Here’s an explanation of each of the specified concepts, along with suitable examples:


(i) Fixed-point Number Representation


**Explanation**: Fixed-point number representation is a method of representing real numbers where a fixed number of digits is allocated for the integer part and a fixed number of digits for the fractional part. This representation is particularly useful in applications where a specific range of values is known in advance, and it allows for efficient arithmetic operations.


**Example**: Consider a fixed-point representation with 8 bits for the integer part and 8 bits for the fractional part (commonly written as Q8.8). The number 3.25 would be represented as:

- Integer part: 3 (0000 0011 in binary)

- Fractional part: 0.25 (0000 0001 in binary for 1/4)

- Combined: 0000 0011.0000 0001


 (ii) Round-off Error


**Explanation**: Round-off error occurs when a number is approximated by a value that is close to it but not exactly the same due to the limited precision of the representation. This can lead to small discrepancies in calculations, especially when dealing with large numbers or many calculations.


**Example**: If the number π (approximately 3.14159) is rounded to two decimal places, it would be represented as 3.14. The round-off error in this case would be:

- True value: 3.14159

- Rounded value: 3.14

- Round-off error: 3.14159 - 3.14 = 0.00159


(iii) Representation of Zero as a Floating-Point Number


**Explanation**: In floating-point representation, zero can be represented in multiple ways, depending on the format used (like IEEE 754). In this format, zero can be represented as positive zero (+0) and negative zero (-0), which can behave differently in certain calculations.


**Example**: In IEEE 754 single-precision format:

- Positive zero: Sign bit = 0, Exponent = 00000000, Fraction = 00000000000000000000000

- Negative zero: Sign bit = 1, Exponent = 00000000, Fraction = 00000000000000000000000


### (iv) Significant Digits in Decimal Number Representation


**Explanation**: Significant digits (or significant figures) are the digits in a number that carry meaningful information about its precision. This includes all non-zero digits and any zeros that are between them or that come after a decimal point.


**Example**: In the number 0.00456, there are three significant digits (4, 5, and 6). The leading zeros do not count as significant because they only indicate the position of the decimal point.


 (v) Normalized Representation of a Floating-Point Number


**Explanation**: Normalized representation is a way to represent floating-point numbers such that there is only one non-zero digit before the decimal point. This helps to maximize precision by utilizing the available bits efficiently.


**Example**: The number 0.0045 can be normalized in scientific notation as:

- Unnormalized: 0.0045

- Normalized: 4.5 × 10⁻³

In binary floating-point representation, it might look like: 1.0011 × 2⁻⁸, where the leading bit (1) is the normalized bit.


 (vi) Overflow


**Explanation**: Overflow occurs when a calculation results in a number that exceeds the range that can be represented within the allotted bits of a fixed or floating-point number format. This can lead to errors or unexpected results in computations.


**Example**: In an 8-bit unsigned integer representation, the maximum value that can be represented is 255 (11111111 in binary). If an operation results in a value of 256, overflow occurs, and the result wraps around to 0 (00000000).


### Summary Table


| Concept                               | Explanation                                                                                      | Example                                     |

|---------------------------------------|--------------------------------------------------------------------------------------------------|---------------------------------------------|

| Fixed-point Number Representation      | Represents real numbers with fixed digits for integer and fractional parts.                     | 3.25 as Q8.8: 00000011.00000001           |

| Round-off Error                       | Discrepancies caused by approximating numbers due to limited precision.                        | π ≈ 3.14, Error = 0.00159                  |

| Representation of Zero                | Zero can be represented as +0 and -0 in floating-point format, affecting calculations.         | +0: 0 00000000 00000000, -0: 1 00000000 00000000 |

| Significant Digits                    | Digits that carry meaningful information about precision.                                       | 0.00456 has three significant digits (4, 5, 6) |

| Normalized Representation              | Ensures one non-zero digit before the decimal point, maximizing precision.                     | 0.0045 as 4.5 × 10⁻³                        |

| Overflow                              | Occurs when a calculation exceeds the representable range.                                     | 256 in 8-bit unsigned wraps around to 0    |


These concepts are fundamental in computer science and digital computing, ensuring accurate and efficient data representation and manipulation.


(b) Explain with suitable example that in computer arithmatics ( i.e., numbers represented in computer, with +, −, *, / as implemented in a computer) the multiplication operation( *) may not be distributive over plus , i.e. may not be true for some computer numbers a, b and c

Ans:-   In computer arithmetic, particularly when dealing with floating-point representations, the multiplication operation may not be distributive over addition. This means that for some numbers \( a \), \( b \), and \( c \), the equality:


\[

a \times (b + c) \neq (a \times b) + (a \times c)

\]


can occur due to rounding errors and limitations in precision. This is a result of how computers represent numbers and perform arithmetic operations.


Explanation


To illustrate this, let’s consider an example with floating-point arithmetic where precision plays a crucial role. 


 Example:


Let’s choose the following values:

- \( a = 1.0 \)

- \( b = 1 \times 10^{-20} \)

- \( c = 1 \times 10^{-20} \)


Now, let's calculate both sides of the distributive property:


1. **Left Side: \( a \times (b + c) \)**


   \[

   b + c = 1 \times 10^{-20} + 1 \times 10^{-20} = 2 \times 10^{-20}

   \]


   Now multiply by \( a \):


   \[

   1.0 \times (2 \times 10^{-20}) = 2 \times 10^{-20}

   \]


2. **Right Side: \( (a \times b) + (a \times c) \)**


   Calculate each multiplication:


   \[

   a \times b = 1.0 \times (1 \times 10^{-20}) = 1 \times 10^{-20}

   \]

   \[

   a \times c = 1.0 \times (1 \times 10^{-20}) = 1 \times 10^{-20}

   \]


   Now add the results:


   \[

   (1 \times 10^{-20}) + (1 \times 10^{-20}) = 2 \times 10^{-20}

   \]


In this case, both sides yield the same result:


\[

2 \times 10^{-20} = 2 \times 10^{-20}

\]


However, let’s consider a case where the precision of the computer's floating-point representation impacts the result. 


### New Example with Limitations of Floating Point:


Using the same numbers, but let's change the order of operations slightly and involve larger numbers, leading to a possible overflow or rounding error:


Let’s set:

- \( a = 1.0 \)

- \( b = 1 \times 10^{10} \)

- \( c = -1 \times 10^{10} + 1 \times 10^{-10} \)


**1. Left Side: \( a \times (b + c) \)**


Calculate \( b + c \):


\[

b + c = 1 \times 10^{10} + (-1 \times 10^{10} + 1 \times 10^{-10}) = 1 \times 10^{-10}

\]


Now multiply by \( a \):


\[

1.0 \times (1 \times 10^{-10}) = 1 \times 10^{-10}

\]


**2. Right Side: \( (a \times b) + (a \times c) \)**


Calculate each multiplication:


\[

a \times b = 1.0 \times (1 \times 10^{10}) = 1 \times 10^{10}

\]


\[

a \times c = 1.0 \times (-1 \times 10^{10} + 1 \times 10^{-10}) = -1 \times 10^{10} + 1 \times 10^{-10}

\]


Now add the results:


\[

(1 \times 10^{10}) + (-1 \times 10^{10} + 1 \times 10^{-10}) = 0 + 1 \times 10^{-10} = 1 \times 10^{-10}

\]



In this case, we get:


- **Left Side**: \( 1 \times 10^{-10} \)

- **Right Side**: \( 1 \times 10^{-10} \)


In this example, they happen to be equal, but let's modify \( b \) slightly, such that \( b = 1 \times 10^{20} \) and \( c = -1 \times 10^{20} + 1 \times 10^{-20} \). 


### Adjusted Example to Show Inequality


Suppose we take \( a = 1.0 \), \( b = 1 \times 10^{20} \), and \( c = -1 \times 10^{20} + 1 \times 10^{-20} \):


Then:

- **Left Side**: \( 1 \times (1 \times 10^{20} + (-1 \times 10^{20} + 1 \times 10^{-20})) = 1 \times (1 \times 10^{-20}) = 1 \times 10^{-20} \)


- **Right Side**:  \( (1.0 \times 1 \times 10^{20}) + (1.0 \times (-1 \times 10^{20} + 1 \times 10^{-20})) = 1 \times 10^{20} - 1 \times 10^{20} + 1 \times 10^{-20} = 1 \times 10^{-20} \)


If we shift values where they start to round off due to floating point precision limits, you might eventually find \( a \times (b + c) \) fails to equal \( (a \times b) + (a \times c) \).


**Summary**: In practice, due to the limited precision of floating-point arithmetic and the way calculations are performed, it is possible for \( a \times (b + c) \) to yield a different result than \( (a \times b) + (a \times c) \), demonstrating that multiplication may not always be distributive over addition in computer arithmetic.


(c) Find out to how many decimal places the value 22/ 7 is accurate as an approximation of 3.14159265, where the latter is value of ╥, calculated up to 8 places after decimal ?

Ans:-  To determine how accurate the value \( \frac{22}{7} \) is as an approximation of \( \pi \) (approximately \( 3.14159265 \)), we can follow these steps:


1. **Calculate the Decimal Value of \( \frac{22}{7} \)**:

   \[

   \frac{22}{7} \approx 3.14285714

   \]


2. **Calculate the Absolute Error**:

   \[

   \text{Absolute Error} = | \pi - \frac{22}{7} | = | 3.14159265 - 3.14285714 | \approx 0.00126449

   \]


3. **Determine the Decimal Places of Accuracy**:

   To find how many decimal places the approximation \( \frac{22}{7} \) is accurate compared to \( \pi \), we can compare the two values up to the eighth decimal place.


   - **Value of \( \pi \)**: \( 3.14159265 \)

   - **Value of \( \frac{22}{7} \)**: \( 3.14285714 \)


4. **Comparison**:

   - 3.14159265 (π)

   - 3.14285714 (22/7)


   Now let's compare the two numbers digit by digit:

   - **3** - Match

   - **.1** - Match

   - **4** - Match

   - **1** - Match

   - **5** - Match

   - **9** - Match

   - **2** - Match

   - **6** - Not a match (22/7 has 8 instead)


Since they differ starting from the eighth decimal place, we conclude:


(d) Calculate a bound for the truncation error in approximating f(x) = sin x by sin (x) = x − x 3 / (fact 3) + x5 / (fact 5), where −1 =< x =< 1 and (fact n) denotes factorial of n 

Ans:-  To calculate a bound for the truncation error in approximating \( f(x) = \sin x \) by the series


\[

\sin(x) \approx x - \frac{x^3}{3!} + \frac{x^5}{5!}

\]


we will use Taylor's remainder theorem. The Taylor series expansion for \( \sin x \) around \( x = 0 \) is given by:


\[

\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots

\]


Step 1: Identify the Remainder Term


The truncation error \( R_n(x) \) after the \( n \)-th term of the Taylor series can be expressed as:


\[

R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!} x^{n+1}

\]


for some \( c \) in the interval between \( 0 \) and \( x \).


 Step 2: Determine the Order of the Truncation Error


In our case, we are truncating after the \( x^5 \) term, so \( n = 5 \). Thus, the next term is \( \frac{-x^7}{7!} \).


The remainder term can be expressed as:


\[

R_5(x) = \frac{f^{(6)}(c)}{6!} x^6

\]


where \( f^{(6)}(c) \) is the sixth derivative of \( f(x) = \sin x \). The sixth derivative of \( \sin x \) is:


\[

f^{(6)}(x) = \sin x \quad (\text{since the derivatives of } \sin x \text{ are periodic})

\]


 Step 3: Bound the Derivative


On the interval \( -1 \leq x \leq 1 \), the maximum value of \( |\sin(c)| \) is 1 for any \( c \) in that interval. Therefore, we have:


\[

|f^{(6)}(c)| \leq 1

\]


 Step 4: Calculate the Bound for the Truncation Error


Now we can bound the truncation error:


\[

|R_5(x)| \leq \frac{1}{6!} |x|^6

\]


Since we are looking for the bound in the interval \( -1 \leq x \leq 1 \):


\[

|x|^6 \leq 1^6 = 1 \quad \text{for } -1 \leq x \leq 1

\]


Thus:


\[

|R_5(x)| \leq \frac{1}{6!} \cdot 1 = \frac{1}{720}

\]


(e) Obtain Approximate the value of (3.7)—1, using first three terms of Taylor’s series expansion.

Ans: - To approximate the value of \( f(x) = \frac{1}{x} \) at \( x = 3.7 \) using the first three terms of Taylor's series expansion, we first need to determine the Taylor series expansion around a point. A convenient choice is to expand around \( x = 3 \).


 Step 1: Taylor Series Expansion


The Taylor series for a function \( f(x) \) around a point \( a \) is given by:


\[

f(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \frac{f'''(a)}{3!}(x - a)^3 + \cdots

\]


 Step 2: Calculate Derivatives


1. **Function**: \( f(x) = \frac{1}{x} \)

2. **First derivative**: 

   \[

   f'(x) = -\frac{1}{x^2}

   \]

3. **Second derivative**: 

   \[

   f''(x) = \frac{2}{x^3}

   \]

4. **Third derivative**: 

   \[

   f'''(x) = -\frac{6}{x^4}

   \]


 Step 3: Evaluate at \( a = 3 \)


Now we will evaluate \( f(x) \) and its derivatives at \( a = 3 \):


1. \( f(3) = \frac{1}{3} \)

2. \( f'(3) = -\frac{1}{3^2} = -\frac{1}{9} \)

3. \( f''(3) = \frac{2}{3^3} = \frac{2}{27} \)

4. \( f'''(3) = -\frac{6}{3^4} = -\frac{6}{81} = -\frac{2}{27} \)


 Step 4: Form the Taylor Series Up to the Third Term


Now we substitute these values into the Taylor series formula:


\[

f(x) \approx f(3) + f'(3)(x - 3) + \frac{f''(3)}{2!}(x - 3)^2 + \frac{f'''(3)}{3!}(x - 3)^3

\]


Substituting the values:


\[

f(x) \approx \frac{1}{3} - \frac{1}{9}(x - 3) + \frac{2/27}{2}(x - 3)^2 - \frac{2/27}{6}(x - 3)^3

\]


 Step 5: Substitute \( x = 3.7 \)


Now we need to substitute \( x = 3.7 \):


\[

f(3.7) \approx \frac{1}{3} - \frac{1}{9}(3.7 - 3) + \frac{2}{54}(3.7 - 3)^2 - \frac{2}{162}(3.7 - 3)^3

\]


Calculating \( 3.7 - 3 = 0.7 \):


\[

f(3.7) \approx \frac{1}{3} - \frac{1}{9}(0.7) + \frac{2}{54}(0.7)^2 - \frac{2}{162}(0.7)^3

\]


Calculating each term:


1. First term: \( \frac{1}{3} \approx 0.3333 \)

2. Second term: 

   \[

   -\frac{1}{9}(0.7) = -\frac{0.7}{9} \approx -0.0778

   \]

3. Third term:

   \[

   \frac{2}{54}(0.7)^2 = \frac{2}{54}(0.49) = \frac{0.98}{54} \approx 0.0181

   \]

4. Fourth term:

   \[

   -\frac{2}{162}(0.7)^3 = -\frac{2}{162}(0.343) = -\frac{0.686}{162} \approx -0.00424

   \]


 Step 6: Sum the Approximations


Now summing these values:


\[

f(3.7) \approx 0.3333 - 0.0778 + 0.0181 - 0.00424

\]


Calculating the sum step by step:


1. \( 0.3333 - 0.0778 \approx 0.2555 \)

2. \( 0.2555 + 0.0181 \approx 0.2736 \)

3. \( 0.2736 - 0.00424 \approx 0.26936 \)


Question 2. 


(a) Solve the system of equations 

 4 x1+ x2+ 2X3 = 16 

 2x1 + 5x2 + 3x3 = 19 

 3x1+ 2x2 − x3 = 12 

using Gauss elimination method with partial pivoting

Ans:-   To solve the system of equations using the Gauss elimination method with partial pivoting, we will follow these steps:


1. **Set Up the Augmented Matrix**: Write the system of equations as an augmented matrix.

2. **Perform Partial Pivoting**: Rearrange rows to ensure that the largest absolute value in each column is at the top.

3. **Gaussian Elimination**: Use elementary row operations to convert the matrix to upper triangular form.

4. **Back Substitution**: Solve for the variables starting from the last row.


Step 1: Set Up the Augmented Matrix


The system of equations is:


\[

\begin{align*}

4x_1 + x_2 + 2x_3 &= 16 \quad (1)\\

2x_1 + 5x_2 + 3x_3 &= 19 \quad (2)\\

3x_1 + 2x_2 - x_3 &= 12 \quad (3)

\end{align*}

\]


The augmented matrix is:


\[

\begin{bmatrix}

4 & 1 & 2 & | & 16 \\

2 & 5 & 3 & | & 19 \\

3 & 2 & -1 & | & 12

\end{bmatrix}

\]


 Step 2: Perform Partial Pivoting


First, we check the first column to find the maximum absolute value in the first column:


- Row 1: \( |4| = 4 \)

- Row 2: \( |2| = 2 \)

- Row 3: \( |3| = 3 \)


The largest is in Row 1, so no changes are needed. We will proceed with Row 1 as the pivot row.


 Step 3: Gaussian Elimination


We will eliminate \( x_1 \) from the other rows.


1. **Eliminate \( x_1 \) from Row 2**:

   \[

   R_2 \leftarrow R_2 - \frac{2}{4} R_1 \implies R_2 \leftarrow R_2 - \frac{1}{2} R_1

   \]


   Calculation:

   \[

   R_2 = [2, 5, 3 | 19] - \frac{1}{2}[4, 1, 2 | 16] = [2 - 2, 5 - 0.5, 3 - 1 | 19 - 8] = [0, 4.5, 2 | 11]

   \]


2. **Eliminate \( x_1 \) from Row 3**:

   \[

   R_3 \leftarrow R_3 - \frac{3}{4} R_1

   \]


   Calculation:

   \[

   R_3 = [3, 2, -1 | 12] - \frac{3}{4}[4, 1, 2 | 16] = [3 - 3, 2 - 0.75, -1 - 1.5 | 12 - 12] = [0, 1.25, -3 | 0]

   \]


The augmented matrix now looks like this:


\[

\begin{bmatrix}

4 & 1 & 2 & | & 16 \\

0 & 4.5 & 2 & | & 11 \\

0 & 1.25 & -3 & | & 0

\end{bmatrix}

\]


3. **Next, we will eliminate \( x_2 \) from Row 3**:

   \[

   R_3 \leftarrow R_3 - \frac{1.25}{4.5} R_2

   \]


   Calculation:

   \[

   R_3 = [0, 1.25, -3 | 0] - \frac{1.25}{4.5}[0, 4.5, 2 | 11] = [0, 1.25 - 1.25, -3 - \frac{1.25 \times 2}{4.5} | 0 - \frac{1.25 \times 11}{4.5}]

   \]


   Simplifying:

   - \( -3 - \frac{2.5}{4.5} \) = \( -3 - 0.5556 \) = \( -3.5556 \)

   - \( 0 - \frac{13.75}{4.5} \) = \( -3.0556 \)


So,

\[

R_3 = [0, 0, -3.5556 | -3.0556]

\]


The augmented matrix now is:


\[

\begin{bmatrix}

4 & 1 & 2 & | & 16 \\

0 & 4.5 & 2 & | & 11 \\

0 & 0 & -3.5556 & | & -3.0556

\end{bmatrix}

\]


Step 4: Back Substitution


1. From Row 3: 

   \[

   -3.5556x_3 = -3.0556 \implies x_3 = \frac{-3.0556}{-3.5556} \approx 0.860

   \]


2. From Row 2:

   \[

   4.5x_2 + 2(0.860) = 11 \implies 4.5x_2 + 1.72 = 11 \implies 4.5x_2 = 9.28 \implies x_2 \approx \frac{9.28}{4.5} \approx 2.06

   \]


3. From Row 1:

   \[

   4x_1 + 1(2.06) + 2(0.860) = 16 \implies 4x_1 + 2.06 + 1.72 = 16 \implies 4x_1 = 16 - 3.78 \implies 4x_1 = 12.22 \implies x_1 \approx 3.055

   \]


Final Solution


Thus, the solution to the system of equations is approximately:


\[

x_1 \approx 3.055, \quad x_2 \approx 2.06, \quad x_3 \approx 0.860

\]


In vector form, this can be written as:


\[

\begin{bmatrix}

x_1 \\

x_2 \\

x_3

\end{bmatrix} \approx 

\begin{bmatrix}

3.055 \\

2.06 \\

0.860

\end{bmatrix}

\]


(b) Perform four iterations (rounded to four decimal places) using 

(i) Jacobi Method and 

(ii) Gauss-Seidel method , 

for the following system of equations.

 5 –5 –1 x1 –8 1 –4 1 x2 = –4 –2 1 –6 x3 – 18 With (0) x = (0, 0, 0)T . The exact solution is (1, 2, 3)T. Which method gives better approximation to the exact solution? 

Ans:-   To perform four iterations using the Jacobi Method and the Gauss-Seidel Method for the given system of equations, let's first express the equations clearly.


 Given System of Equations


We have the following system:


\[

\begin{align*}

1. & \quad 5x_1 - 5x_2 - x_3 = -4 \quad (1) \\

2. & \quad -x_1 - 4x_2 + x_3 = -18 \quad (2) \\

3. & \quad -2x_1 + x_2 - 6x_3 = 18 \quad (3)

\end{align*}

\]


 Step 1: Rearranging the Equations


To use both methods, we rearrange the equations to isolate each variable:


1. From equation (1):

   \[

   x_1 = \frac{-4 + 5x_2 + x_3}{5} \quad (4)

   \]


2. From equation (2):

   \[

   x_2 = \frac{-18 + x_1 + x_3}{-4} \quad (5)

   \]


3. From equation (3):

   \[

   x_3 = \frac{18 + 2x_1 - x_2}{6} \quad (6)

   \]


 Initial Guess


We start with an initial guess of \( x_1^{(0)} = 0 \), \( x_2^{(0)} = 0 \), \( x_3^{(0)} = 0 \).


---


 Jacobi Method Iterations


Using the formulas from (4), (5), and (6), we will perform the iterations.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = \frac{-4}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + 0 + 0}{-4} = \frac{-18}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(0) - 0}{6} = \frac{18}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = \frac{-4 + 22.5 + 3.0}{5} = \frac{21.5}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = \frac{-15.8}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = \frac{18 - 1.6 - 4.5}{6} = \frac{11.9}{6} \approx 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


 Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} = \frac{-4 + 19.75 + 1.9833}{5} = \frac{17.7333}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} = \frac{-11.7167}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} = \frac{18 + 8.6 - 3.95}{6} = \frac{22.65}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (x_1^{(3)}, x_2^{(3)}, x_3^{(3)}) = (3.5467, 2.9292, 3.7750) \)


Iteration 4:


Using \( (3.5467, 2.9292, 3.7750) \):

1. \( x_1^{(4)} = \frac{-4 + 5(2.9292) + 3.7750}{5} = \frac{-4 + 14.646 + 3.7750}{5} = \frac{14.4210}{5} \approx 2.8842 \)

2. \( x_2^{(4)} = \frac{-18 + 3.5467 + 3.7750}{-4} = \frac{-10.6783}{-4} \approx 2.6696 \)

3. \( x_3^{(4)} = \frac{18 + 2(3.5467) - 2.9292}{6} = \frac{18 + 7.0934 - 2.9292}{6} = \frac{22.1642}{6} \approx 3.6940 \)


**Result after Iteration 4**: \( (x_1^{(4)}, x_2^{(4)}, x_3^{(4)}) \approx (2.8842, 2.6696, 3.6940) \)


---


 Summary of Jacobi Method Results:

- **Iteration 1**: \( (-0.8, 4.5, 3.0) \)

- **Iteration 2**: \( (4.3, 3.95, 1.9833) \)

- **Iteration 3**: \( (3.5467, 2.9292, 3.7750) \)

- **Iteration 4**: \( (2.8842, 2.6696, 3.6940) \)


---


 Gauss-Seidel Method Iterations


In the Gauss-Seidel method, we use the newly computed values immediately.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + (-0.8) + 0}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(-0.8) - 4.5}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


 Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (To perform four iterations using the Jacobi Method and the Gauss-Seidel Method for the given system of equations, let's first express the equations clearly.


Given System of Equations


We have the following system:


\[

\begin{align*}

1. & \quad 5x_1 - 5x_2 - x_3 = -4 \quad (1) \\

2. & \quad -x_1 - 4x_2 + x_3 = -18 \quad (2) \\

3. & \quad -2x_1 + x_2 - 6x_3 = 18 \quad (3)

\end{align*}

\]


 Step 1: Rearranging the Equations


To use both methods, we rearrange the equations to isolate each variable:


1. From equation (1):

   \[

   x_1 = \frac{-4 + 5x_2 + x_3}{5} \quad (4)

   \]


2. From equation (2):

   \[

   x_2 = \frac{-18 + x_1 + x_3}{-4} \quad (5)

   \]


3. From equation (3):

   \[

   x_3 = \frac{18 + 2x_1 - x_2}{6} \quad (6)

   \]


 Initial Guess


We start with an initial guess of \( x_1^{(0)} = 0 \), \( x_2^{(0)} = 0 \), \( x_3^{(0)} = 0 \).


---


 Jacobi Method Iterations


Using the formulas from (4), (5), and (6), we will perform the iterations.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = \frac{-4}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + 0 + 0}{-4} = \frac{-18}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(0) - 0}{6} = \frac{18}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = \frac{-4 + 22.5 + 3.0}{5} = \frac{21.5}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = \frac{-15.8}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = \frac{18 - 1.6 - 4.5}{6} = \frac{11.9}{6} \approx 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


 Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} = \frac{-4 + 19.75 + 1.9833}{5} = \frac{17.7333}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} = \frac{-11.7167}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} = \frac{18 + 8.6 - 3.95}{6} = \frac{22.65}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (x_1^{(3)}, x_2^{(3)}, x_3^{(3)}) = (3.5467, 2.9292, 3.7750) \)


 Iteration 4:


Using \( (3.5467, 2.9292, 3.7750) \):

1. \( x_1^{(4)} = \frac{-4 + 5(2.9292) + 3.7750}{5} = \frac{-4 + 14.646 + 3.7750}{5} = \frac{14.4210}{5} \approx 2.8842 \)

2. \( x_2^{(4)} = \frac{-18 + 3.5467 + 3.7750}{-4} = \frac{-10.6783}{-4} \approx 2.6696 \)

3. \( x_3^{(4)} = \frac{18 + 2(3.5467) - 2.9292}{6} = \frac{18 + 7.0934 - 2.9292}{6} = \frac{22.1642}{6} \approx 3.6940 \)


**Result after Iteration 4**: \( (x_1^{(4)}, x_2^{(4)}, x_3^{(4)}) \approx (2.8842, 2.6696, 3.6940) \)


---


 Summary of Jacobi Method Results:

- **Iteration 1**: \( (-0.8, 4.5, 3.0) \)

- **Iteration 2**: \( (4.3, 3.95, 1.9833) \)

- **Iteration 3**: \( (3.5467, 2.9292, 3.7750) \)

- **Iteration 4**: \( (2.8842, 2.6696, 3.6940) \)


---


 Gauss-Seidel Method Iterations


In the Gauss-Seidel method, we use the newly computed values immediately.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + (-0.8) + 0}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(-0.8) - 4.5}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


 Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (To perform four iterations using the Jacobi Method and the Gauss-Seidel Method for the given system of equations, let's first express the equations clearly.


 Given System of Equations


We have the following system:


\[

\begin{align*}

1. & \quad 5x_1 - 5x_2 - x_3 = -4 \quad (1) \\

2. & \quad -x_1 - 4x_2 + x_3 = -18 \quad (2) \\

3. & \quad -2x_1 + x_2 - 6x_3 = 18 \quad (3)

\end{align*}

\]


 Step 1: Rearranging the Equations


To use both methods, we rearrange the equations to isolate each variable:


1. From equation (1):

   \[

   x_1 = \frac{-4 + 5x_2 + x_3}{5} \quad (4)

   \]


2. From equation (2):

   \[

   x_2 = \frac{-18 + x_1 + x_3}{-4} \quad (5)

   \]


3. From equation (3):

   \[

   x_3 = \frac{18 + 2x_1 - x_2}{6} \quad (6)

   \]


Initial Guess


We start with an initial guess of \( x_1^{(0)} = 0 \), \( x_2^{(0)} = 0 \), \( x_3^{(0)} = 0 \).


---


 Jacobi Method Iterations


Using the formulas from (4), (5), and (6), we will perform the iterations.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = \frac{-4}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + 0 + 0}{-4} = \frac{-18}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(0) - 0}{6} = \frac{18}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = \frac{-4 + 22.5 + 3.0}{5} = \frac{21.5}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = \frac{-15.8}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = \frac{18 - 1.6 - 4.5}{6} = \frac{11.9}{6} \approx 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


 Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} = \frac{-4 + 19.75 + 1.9833}{5} = \frac{17.7333}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} = \frac{-11.7167}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} = \frac{18 + 8.6 - 3.95}{6} = \frac{22.65}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (x_1^{(3)}, x_2^{(3)}, x_3^{(3)}) = (3.5467, 2.9292, 3.7750) \)


 Iteration 4:


Using \( (3.5467, 2.9292, 3.7750) \):

1. \( x_1^{(4)} = \frac{-4 + 5(2.9292) + 3.7750}{5} = \frac{-4 + 14.646 + 3.7750}{5} = \frac{14.4210}{5} \approx 2.8842 \)

2. \( x_2^{(4)} = \frac{-18 + 3.5467 + 3.7750}{-4} = \frac{-10.6783}{-4} \approx 2.6696 \)

3. \( x_3^{(4)} = \frac{18 + 2(3.5467) - 2.9292}{6} = \frac{18 + 7.0934 - 2.9292}{6} = \frac{22.1642}{6} \approx 3.6940 \)


**Result after Iteration 4**: \( (x_1^{(4)}, x_2^{(4)}, x_3^{(4)}) \approx (2.8842, 2.6696, 3.6940) \)


---


 Summary of Jacobi Method Results:

- **Iteration 1**: \( (-0.8, 4.5, 3.0) \)

- **Iteration 2**: \( (4.3, 3.95, 1.9833) \)

- **Iteration 3**: \( (3.5467, 2.9292, 3.7750) \)

- **Iteration 4**: \( (2.8842, 2.6696, 3.6940) \)


---


 Gauss-Seidel Method Iterations


In the Gauss-Seidel method, we use the newly computed values immediately.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + (-0.8) + 0}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(-0.8) - 4.5}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


 Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (To perform four iterations using the Jacobi Method and the Gauss-Seidel Method for the given system of equations, let's first express the equations clearly.


 Given System of Equations


We have the following system:


\[

\begin{align*}

1. & \quad 5x_1 - 5x_2 - x_3 = -4 \quad (1) \\

2. & \quad -x_1 - 4x_2 + x_3 = -18 \quad (2) \\

3. & \quad -2x_1 + x_2 - 6x_3 = 18 \quad (3)

\end{align*}

\]


 Step 1: Rearranging the Equations


To use both methods, we rearrange the equations to isolate each variable:


1. From equation (1):

   \[

   x_1 = \frac{-4 + 5x_2 + x_3}{5} \quad (4)

   \]


2. From equation (2):

   \[

   x_2 = \frac{-18 + x_1 + x_3}{-4} \quad (5)

   \]


3. From equation (3):

   \[

   x_3 = \frac{18 + 2x_1 - x_2}{6} \quad (6)

   \]


 Initial Guess


We start with an initial guess of \( x_1^{(0)} = 0 \), \( x_2^{(0)} = 0 \), \( x_3^{(0)} = 0 \).


---


 Jacobi Method Iterations


Using the formulas from (4), (5), and (6), we will perform the iterations.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = \frac{-4}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + 0 + 0}{-4} = \frac{-18}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(0) - 0}{6} = \frac{18}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = \frac{-4 + 22.5 + 3.0}{5} = \frac{21.5}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = \frac{-15.8}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = \frac{18 - 1.6 - 4.5}{6} = \frac{11.9}{6} \approx 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} = \frac{-4 + 19.75 + 1.9833}{5} = \frac{17.7333}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} = \frac{-11.7167}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} = \frac{18 + 8.6 - 3.95}{6} = \frac{22.65}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (x_1^{(3)}, x_2^{(3)}, x_3^{(3)}) = (3.5467, 2.9292, 3.7750) \)


 Iteration 4:


Using \( (3.5467, 2.9292, 3.7750) \):

1. \( x_1^{(4)} = \frac{-4 + 5(2.9292) + 3.7750}{5} = \frac{-4 + 14.646 + 3.7750}{5} = \frac{14.4210}{5} \approx 2.8842 \)

2. \( x_2^{(4)} = \frac{-18 + 3.5467 + 3.7750}{-4} = \frac{-10.6783}{-4} \approx 2.6696 \)

3. \( x_3^{(4)} = \frac{18 + 2(3.5467) - 2.9292}{6} = \frac{18 + 7.0934 - 2.9292}{6} = \frac{22.1642}{6} \approx 3.6940 \)


**Result after Iteration 4**: \( (x_1^{(4)}, x_2^{(4)}, x_3^{(4)}) \approx (2.8842, 2.6696, 3.6940) \)


---


Summary of Jacobi Method Results:

- **Iteration 1**: \( (-0.8, 4.5, 3.0) \)

- **Iteration 2**: \( (4.3, 3.95, 1.9833) \)

- **Iteration 3**: \( (3.5467, 2.9292, 3.7750) \)

- **Iteration 4**: \( (2.8842, 2.6696, 3.6940) \)


---


 Gauss-Seidel Method Iterations


In the Gauss-Seidel method, we use the newly computed values immediately.


 Iteration 1:


Using the initial guess \( (0, 0, 0) \):

1. \( x_1^{(1)} = \frac{-4 + 5(0) + 0}{5} = -0.8 \)

2. \( x_2^{(1)} = \frac{-18 + (-0.8) + 0}{-4} = 4.5 \)

3. \( x_3^{(1)} = \frac{18 + 2(-0.8) - 4.5}{6} = 3.0 \)


**Result after Iteration 1**: \( (x_1^{(1)}, x_2^{(1)}, x_3^{(1)}) = (-0.8, 4.5, 3.0) \)


 Iteration 2:


Using \( (-0.8, 4.5, 3.0) \):

1. \( x_1^{(2)} = \frac{-4 + 5(4.5) + 3.0}{5} = 4.3 \)

2. \( x_2^{(2)} = \frac{-18 + (-0.8) + 3.0}{-4} = 3.95 \)

3. \( x_3^{(2)} = \frac{18 + 2(-0.8) - 4.5}{6} = 1.9833 \)


**Result after Iteration 2**: \( (x_1^{(2)}, x_2^{(2)}, x_3^{(2)}) = (4.3, 3.95, 1.9833) \)


Iteration 3:


Using \( (4.3, 3.95, 1.9833) \):

1. \( x_1^{(3)} = \frac{-4 + 5(3.95) + 1.9833}{5} \approx 3.5467 \)

2. \( x_2^{(3)} = \frac{-18 + 4.3 + 1.9833}{-4} \approx 2.9292 \)

3. \( x_3^{(3)} = \frac{18 + 2(4.3) - 3.95}{6} \approx 3.7750 \)


**Result after Iteration 3**: \( (


Question 3. 

(a) Determine the smallest roots of the following equation: 

 f(x) = x2 cos (x) + sin (x) =0 

to three significant digits using 

(i) Regula-falsi method (ii) Newton Raphson method (iii) Bisection method (iv) Secant method 

Ans:-   To determine the smallest roots of the equation \( f(x) = x^2 \cos(x) + \sin(x) = 0 \) using the Regula-Falsi method, Newton-Raphson method, Bisection method, and Secant method, we will follow the procedures for each method. 


 Function Definition

The function we want to analyze is:


\[

f(x) = x^2 \cos(x) + \sin(x)

\]


 Step 1: Finding the Root Graphically

Before we apply numerical methods, it's helpful to know the approximate location of the root. We can evaluate the function at several points to find where it changes sign:


\[

\begin{align*}

f(0) & = 0^2 \cos(0) + \sin(0) = 0 \\

f(1) & = 1^2 \cos(1) + \sin(1) \approx 1 \cdot 0.5403 + 0.8415 \approx 1.3818 \\

f(2) & = 2^2 \cos(2) + \sin(2) \approx 4 \cdot (-0.4161) + 0.9093 \approx -0.6644 \\

f(3) & = 3^2 \cos(3) + \sin(3) \approx 9 \cdot (-0.9899) + 0.1411 \approx -8.8480 \\

\end{align*}

\]


From the calculations, we can see:

- \( f(0) = 0 \) (the function touches zero at 0)

- \( f(1) \) is positive and \( f(2) \) is negative.


Thus, we know there is a root between \( (1, 2) \) since \( f(1) > 0 \) and \( f(2) < 0 \).


---


 (i) Regula-Falsi Method

The Regula-Falsi method, also known as the false position method, is an iterative technique used to find the root of a function.


**Initialization:**

- Let \( a = 1 \), \( b = 2 \)


**Iteration Steps:**

1. Calculate \( f(a) \) and \( f(b) \)

2. Find the root approximation using:

   \[

   c = \frac{a f(b) - b f(a)}{f(b) - f(a)}

   \]

3. Update \( a \) or \( b \) based on the sign of \( f(c) \)

4. Repeat until convergence.


 Implementation:

We will perform three iterations of the Regula-Falsi method.


**Iteration 1:**

- \( f(1) = 1.3818 \)

- \( f(2) = -0.6644 \)

- \( c = \frac{1 \cdot (-0.6644) - 2 \cdot (1.3818)}{-0.6644 - 1.3818} \approx 1.57 \)


Update:

- Since \( f(1.57) \) is needed:

  \[

  f(1.57) = (1.57)^2 \cos(1.57) + \sin(1.57) \approx 0.1294 + 0.9999 \approx 1.1293

  \]

- Update \( b = 1.57 \)


**Iteration 2:**

- New interval: \( a = 1, b = 1.57 \)

- \( f(1.57) \approx 1.1293 \)

- \( c = \frac{1 \cdot (1.1293) - 1.57 \cdot (1.3818)}{1.1293 - 1.3818} \approx 1.412 \)


Update:

- Since \( f(1.412) \) is needed:

  \[

  f(1.412) = (1.412)^2 \cos(1.412) + \sin(1.412) \approx 0.0847 + 0.9886 \approx 1.0733

  \]

- Update \( b = 1.412 \)


**Iteration 3:**

- New interval: \( a = 1, b = 1.412 \)

- \( f(1.412) \approx 1.0733 \)

- \( c = \frac{1 \cdot (1.0733) - 1.412 \cdot (1.3818)}{1.0733 - 1.3818} \approx 1.357 \)


**Result of Regula-Falsi Method:**

After these iterations, we can continue until the required accuracy is reached.


---


(ii) Newton-Raphson Method

The Newton-Raphson method uses the derivative of the function to find the root.


**Formula:**

\[

x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}

\]


**Finding the Derivative:**

To apply this method, we need \( f'(x) \):

\[

f'(x) = 2x \cos(x) - x^2 \sin(x) + \cos(x)

\]


**Initialization:**

Let's start with \( x_0 = 1 \).


**Iterations:**


1. **Iteration 1:**

   - \( x_0 = 1 \)

   - \( f(1) = 1.3818 \)

   - \( f'(1) = 2 \cdot 1 \cdot 0.5403 - 1^2 \cdot 0.8415 + 0.5403 \approx 0.2381 \)

   - Update:

   \[

   x_1 = 1 - \frac{1.3818}{0.2381} \approx 0.2413

   \]


2. **Iteration 2:**

   - \( f(0.2413) = 0.0807 \)

   - \( f'(0.2413) = \text{(calculate similarly)} \)

   - Update until convergence.


**Result of Newton-Raphson Method:**

Continue iterations until \( |x_{n+1} - x_n| < \epsilon \).


---


 (iii) Bisection Method

The Bisection method divides the interval in half and checks the sign of the function.


**Initialization:**

- \( a = 1 \), \( b = 2 \)


**Iterations:**

1. **Iteration 1:**

   - Midpoint \( c = \frac{1 + 2}{2} = 1.5 \)

   - \( f(1.5) \) and determine whether to keep \( a \) or \( b \).


Continue for four iterations or until sufficient accuracy is reached.


---


(iv) Secant Method

The Secant method approximates the derivative using two previous points.


**Initialization:**

- Start with \( x_0 = 1 \) and \( x_1 = 2 \).


**Formula:**

\[

x_{n+1} = x_n - f(x_n) \cdot \frac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}

\]


**Iterations:**

1. **Iteration 1:**

   - Calculate \( f(x_0) \) and \( f(x_1) \).

   - Update using the Secant formula.


Continue iterations.


---


Question 4. 

(a) Explain what is the role of interpolation in solving numerical problems?

(b) Express Δ3 f1 as a backward difference.

(c) Express Δ3 f1 as a central difference.

(d) For the following data develop difference table and find forward differences and backward differences 

 I xi yi 0 –1 16.8575 1 0 24.0625 2 1 16.5650 3 2 –13.9375 4 3 28.5625 5 4 144.0625


Ans:- Here’s a structured response to Question 4, covering the role of interpolation, differences, and constructing a difference table based on the given data.


 (a) Role of Interpolation in Solving Numerical Problems

Interpolation plays a crucial role in numerical analysis by providing a method for estimating unknown values between known data points. When we have a set of discrete data points, interpolation helps us create a continuous function that can be used to predict values at intermediate points. This is essential in various applications, such as:


- **Data Analysis:** Interpolation allows for smooth transitions in datasets, enabling better visualizations and insights.

- **Engineering and Science:** In fields such as physics and engineering, interpolation helps in modeling behaviors and properties when exact measurements are not available.

- **Computer Graphics:** Interpolation techniques are used to generate smooth curves and surfaces, improving the visual quality of rendered images.


Overall, interpolation enhances the usability of discrete data by enabling predictions and estimations.


 (b) Expressing \(\Delta^3 f_1\) as a Backward Difference

The backward difference operator \(\Delta\) is defined as:

\[

\Delta f_i = f_i - f_{i-1}

\]


The third backward difference \(\Delta^3 f_1\) can be expressed in terms of the function values as follows:

\[

\Delta^3 f_1 = \Delta^2(\Delta f_1) = \Delta^2(f_1 - f_0) = \Delta(f_1 - f_0) - \Delta(f_0 - f_{-1})

\]

Continuing this way, we express:

\[

\Delta^3 f_1 = (f_1 - f_0) - (f_0 - f_{-1}) + (f_2 - f_1) - (f_1 - f_0)

\]


Hence, the backward difference expression can be represented as:

\[

\Delta^3 f_1 = f_1 - 3f_0 + 3f_{-1} - f_{-2}

\]


(c) Expressing \(\Delta^3 f_1\) as a Central Difference

The central difference operator \( \nabla \) can be defined as:

\[

\nabla f_i = \frac{f_i - f_{i-1}}{2}

\]

The third central difference \(\Delta^3 f_1\) can be approximated in terms of the function values around \( f_1 \):

\[

\Delta^3 f_1 = \nabla^3 f_1 = \frac{f_1 - 3f_0 + 3f_{-1} - f_{-2}}{h^3}

\]

Where \( h \) is the spacing between the data points.


 (d) Developing a Difference Table

We will create a difference table for the given data points and compute the forward and backward differences.


**Given Data:**

\[

\begin{array}{|c|c|}

\hline

x_i & y_i \\

\hline

-1 & 16.8575 \\

0 & 24.0625 \\

1 & 16.5650 \\

2 & -13.9375 \\

3 & 28.5625 \\

4 & 144.0625 \\

\hline

\end{array}

\]


 Step 1: Create a Difference Table


1. **Calculate Forward Differences:**


| \(x_i\) | \(y_i\)     | \(\Delta y_i\) | \(\Delta^2 y_i\) | \(\Delta^3 y_i\) | \(\Delta^4 y_i\) |

|---------|-------------|-----------------|-------------------|-------------------|-------------------|

| -1      | 16.8575     | 7.2050          | -3.6400           | -2.1950           | 2.0285            |

| 0       | 24.0625     | -7.4975         | -0.7750           | -0.0950           |                   |

| 1       | 16.5650     | -30.5025        | 5.0000            |                   |                   |

| 2       | -13.9375    | 42.5000         |                   |                   |                   |

| 3       | 28.5625     | 115.5000        |                   |                   |                   |

| 4       | 144.0625    |                 |                   |                   |                   |


 Step 2: Calculate Backward Differences:


Using the same initial data, we can calculate backward differences.


| \(x_i\) | \(y_i\)     | \(\Delta y_i\)  | \(\Delta^2 y_i\) | \(\Delta^3 y_i\) | \(\Delta^4 y_i\) |

|---------|-------------|------------------|-------------------|-------------------|-------------------|

| 4       | 144.0625   |                   |                   |                   |                   |

| 3       | 28.5625    | 115.5000          |                   |                   |                   |

| 2       | -13.9375   | 42.5000           | -73.0000          |                   |                   |

| 1       | 16.5650    | -30.5025          | -73.0000          | 5.0000            |                   |

| 0       | 24.0625    | -7.4975           |                   |                   |                   |

| -1      | 16.8575    | 7.2050            |                   |                   |                   |


 Summary

The constructed difference table provides both forward and backward differences. This table can be utilized for interpolation and numerical analysis based on the computed differences.


If you need further calculations or clarifications regarding specific methods or differences, feel free to ask!


Question 5.

(a) By decinnial census, the population of a town was given below. 

 Year (x) : 1971 1981 1991 2001 2011 

Population (y): 112 132 158 189 226 (in thousands) 


(i) Using Stirling's central difference formula, estimate the population for the year 2006

(ii) Using Newton’s forward formula, estimate the population for the year 1992. Using Newton’s backward formula, estimate the population for the year 1980. 

Ans:-   Let's solve the problem step by step, using the provided data for the population of a town over the specified years.


 Given Data

| Year (x) | Population (y) (in thousands) |

|----------|------------------------------|

| 1971     | 112                          |

| 1981     | 132                          |

| 1991     | 158                          |

| 2001     | 189                          |

| 2011     | 226                          |


 Step 1: Convert Years to a More Convenient Format

Let's denote the years in terms of \( t \), where \( t = 0 \) for 1971. Thus:

- \( t_0 = 0 \) (1971)

- \( t_1 = 10 \) (1981)

- \( t_2 = 20 \) (1991)

- \( t_3 = 30 \) (2001)

- \( t_4 = 40 \) (2011)


Now, the data can be represented as:


| \( t \) | \( y \) |

|---------|---------|

| 0       | 112     |

| 10      | 132     |

| 20      | 158     |

| 30      | 189     |

| 40      | 226     |


 Step 2: (i) Estimate Population for the Year 2006 Using Stirling's Central Difference Formula

To estimate the population for 2006, we find the value of \( t \) corresponding to 2006:

- \( t = 2006 - 1971 = 35 \)


We will use Stirling's central difference formula, which is given by:

\[

P(t) = y_{n-1} + \frac{1}{2} \Delta y_{n-1} + \frac{1}{6} \Delta^2 y_{n-1} + \frac{1}{24} \Delta^3 y_{n-1} + \ldots

\]

Where \( y_n \) is the value at the nearest point, and \( \Delta y \), \( \Delta^2 y \), \( \Delta^3 y \), etc., are the differences calculated at that point.


 Step 2.1: Calculate the Differences

- **First Differences (\( \Delta y \))**:

\[

\Delta y_0 = 132 - 112 = 20

\]

\[

\Delta y_1 = 158 - 132 = 26

\]

\[

\Delta y_2 = 189 - 158 = 31

\]

\[

\Delta y_3 = 226 - 189 = 37

\]


**First Difference Table**:

\[

\Delta y = [20, 26, 31, 37]

\]


- **Second Differences (\( \Delta^2 y \))**:

\[

\Delta^2 y_0 = 26 - 20 = 6

\]

\[

\Delta^2 y_1 = 31 - 26 = 5

\]

\[

\Delta^2 y_2 = 37 - 31 = 6

\]


**Second Difference Table**:

\[

\Delta^2 y = [6, 5, 6]

\]


- **Third Differences (\( \Delta^3 y \))**:

\[

\Delta^3 y_0 = 5 - 6 = -1

\]

\[

\Delta^3 y_1 = 6 - 5 = 1

\]


**Third Difference Table**:

\[

\Delta^3 y = [-1, 1]

\]


Step 2.2: Estimate the Population

Using \( t = 35 \) (2006):

- The nearest point is \( t_3 = 30 \).

- Thus, \( y_{n-1} = y_3 = 189 \).

  

Using Stirling's formula:

\[

P(35) = 189 + \frac{1}{2}(31) + \frac{1}{6}(6) + \frac{1}{24}(-1)

\]

Calculating each term:

\[

P(35) = 189 + 15.5 + 1 - 0.04167

\]

\[

P(35) \approx 189 + 15.5 + 1 - 0.04167 \approx 205.45833

\]

So, the estimated population for the year 2006 is approximately **205.46 thousand**.


 Step 3: (ii) Estimate Population for the Year 1992 Using Newton’s Forward Formula

To estimate the population for 1992, we find \( t \) corresponding to 1992:

- \( t = 1992 - 1971 = 21 \)


Using Newton's forward formula:

\[

P(t) = y_0 + \frac{t - t_0}{h} \Delta y_0 + \frac{(t - t_0)(t - t_1)}{2h^2} \Delta^2 y_0 + \ldots

\]

Where \( h = 10 \).


Step 3.1: Calculation

Substituting values:

- \( y_0 = 112 \)

- \( \Delta y_0 = 20 \)

- \( \Delta^2 y_0 = 6 \)

  

Calculating \( P(21) \):

\[

P(21) = 112 + \frac{21 - 0}{10} \cdot 20 + \frac{(21 - 0)(21 - 10)}{2 \cdot 10^2} \cdot 6

\]

Calculating each term:

\[

= 112 + 2.1 \cdot 20 + \frac{21 \cdot 11}{200} \cdot 6

\]

\[

= 112 + 42 + \frac{231}{200} \cdot 6

\]

Calculating \( \frac{231 \cdot 6}{200} = \frac{1386}{200} = 6.93 \):

\[

P(21) = 112 + 42 + 6.93 = 160.93

\]


So, the estimated population for the year 1992 is approximately **160.93 thousand**.


 Step 4: (iii) Estimate Population for the Year 1980 Using Newton’s Backward Formula

To estimate the population for 1980, we find \( t \) corresponding to 1980:

- \( t = 1980 - 1971 = 9 \)


Using Newton's backward formula:

\[

P(t) = y_n + \frac{(t - t_n)}{h} \Delta y_n + \frac{(t - t_n)(t - t_{n-1})}{2h^2} \Delta^2 y_n + \ldots

\]


Substituting values:

- \( y_n = y_1 = 132 \) (corresponding to \( t_1 = 10 \))

- \( \Delta y_n = 20 \) (for 1981)

- \( \Delta^2 y_n = 6 \)


Calculating \( P(9) \):

\[

P(9) = 132 + \frac{(9 - 10)}{10} \cdot 20 + \frac{(9 - 10)(9 - 0)}{2 \cdot 10^2} \cdot 6

\]

Calculating:

\[

= 132 - 2 + \frac{(-1)(9)}{200} \cdot 6

\]

Calculating \( -\frac{54}{200} = -0.27 \):

\[

P(9) = 132 - 2 - 0.27 = 129.73

\]


So, the estimated population for the year 1980 is approximately **129.73 thousand**.


Summary of Results

- **Population for 2006 using Stirling's Central Difference**: **205.46 thousand**

- **Population for 1992 using Newton’s Forward Formula**: **160.93 thousand**

- **Population for 1980 using Newton’s Backward Formula**: **129.73 thousand** 


If you need further clarification or assistance, feel free to ask!


(b) If values of the function f: x  y are given as f(1) = −32, f(4) = 08, f(5) = 52, f(7) =167, find the Lagrange’s interpolation polynomial of f(x). Also, find f(3)

Ans:- To find the Lagrange interpolation polynomial for the given data points and to evaluate \( f(3) \), we will use the Lagrange interpolation formula, which is expressed as:


\[

P(x) = \sum_{i=0}^{n} y_i \cdot L_i(x)

\]


where \( L_i(x) \) is the Lagrange basis polynomial defined as:


\[

L_i(x) = \prod_{\substack{0 \leq j \leq n \\ j \neq i}} \frac{x - x_j}{x_i - x_j}

\]


 Given Data Points

- \( f(1) = -32 \)

- \( f(4) = 8 \)

- \( f(5) = 52 \)

- \( f(7) = 167 \)


Let’s denote:

- \( x_0 = 1, y_0 = -32 \)

- \( x_1 = 4, y_1 = 8 \)

- \( x_2 = 5, y_2 = 52 \)

- \( x_3 = 7, y_3 = 167 \)


 Step 1: Calculate the Lagrange Basis Polynomials


 For \( L_0(x) \):

\[

L_0(x) = \frac{(x - 4)(x - 5)(x - 7)}{(1 - 4)(1 - 5)(1 - 7)} = \frac{(x - 4)(x - 5)(x - 7)}{(-3)(-4)(-6)} = \frac{(x - 4)(x - 5)(x - 7)}{72}

\]


For \( L_1(x) \):

\[

L_1(x) = \frac{(x - 1)(x - 5)(x - 7)}{(4 - 1)(4 - 5)(4 - 7)} = \frac{(x - 1)(x - 5)(x - 7)}{(3)(-1)(-3)} = \frac{(x - 1)(x - 5)(x - 7)}{9}

\]


 For \( L_2(x) \):

\[

L_2(x) = \frac{(x - 1)(x - 4)(x - 7)}{(5 - 1)(5 - 4)(5 - 7)} = \frac{(x - 1)(x - 4)(x - 7)}{(4)(1)(-2)} = -\frac{(x - 1)(x - 4)(x - 7)}{8}

\]


 For \( L_3(x) \):

\[

L_3(x) = \frac{(x - 1)(x - 4)(x - 5)}{(7 - 1)(7 - 4)(7 - 5)} = \frac{(x - 1)(x - 4)(x - 5)}{(6)(3)(2)} = \frac{(x - 1)(x - 4)(x - 5)}{36}

\]


 Step 2: Form the Interpolation Polynomial


Now, substituting the values of \( y_i \) into the polynomial:


\[

P(x) = y_0 L_0(x) + y_1 L_1(x) + y_2 L_2(x) + y_3 L_3(x)

\]


Substituting the values:


\[

P(x) = -32 L_0(x) + 8 L_1(x) + 52 L_2(x) + 167 L_3(x)

\]


Expanding each term:


1. **For \( L_0(x) \)**:

   \[

   P_0(x) = -32 \cdot \frac{(x - 4)(x - 5)(x - 7)}{72}

   \]


2. **For \( L_1(x) \)**:

   \[

   P_1(x) = 8 \cdot \frac{(x - 1)(x - 5)(x - 7)}{9}

   \]


3. **For \( L_2(x) \)**:

   \[

   P_2(x) = 52 \cdot \left(-\frac{(x - 1)(x - 4)(x - 7)}{8}\right)

   \]


4. **For \( L_3(x) \)**:

   \[

   P_3(x) = 167 \cdot \frac{(x - 1)(x - 4)(x - 5)}{36}

   \]


 Step 3: Combine the Terms

Now we combine these terms to form \( P(x) \):


\[

P(x) = -\frac{32 (x - 4)(x - 5)(x - 7)}{72} + \frac{8 (x - 1)(x - 5)(x - 7)}{9} - \frac{52 (x - 1)(x - 4)(x - 7)}{8} + \frac{167 (x - 1)(x - 4)(x - 5)}{36}

\]


 Step 4: Find \( f(3) \)


Now, we will substitute \( x = 3 \) into \( P(x) \) to find \( f(3) \):


Calculating each term separately:


1. **Calculate \( L_0(3) \)**:

   \[

   L_0(3) = \frac{(3 - 4)(3 - 5)(3 - 7)}{72} = \frac{(-1)(-2)(-4)}{72} = \frac{-8}{72} = -\frac{1}{9}

   \]

   So, 

   \[

   P_0(3) = -32 \cdot \left(-\frac{1}{9}\right) = \frac{32}{9}

   \]


2. **Calculate \( L_1(3) \)**:

   \[

   L_1(3) = \frac{(3 - 1)(3 - 5)(3 - 7)}{9} = \frac{(2)(-2)(-4)}{9} = \frac{16}{9}

   \]

   So,

   \[

   P_1(3) = 8 \cdot \left(\frac{16}{9}\right) = \frac{128}{9}

   \]


3. **Calculate \( L_2(3) \)**:

   \[

   L_2(3) = -\frac{(3 - 1)(3 - 4)(3 - 7)}{8} = -\frac{(2)(-1)(-4)}{8} = -\frac{8}{8} = -1

   \]

   So,

   \[

   P_2(3) = 52 \cdot (-1) = -52

   \]


4. **Calculate \( L_3(3) \)**:

   \[

   L_3(3) = \frac{(3 - 1)(3 - 4)(3 - 5)}{36} = \frac{(2)(-1)(-2)}{36} = \frac{4}{36} = \frac{1}{9}

   \]

   So,

   \[

   P_3(3) = 167 \cdot \left(\frac{1}{9}\right) = \frac{167}{9}

   \]


### Step 5: Combine \( P(3) \)


Now summing up all the contributions:

\[

P(3) = \frac{32}{9} + \frac{128}{9} - 52 + \frac{167}{9}

\]

\[

= \frac{32 + 128 + 167}{9} - 52

\]

Calculating the sum:

\[

= \frac{327}{9} - 52

\]


Converting \( 52 \) to a fraction:

\[

52 = \frac{468}{9}

\]

So:

\[

P(3) = \frac{327 - 468}{9} = \frac{-141}{9} \approx -15.6667

\]


 Final Result

Thus, the Lagrange interpolation polynomial \( P(x) \) gives us \( f(3) \approx -15.67 \).


If you need any further assistance or clarifications, feel free to ask!


Question 6.

(a) Find the values of the first and second derivatives of f(x) at x = 76 from the following table. Use 0(h2 ) forward difference method. Also, find Truncation Error (TE) and actual errors. 

x : 76 81 86 91 f(x) : 5.3147 5.4346 5.5637 5.6629

Ans:-  To find the first and second derivatives of \( f(x) \) at \( x = 76 \) using the \( O(h^2) \) forward difference method, we will follow these steps:


1. **Determine \( h \)**: This is the spacing between the \( x \) values. Since \( x \) values are \( 76, 81, 86, 91 \), we have:

   \[

   h = 81 - 76 = 5

   \]


2. **Values of \( f(x) \)**:

   - \( f(76) = 5.3147 \)

   - \( f(81) = 5.4346 \)

   - \( f(86) = 5.5637 \)

   - \( f(91) = 5.6629 \)


 Step 1: Calculate the First Derivative


The first derivative \( f'(x) \) at \( x = 76 \) using the forward difference formula is given by:

\[

f'(x) \approx \frac{f(x+h) - f(x)}{h}

\]

For \( x = 76 \):

\[

f'(76) \approx \frac{f(81) - f(76)}{5}

\]

Substituting the values:

\[

f'(76) \approx \frac{5.4346 - 5.3147}{5} = \frac{0.1199}{5} \approx 0.02398

\]


 Step 2: Calculate the Second Derivative


The second derivative \( f''(x) \) at \( x = 76 \) using the forward difference formula is given by:

\[

f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}

\]

For \( x = 76 \):

\[

f''(76) \approx \frac{f(86) - 2f(81) + f(76)}{5^2}

\]

Substituting the values:

\[

f''(76) \approx \frac{5.5637 - 2 \times 5.4346 + 5.3147}{25}

\]

Calculating it step by step:

1. Calculate \( 2 \times 5.4346 = 10.8692 \).

2. Then:

   \[

   5.5637 - 10.8692 + 5.3147 = 5.5637 + 5.3147 - 10.8692 = 11.8784 - 10.8692 = 1.0092

   \]

3. Now calculate:

   \[

   f''(76) \approx \frac{1.0092}{25} \approx 0.040368

   \]


Summary of Derivative Values

- First Derivative: 

  \[

  f'(76) \approx 0.02398

  \]

- Second Derivative: 

  \[

  f''(76) \approx 0.040368

  \]


 Step 3: Calculate the Truncation Error (TE)


For the forward difference method, the truncation error for the first derivative using the \( O(h^2) \) method is given by:

\[

TE \approx \frac{h^2}{2} f''(\xi)

\]

for some \( \xi \) in the interval of interest. However, since we don’t have the actual value of \( f''(\xi) \), we can't calculate the exact TE without more information.


 Step 4: Calculate the Actual Errors


To find the actual error, we would need the true value of \( f'(76) \) and \( f''(76) \). Since this information isn't provided, we can't calculate the actual errors here. 


In practical applications, we often derive this from either a more precise calculation or by using a very small \( h \) to find the actual derivatives. For estimation, one could use the derivatives at other \( x \) points or from known functions.


 Final Results

- **First Derivative \( f'(76) \approx 0.02398 \)**

- **Second Derivative \( f''(76) \approx 0.040368 \)**

- **Truncation Error**: Unable to determine without \( f''(\xi) \).

- **Actual Errors**: Unable to determine without true derivative values.


If you have the true values of the derivatives or additional data, we can refine this analysis.


Question 7. 

(a) Compute the value of the integral 

 10.4 ∫ 8.4 (5 x+ 4 x2 + 3) dx by using 

Rectangular Rule (ii) Trapezoidal Rule and then (iii) Simpson's 1/3 Rule

Ans:-   To compute the integral 


\[

\int_{8.4}^{10.4} (5x + 4x^2 + 3) \, dx

\]


we will use three numerical methods: the Rectangular Rule, the Trapezoidal Rule, and Simpson's 1/3 Rule. 


 Step 1: Calculate the Exact Value of the Integral


First, let’s find the exact value of the integral to compare the results from the numerical methods.


1. **Antiderivative**:

   \[

   \int (5x + 4x^2 + 3) \, dx = \frac{5}{2} x^2 + \frac{4}{3} x^3 + 3x + C

   \]


2. **Evaluate from 8.4 to 10.4**:

   \[

   F(x) = \frac{5}{2} x^2 + \frac{4}{3} x^3 + 3x

   \]


   Now compute \( F(10.4) \) and \( F(8.4) \):


   - \( F(10.4) \):

     \[

     F(10.4) = \frac{5}{2} (10.4)^2 + \frac{4}{3} (10.4)^3 + 3(10.4)

     \]

     \[

     = \frac{5}{2} (108.16) + \frac{4}{3} (1121.744) + 31.2

     \]

     \[

     = 270.4 + 1496.992 + 31.2 \approx 1798.592

     \]


   - \( F(8.4) \):

     \[

     F(8.4) = \frac{5}{2} (8.4)^2 + \frac{4}{3} (8.4)^3 + 3(8.4)

     \]

     \[

     = \frac{5}{2} (70.56) + \frac{4}{3} (592.704) + 25.2

     \]

     \[

     = 176.4 + 790.272 + 25.2 \approx 991.872

     \]


3. **Compute the definite integral**:

   \[

   \int_{8.4}^{10.4} (5x + 4x^2 + 3) \, dx = F(10.4) - F(8.4) \approx 1798.592 - 991.872 \approx 806.72

   \]


 Step 2: Rectangular Rule


We will use the midpoint of the interval for our calculations.


1. **Width of the interval (h)**:

   \[

   h = 10.4 - 8.4 = 2

   \]


2. **Midpoint**:

   \[

   \text{Midpoint} = \frac{8.4 + 10.4}{2} = 9.4

   \]


3. **Compute the area**:

   \[

   \text{Area} \approx f(9.4) \cdot h = (5 \cdot 9.4 + 4 \cdot (9.4)^2 + 3) \cdot 2

   \]

   \[

   f(9.4) = 5 \cdot 9.4 + 4 \cdot (88.36) + 3 = 47 + 353.44 + 3 = 403.44

   \]

   \[

   \text{Area} \approx 403.44 \cdot 2 = 806.88

   \]


Step 3: Trapezoidal Rule


1. **Using the Trapezoidal Rule**:

   \[

   \text{Area} \approx \frac{h}{2} (f(a) + f(b))

   \]

   Where \( a = 8.4 \) and \( b = 10.4 \).


2. **Evaluate \( f(8.4) \) and \( f(10.4) \)**:

   - \( f(8.4) \approx 403.44 \) (already calculated).

   - \( f(10.4) \approx 5 \cdot 10.4 + 4 \cdot (10.4)^2 + 3 = 5 \cdot 10.4 + 4 \cdot 108.16 + 3 = 52 + 432.64 + 3 = 487.64 \).


3. **Calculate the area**:

   \[

   \text{Area} \approx \frac{2}{2} (403.44 + 487.64) = 1 \cdot 891.08 = 891.08

   \]


Step 4: Simpson's 1/3 Rule


Simpson's rule can be applied here as the number of intervals is 1 (which is even).


1. **Using Simpson's Rule**:

   \[

   \text{Area} \approx \frac{h}{6} (f(a) + 4f\left(\frac{a+b}{2}\right) + f(b))

   \]


2. **Substituting**:

   \[

   \text{Area} \approx \frac{2}{6} \left( f(8.4) + 4f(9.4) + f(10.4) \right)

   \]

   \[

   = \frac{1}{3} \left( 403.44 + 4 \cdot 403.44 + 487.64 \right) = \frac{1}{3} \left( 403.44 + 1613.76 + 487.64 \right)

   \]

   \[

   = \frac{1}{3} \cdot 2504.84 \approx 834.947

   \]


### Summary of Results


1. **Rectangular Rule**: \(\approx 806.88\)

2. **Trapezoidal Rule**: \(\approx 891.08\)

3. **Simpson's 1/3 Rule**: \(\approx 834.947\)



The results from the numerical methods provide estimates for the integral:


- Rectangular Rule: \( 806.88 \)

- Trapezoidal Rule: \( 891.08 \)

- Simpson's Rule: \( 834.947 \)


The actual value of the integral is \( 806.72 \), which indicates that the Rectangular Rule provides the closest approximation in this case.

No comments: