Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Saint Louis University

School of Engineering and Architecture


Department of Electronics Engineering

ECE 427L
ACTIVITY NO. 9
NUMERICAL OPTIMIZATION
IN ONE VARIABLE

Submitted by:
CALAUNAN, Joeben A.
MACARAEG, Sophia Marie B.

Submitted to:
Engr. Michael A. Cagaoan
Instructor

DATE SUBMITTED:
May 1, 2020
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

ACTIVITY NO. 9
NUMERICAL OPTIMIZATION IN ONE VARIABLE

ACTIVITY OBJECTIVE:
At the end of the activity, the student should be able to write programs for solving optimization
problems in one variable.

EQUIPMENT NEEDED:
PC with Scilab

LABORATORY ACTIVITIES:
Problem and Results:
Given the function f(x)=(x-1)2+ (1/x),
(a) Plot the graph of f(x) over the interval 1≤x≤3 and determine from the graph the coordinates (x, f(x))
of the minimum point (rounded to 2 decimal places).

(x, f(x)) = (1.30, 0.86)


(b) Determine the coordinates (x, f(x)) of the minimum point of the given function in the given interval
using numerical differentiation (central differences with dx=10-6) and Half-Interval Method for
root finding such that |f '(x)|<10-8.
(x, f(x)) = (1.2971565, 0.859219)
Minimum number of iterations = 28
(c) Determine the coordinates (x, f(x)) of the minimum point of the given function in the given interval
using numerical differentiation (central differences with dx=10-6) and Regula-Falsi method for
root finding such that |f '(x)|<10-8.
(x, f(x)) = (1.2971565, 0.859219)
Minimum number of iterations = 10

ELECTRONICS ENGINEERING DEPARTMENT ECE 427L: NUMERICAL METHODS LABORATORY


Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

(d) Determine the coordinates (x, f(x)) of the minimum point of the given function using numerical
differentiation (forward differences with dx=10-4) and Newton method for root finding with
initial trial root x=3 such that |f '(x)|<10-8.
(x, f(x)) = (1.2971565, 0.859219)
Minimum number of iterations = 8

OBSERVATIONS:

In this activity, we were given a function of x that is equal to (x-1)2+ (1/x). We plot the
graph of f(x) over the interval 1≤x≤3 and determine from the graph the coordinates (x, f(x)) of the
minimum point. We then observed that the results from the different methods are the same with x
= 1.2971565 and the f(x) = 0.859219 but the minimum number of iterations are different as well as
the numerical differentiation with the forward and central differentiation in this case and with
different values of dx. Also, we noticed that the minimum number of iterations for Newton’s
Method using numerical differentiation (forward differences with dx=10-4) is lower than the Half-
Interval Method and Regula-Falsi Method using numerical differentiation (central differences with
dx =10-6.

CONCLUSIONS:

In this activity, we performed ‘Numerical Optimization in One Variable’. Different methods


but the same given of function of x. We arrived with the same exact results but different minimum
number of iterations, thus we can say that Numerical Optimization is the selection of a best element
from some set of available alternatives. This numerical optimization problem consists of
maximizing or minimizing a real function by systematically choosing input values of function of x
from within an allowed set and computing the value of the function.

ELECTRONICS ENGINEERING DEPARTMENT ECE 427L: NUMERICAL METHODS LABORATORY

You might also like