0% found this document useful (0 votes)
11 views3 pages

Lab 09

This document contains a lab assignment on calculus for an IT course. It includes 9 exercises involving finding critical numbers, relative extrema, absolute extrema, optimization of single-variable functions using golden search and Fibonacci search algorithms, and finding minima of multi-variable functions.

Uploaded by

honhathao2805
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)
11 views3 pages

Lab 09

This document contains a lab assignment on calculus for an IT course. It includes 9 exercises involving finding critical numbers, relative extrema, absolute extrema, optimization of single-variable functions using golden search and Fibonacci search algorithms, and finding minima of multi-variable functions.

Uploaded by

honhathao2805
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/ 3

Ton Duc Thang University

Faculty of Information Technology

Lab 8
CALCULUS FOR IT 501031

1 Exercises
Exercise 1: Find the critical numbers (C.N) of f (x) for the following cases:

(a) f (x) = 3x4 − 16x3 + 18x2 − 9 x2


(c) f (x) = − + x2 + 3x + 4
3
x+2 5x2 + 5
(b) f (x) = (d) f (x) =
2x2 x

Exercise 2: Find the relative extrema using the second derivative test for the following cases:

(a) f (x) = 3x4 − 16x3 + 18x2 − 9 x2


(c) f (x) = − + x2 + 3x + 4
3
x+2 5x2 + 5
(b) f (x) = (d) f (x) =
2x2 x

Exercise 3: Given f (x) over a closed interval [a, b], find the absolute maximum and the absolute minimum
for the following cases:

(a) f (x) = x3 − 27x, [0, 5] 1 4


(c) f (x) = x − 4x2 + 5, [1, 3]
2
3 4 5 20
(b) f (x) = x − 4x3 + 4, [0, 3] (d) f (x) = x4 − x3 + 6, [−1, 3]
2 2 3

Exercise 4: Determine the minima or maxima of the functions f (x) following:

(a) f (x) = x2 − 2x − 5, a = 0, b = 2 −π π
(j) f (x) = tan2 (x), a = ,b =
4 4
(b) f (x) = 3x + x3 + 5, a = −4, b = 4
(k) f (x) = ex sin(x), a = 0, b = π
(c) f (x) = sin(x) + 3x2 , a = −2, b = 2
(l) f (x) = x4 − 3x2 , a = −4, b = 0
x2
(d) f (x) = e + 3x, a = −1, b = 1
(m) f (x) = x4 − 3x2 , a = 0, b = 4
3
(e) f (x) = x − 3x, a = −3, b = 0
(n) f (x) = x5 − 5x3 , a = −4, b = 0
3
(f) f (x) = x − 3x, a = 0, b = 3
(o) f (x) = x6 − 5x2 , a = −1, b = 1
(g) f (x) = sin(x), a = 0, b = π
(p) f (x) = x3 − 9x, a = −3, b = 0
(h) f (x) = sin(2x), a = 0, b = 2
(q) f (x) = x3 − 9x, a = 0, b = 3
π 3π
(i) f (x) = cos(x), a = , b = (r) f (x) = x3 + 9x, a = −1, b = 1
2 2

Graph f (x) and mark the maximum point.

Anh H. Vo - [email protected] 1
Ton Duc Thang University
Faculty of Information Technology

Algorithm 1 Golden Search


Input: Objective function f (x), boundaries a and b, and tolerance 
d=b−a
while b − a ≥  do
d ←− 0.618 × d
x1 ←− b − d
x2 ←− a + d
if f (x1 ) ≤ f (x2 ) then
b ←− x2
else
a ←− x1
end if
end while
Output: Reduced interval [a, b]

Exercise 5: Write a program to implement Golden Search and apply to determinate minimum value of
f (x) = x2 in [−2, 1], with a tolerate  = 0.3, , and illustrate on the graph/ table for each iteration.
Exercise 6: Implement Fibonacci Search and apply to determinate minimum value of f (x) = x2 in
[−2, 1], with a tolerate  = 0.3, and illustrate on the graph/ table for each iteration.

Algorithm 2 Fibonacci Search


Input: Objective function f (x), boundaries a and b, and tolerance 
F1 = 2, F2 = 3

n = 2 while b − a ≥  do
d ←− b − a
Fn−1
x1 ←− b − d
Fn
Fn−1
x2 ←− a + d
Fn
if f (x1 ) ≤ f (x2 ) then
b ←− x2
else
a ←− x1
end if

n=n+1
Fn = Fn−1 + Fn−2 end while
Output: Reduced interval [a, b]

Exercise 7: Determine m to y = x3 − 3mx2 + 3(m2 − 1)x − (m2 − 1) maximize at x0 = 1


Exercise 8: Optimization for f (x) functions and plot on the graphs.
1
(a) f (x) = −2x2 + x + 4, in [−5, 5], and  = 9
1
(b) f (x) = −4x2 + 2x + 2, in [−6, 6], and  = 10
1
(c) f (x) = x3 + 6x2 + 5x − 12, in [−5, −2], and  = 10
1
(d) f (x) = 2x − x2 , in [0, 3], and  = 100

Anh H. Vo - [email protected] 2
Ton Duc Thang University
Faculty of Information Technology

1
(e) f (x) = x2 − x − 10, in [−10, 10], and  = 5
1
(f) f (x) = −(x + 6)2 + 4, in [−10, 10], and  = 8
1
(g) f (x) = −2x2 + 3x + 6, in [−3, 5], and  = 8

Exercise 9: Find minimum of root of f (x1 , x2 ) function

(a) f (x1 , x2 ) = x21 + x22 − 4x1 − 4x2 in [0 1] (e) f (x1 , x2 ) = x21 ex1 + 51x2 + x42 + 3 in [0 1]
2 4 2
(b) f (x1 , x2 ) = 3x1 + 2x2 − x2 + x2 + 1 in [1 2] 2
2 (f) f (x1 , x2 ) = ex1 −3 + x22 − 3x2 in [1 2]
(c) f (x1 , x2 ) = ex1 + x22 − 3 + 2 ∗ x2 in [1 2]
(d) f (x1 , x2 ) = (x21 − 1)2 + x22 − 3x2 + 1 in [0 0] (g) f (x1 , x2 ) = x1 x32 + 2x21 + 2x42 − 5 in [-1 1]

Anh H. Vo - [email protected] 3

You might also like