0% found this document useful (0 votes)
358 views11 pages

Individual Assignment MEC500 Numerical M

1) The document provides an assignment to determine the mole fraction x of H2O that satisfies the given equation using numerical root finding methods. 2) Two methods were used - the bisection method and Newton-Raphson method. The bisection method iteratively narrows down the range to find the root, obtaining a value of x = 0.021056. The Newton-Raphson method uses derivatives to quickly converge on a root, obtaining a value of x = 0.021041. 3) The Newton-Raphson method was chosen because it is simpler and faster than bisection, though bisection is more robust. Both methods were used to ensure accuracy and compare the

Uploaded by

000
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)
358 views11 pages

Individual Assignment MEC500 Numerical M

1) The document provides an assignment to determine the mole fraction x of H2O that satisfies the given equation using numerical root finding methods. 2) Two methods were used - the bisection method and Newton-Raphson method. The bisection method iteratively narrows down the range to find the root, obtaining a value of x = 0.021056. The Newton-Raphson method uses derivatives to quickly converge on a root, obtaining a value of x = 0.021041. 3) The Newton-Raphson method was chosen because it is simpler and faster than bisection, though bisection is more robust. Both methods were used to ensure accuracy and compare the

Uploaded by

000
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/ 11

Faculty of Mechanical Engineering

MEC500
Numerical Method

Individual Assignment

Lecturer:
HAFIZI BIN LUKMAN

NAME AKMAL FARHAN BIN AZHAR


CLASS EMD6M7A

SUBMIT DUE DATE:-


15TH JULY 2018
TABLE OF CONTENT

Bisection Method......................................................................................................................5
Newton-Raphson Method........................................................................................................7
References ................................................................................................................................. 9

LIST OF TABLE
Table 1 : Bisection method ..................................................................................................................... 6
Table 2 :Newton-Raphson Method......................................................................................................... 7

LIST OF EQUATION
Equation 1 : The formula of K ..................................................................................................................
3
Equation 2 : the given function............................................................................................................... 4
Equation 3 : approximate error .............................................................................................................. 5
Equation 4 : true error ............................................................................................................................ 5
Equation 5 : Newton raphson mthod ..................................................................................................... 7
Equation 6: equation of motion.............................................................................................................. 7
Question A

Background

Water vapor (H2O) is heated to sufficiently high temperatures that a significant portion of the
water dissociates, or splits apart, to form oxygen (O2) and hydrogen (H2):

��2𝑂 ↔ ��2 +

2 ��2
If it is assumed that this is the only reaction involved, the mole fraction x of H2O that
dissociates
can be represented by

Equation 1 : the formula of K

𝑥 2��𝑡
𝐾= √
1−𝑥 2+𝑥

where K = the reaction equilibrium constant and pt = the total pressure of the mixture.

The Task

An engineering design project requires that you accurately estimate the mole fraction x of H2O
if pt = 3.5 atm and K = 0.04, determine the value of x that satisfies the equation above.

Instruction

1. Use any two numerical roots of equations method and determine the roots for the mole
fraction x of H2O.
(CO2/PO1/C3)

2. Show justification for your choice of method to solve task above.

(CO2/PO1/C3)
QUESTION 1

From the equation,

𝑥 2��𝑡
𝐾= √
1−𝑥 2+𝑥

By applying the value of K=0.04 and pt = 3.5 the equation can be rearranged to:
3

Thus, = x3 – 4375x2 − 3𝑥 + 2
Equation 2 : the given function
0
f(x) = x 3 – 4375x2 − 3𝑥 + 2

The roots of equation will be determined by using both bisection method and Newton-
Raphson method. Therefore, the real root of the equation is x = 0.0210937.
1ST METHOD

Bisection Method

The bisection method finds the roots of equation by continuously bisecting the interval and
then selects a subinterval in which a root must lie for further processing. It is a robust but slow
method of finding the roots. For this problem, the stopping criterion ℇs is 0.5%.

Initial value;
Xl = 0
Xu = 0.03
Xr = (0+0.03)/2
= 0.015

Lower limits
f(Xl)
��(0) = (0) − 4375(0) − 3(0) + 2
3 2

��(0) = 2
Middle point
f(Xr)
��(0.015) = (0.015) − 4375(0.015) − 3(0.015) + 2
3 2

��(0.015) = 0.970628375

If the product of f(Xl) and f(Xr) is of positive value then the value of Xr will go to the next Xl ,
if the product yield a negative value them the value of Xr will go to the next Xu .

Approximate error, ℇa

Equation 3 : approximate error

��𝑟 ���� −
��𝑟 ��𝑤
�� = | | × 100%
��𝑟

��𝑤

0.015 − 0.0225

�� = | 0.0225 | × 100%
�� = 33.33%

True error, ℇt
Equation 4 : true error

��𝑟 − True value


�� = | | × 100%
True value

0.015 − 0.0210937

�� = | 0.0210937 | × 100%
�� = 28.89%
Table 1 : bisection method

