辅导案例-AM3611F:

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
Western University
Department of Applied Mathematics

AM3611F: October 14, 2020

Project 1: ZEROS AND EXTREMA OF FUNCTIONS

Due: October 28 Instructor: Dr. Z. Krougly
Total of 22 marks.

1. (2 marks) Organize the project to implement Secant method for finding the root of f(x) = 0
(secant.cpp program is posted on OWL).
Consider a general procedure that converges almost as far as Newton's method. This method
mimics Newton's method but avoids the calculation of derivatives. Recall that NeZWRQ¶V iWeUaWiRQ
defines ௡+ଵ in terms of ௡via the formula
௡+ଵ ൌ ௡ െ
ሺ௫೙ሻ
ᇲሺ௫೙ሻ
(1)

In the secant method, we replace ᇱሺ௡ሻ in Formula (1) by an approximation that is easily
computed. Since the derivative is defined by
ᇱሺሻ ൌ lim
௛→଴
ሺ ൅ ℎሻ െ ሺሻ



we can say that for small h,
ᇱሺ௡ሻ ൎ
ሺ ൅ ℎሻ െ ሺሻ


In particular, if ൌ ௡, and ℎ ൌ ௡−ଵ െ ௡ , we have

ᇱሺ௡ሻ ൎ
ሺ௫೙షభሻ−ሺ௫೙ሻ
௫೙షభ− ௫೙
(2)
When this is used in Equation (1), the result defines the Secant method:

௡+ଵ ൌ ௡ െ ቀ
௫೙−௫೙షభ
ሺ௫೙ሻ−ሺ௫೙షభሻ
ቁ ሺ௡ሻ (3)

The SecaQW PeWhRd (Oike NeZWRQ¶V) caQ be XVed WR solve systems of equations as well.
A few remarks about Equation (3) are in order. Clearly, ௡+ଵ depends on two previous
elements of the sequence.
So in order to start, two points (x0, and x1) must be provided.
Equation (3) can then generate x2, x3,«
Complete the iterations when |f(xn) - f(xn-1)| ≤ İ |f(xn)| for some specific tolerance İ, such as
0.5×10-6 . Another convergence criterion is: interval < epsilon (see program secant.cpp on OWL)

2. (5 marks) Use Secant method to find a solution to

(a) ൌ cos
(b) x3 = cos x
with x0 = 0.5 and x1 = ʌ/4.
Print the solutions with 10 decimal places.

3. (5 marks) Find the root of the functions using Secant method:

(a) f1(x) = 27x4 + 162x3 - 180x2 + 62x ± 7 with starting values x0 = 0 and x1 = 2
(b) f3(x) = 1 + ln x – x with starting values x0 = -1 and x1 = 2
Use convergence test with the tolerance İ = 1×10-6.

4. (5 marks) Use Secant method to find the optimum solutions (௠௔௫/௠௜௡ and ௠௔௫/௠௜௡ሻ
for the function
ሺሻ ൌ sin ቀ


ቁ on the interval (0.1, 0.3).

5. (5 marks)

Organize user interface in one workspace with the projects of the problems 2, 3 and 4.
Use dynamic memory allocation and vector of pointers to a function (see topic 9 on OWL).

What to Hand In.
x Problems 2-5: Submit the programs and outputs electronically by OWL (Drop Box).
x Specify your name, course number, and the project number.


topic 9)

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468