0% found this document useful (0 votes)
117 views8 pages

Lab 3 Report

The document provides details of a lab problem to find the root of an equation using the Bisection Method and Newton-Raphson Method in MATLAB and Octave. It includes the problem statement to find the new height of a rectangular section given a new peak flow, and outlines the objective to develop programs to implement the two methods and solve the problem to varying accuracies. Tables show the iterative solutions found for the sample equation using Bisection Method in Excel and Newton-Raphson Method in Excel. Commands for implementing the two methods in Octave are also provided.

Uploaded by

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

Lab 3 Report

The document provides details of a lab problem to find the root of an equation using the Bisection Method and Newton-Raphson Method in MATLAB and Octave. It includes the problem statement to find the new height of a rectangular section given a new peak flow, and outlines the objective to develop programs to implement the two methods and solve the problem to varying accuracies. Tables show the iterative solutions found for the sample equation using Bisection Method in Excel and Newton-Raphson Method in Excel. Commands for implementing the two methods in Octave are also provided.

Uploaded by

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

CES513: COMPUTATIONAL ANALYSIS FOR ENGINEER.

LAB 3 PROBLEM.

DATE : 8/11/2020

PREPARED FOR:

MOHD ZAINI BIN ENDUT.

PREPARED BY:

NO. NAME STUDENT ID.


1. Muhammad Elhamme Bin Abdul 2019717297
Karim
2. Dyg Nur Dini Amani Binti Awg Alim 2019530279
3. Siti Nur A’dilah Binti Sabeki 2019528059
COURSE COMPUTATIONAL METHODS FOR ENGINEERS

COURSE CODE CES512/513

LEVEL OF OPENNESS 1

CATEGORY PARTIALLY OPEN

DEGREE OF OPEN-ENDED (%) 33%

PERIOD OF ACTIVITY 1 WEEK

TITLE USING MATLAB FOR ROOT LOCATION


1.1 Introduction
Bisection method and the Newton-Raphson method are the method
provides practical method to find roots of equation. This method also
helps to prove the intermediate theorem. Among all the numeral
methods bisection method is the simplest one to solve the
transcendental equations.
1.2 Objectives

The objective of this activity is:


To develop the flow chart on Bisection and Newton-Raphson
PREAMBLE Method
To write the MATLAB program to execute both methods
To solve a given problem using the developed program to certain
numerical accuracy
To report and interpret the output of the program in relation to the
given problem
1.3 Learning Outcomes

At the end of the laboratory activities, students would be able to:


• to write MATLAB commands to program the Bisection Method/
Newton-Raphson algorithm (CO2:PO4)
• to write MATLAB script file to program the Bisection
Method/Newton-Raphson (CO2:PO4)
• to identify errors of programming and to correct it (CO2:PO4)
• to apply the MATLAB script file on civil engineering problem (
(CO2:PO4)
2.1 Problem Statement
PROBLEM You are required to solve numerically the given problem using the
STATEMENT Bisection and Newton-Raphson Method with the error of 5%, 1% and
0.5% based on the following formula;
×
PROBLEM 3
Using the Bisection Method and Newton-Raphson method, propose the new height, H, of the new
rectangular section to cater the new peak flow.

DERIVATION OF EQUATION
1. Using Excel – Bisection Method

Equation: f(x) = 1.1383x^(8/3) -42

Iter Guess a Guess b Midpoint c f(a) f(b) f(c) Ea (%)

1 2 3.52 2.76 -34.772 -9.3635 -24.939


2 2.76 3.52 3.14 -24.939 -9.3635 -17.934 12.10
3 3.14 3.52 3.33 -17.934 -9.3635 -13.852 5.71
4 3.33 3.52 3.425 -13.852 -9.3635 -11.66 2.77
5 3.425 3.52 3.4725 -11.66 -9.3635 -10.525 1.37
6 3.4725 3.52 3.49625 -10.525 -9.3635 -9.9474 0.68
7 3.49625 3.52 3.50813 -9.9474 -9.3635 -9.6563 0.34

midpoint c
4

3.5

2.5

1.5

0.5

0
0 2 4 6 8 10 12 14
2. Using Excel – Newton-Raphson Method

Equation: f(x) = 1.1383x^(8/3)-42


f'(x) =3.035x^(5/3)

when Ea<0.5, the iteration will be stop.


Iter xi f(xi) f'(xi) xi+1 Ea n
1 1.76 -35.6215022 16.32245971 3.942361165 55.3567031 -0.0442
2 3.94236117 12.79005258 62.59291429 3.738024097 5.46644598 0.961265
3 3.7380241 5.540479048 57.27977723 3.641297481 2.656377762 1.27468
4 3.64129748 2.33033951 54.83082244 3.598796942 1.180965188 1.626733
5 3.59879694 0.963950705 53.76835259 3.580869097 0.500656259 1.99943
6 3.5808691 0.395570378 53.32267164 3.573450669 0.207598433 2.381746

f(x) vs x
20

10

0
f(x)

-10

-20

-30

-40
x
3. Using Octave – Bisection Method
Command:
4. Using Octave – Newton-Raphson Method

Command:

You might also like