Iteration
n XL Xr Xu ∫Xr ∫XL ∫XL*∫Xr ɛa ɛt
0 0 0.015 0.03 0.970628 2 1.94125675 28.88872
1 0.015 0.0225 0.03 -0.28233 0.970628 -0.274039799 33.33333 -6.66692
2 0.015 0.01875 0.0225 0.405671 0.970628 0.393755448 -20 11.1109
3 0.01875 0.020625 0.0225 0.07705 0.405671 0.031256838 9.090909 2.22199
4 0.020625 0.021563 0.0225 -0.0988 0.07705 -0.007612221 4.347826 -2.22246
5 0.020625 0.021094 0.021563 -0.00991 0.07705 -0.000763708 -2.22222 -0.00024
6 0.020625 0.020859 0.021094 0.033809 0.07705 0.002604998 -1.1236 1.110877
7 0.020859 0.020977 0.021094 0.012009 0.033809 0.000406008 0.558659 0.55532
8 0.020977 0.021035 0.021094 0.001063 0.012009 1.2771E-05 0.278552 0.277541
9 0.021035 0.021064 0.021094 -0.00442 0.001063 -4.70102E-06 0.139082 0.138652

The iteration is stopped at the ninth iteration as both the approximate and true error is below
the stopping criterion. From this bisection iteration method, the root of the equation x=
0.021056 with 0.139% approximate error and 0.1386% true error.
Newton-Raphson Method

Newton-Rapson is another roots approximation method. The method is simpler and faster than
most numerical roots of equation methods. The Newton-Raphson method use the formula;

Equation 5 : Newton raphson mthod

𝑋 = −
��(��𝑖 )
��′
��+1
(��𝑖𝑖)
in order to determine the next value of x which will approximately approach the value of the
roots of equation and by calculating the approximate error the roots of equation are
determined. The stopping criterion ℇs is 0.5%.

Sample of calculation

Equation 6: equation of motion

Initial condition; x = 0.03 ��’(��) = 3𝑥2 – 8750𝑥 − 3


��(0.03)
����+1 = (0.03) −
��′(0.03)

−2.02747

����+1 = 0.03 −

−265.497

����+1 =

0.022363
The calculation for approximate error and the true error is the same as in bisection method.

Table 2 :Newton-Raphson Method

Iteration Xi Xi+1 f(Xi) f’(Xi) ℇa(%) ℇt(%)


1 0.03 0.022363 -2.02747 -265.497 100 42.22
2 0.022363 0.021079 -0.25513 -198.679 34.15 6.02
3 0.021079 0.021041 -0.00721 -187.443 6.09 0.07
4 0.021041 0.021041 -0.0000065 -187.106 0.18 0.25

At the fourth iteration, the approximate error value is below the stopping criterion thus the
iteration is stopped. The root is determined to be x = 0.021041 with approximate error of
0.18% and a true error of 0.25%.
Question 2

There is two method that used for this task which is Bisection method and Newton
Raphson method. The reason choosing this two method to show the different way of finding
the real root of (x), the rate of change of approximate error and true error. To ensure the high
accuracy of the result several iteration were taken for each method.

The bisection method is a method that used the point of lower, upper and midpoint.
The bisection method in mathematics is a root-finding method that repeatedly bisects an
interval and then selects a subinterval in which a root must lie for further processing. It is a
very simple and robust method, but it is also relatively slow. Because of this, it is often used
to obtain a rough approximation to a solution which is then used as a starting point for more
rapidly converging methods. The method is also called the interval halving method, the
binary search method, or the dichotomy method. The result show that the root of equation can
be determine after 10 iteration with x(true value) = 0.021056. The root has approximate error
of 0.139% and true value error of 0.13865.

The Newton-Raphson method is and open. For this method there is only 5 iteration
that used, compare with bisection method there is more iteration that used. The real root the
Newton Raphson is more simple and more faster determined. The root determined is x =
0.021041. thus it has approximate error of 0.18% and a true error of 0.25%.
References

1. EXCEL Bisection method from : https://www.youtube.com/watch?v=q6WdsIJVl9M k

2. Lecturer note: Hafizi Bin Lukman, “Chapter 2: Roots of Equation”, Numerical Method MEC500,
Universiti Teknologi MARA.

3. Freesourcecode.net. (n.d.). Retrieved from http://freesource.net/matlabprojects/56940/bisection-


method-matlab-code

4. Newton-Rapson Method calculation: https://www.symbolab.com/solver/roots-


calculator/roots%20x%5E%7B%203%7D-4375x%5E%7B2%7D-3x%2B2
MEC500 ASSIGNMENT RUBRICS- ASSIGNMENT

GROUP NO DUE DATE SUBMISSION DATE REMARKS

ON TIME /
EMD6M7A 15/7/2018 9/7/2018
LATE

LECTURER NAME HAFIZI BIN LUKMAN

No Name Student ID

1 AKMAL FARHAN BIN AZHAR 2016229638

Guidelines Level Poor Satisfactory Good Excellent


Scale
Scale 0-4 5-6 7-8 9-10

Assessment Criteria (Report) Weight Scale Total


(w) (y) (w * y)

Content/ Diagrams/ Figures/ Discussion and Conclusion

CO2/PO1/C3 Solve the task 2.5 2

CO2/PO1/C3 Show justification 2.5 2

CO4/PO5/P4 Display computer computational approach 2.5 2

Display Format, Language and


CO4/PO5/P4 2.5 2
Organization, References and citation

TOTAL 20%

REMARKS:

END OF QUESTION PAPER

You might also like