• 沒有找到結果。

Solutions of equations in one variable

N/A
N/A
Protected

Academic year: 2022

Share "Solutions of equations in one variable"

Copied!
3
0
0

加載中.... (立即查看全文)

全文

(1)

Solutions of equations in one variable

October 21, 2012

Problem: Solve the following nonlinear equation f (x) ≡ π +1

2sinx 2

− x = 0, x ∈ [0, 2π]. (1)

• Fixed-point iteration or functional iteration: Given a continuous function g, choose an initial point x0and generate {xk}k=0 by

xk+1= g(xk), k ≥ 0.

Take g(x) = π +12sin x2.

Given x0, tolerance T OL, maximum number of iteration M . Set i = 1 and x = g(x0).

While i ≤ M and |x−x|x|0| ≥ T OL Set i = i + 1, x0= x and x = g(x0).

End While

Algorithm 1: Fixed point iteration

• Newton’s method: Starts with an initial approximation x0and generates the sequence {xn}n=0 defined by

xn+1= xn− f (xn) f0(xn).

Given x0, tolerance T OL, maximum number of iteration M . Set i = 1 and x = x0− f (x0)/f0(x0).

While i ≤ M and |x−x|x|0| ≥ T OL

Set i = i + 1, x0= x and x = x0− f (x0)/f0(x0).

End While

Algorithm 2: Newton’s method

1

(2)

Figure 1: Newton’s method

• Secant method: Using the approximation

f0(xn−1) ≈ f (xn−1) − f (xn−2) xn−1− xn−2

.

for f0(xn−1) in Newton’s formula gives

xn = xn−1−f (xn−1)(xn−1− xn−2) f (xn−1) − f (xn−2) .

Given x0, x1, tolerance T OL, maximum number of iteration M . Set i = 2; y0= f (x0); y1= f (x1); x = x1− y1(x1− x0)/(y1− y0).

While i ≤ M and |x−x|x|1|≥ T OL

Set i = i + 1; x0= x1; y0= y1; x1= x; y1= f (x);

x = x1− y1(x1− x0)/(y1− y0).

End While

Algorithm 3: Secant method

Home works

1. Plot the figure of the function f (x) on [0, 2π].

2. Use fixed point iteration, Newton’s method and Secant method to solve (1). In each iteration, please output the approximation x1and the relative error |x1|x−x0|

1| .

(a) Fixed point iteration: 40040112S, 498711079, 40040126S

2

(3)

Figure 2: Secant method

(b) Newton’s method: 40040114S, 498402331, 40040316S, 40140229S (c) Secant method: 40040118S, 498401052, 40040326S

3

參考文獻

相關文件

The superlinear convergence of Broyden’s method for Example 1 is demonstrated in the following table, and the computed solutions are less accurate than those computed by

These interior point algorithms typically penalize the nonneg- ativity constraints by a logarithmic function and use Newton’s method to solve the penalized problem, with the

The technique firstly makes use of two 2 stage method to solve the initial value of the transition matrix , then establishes the optimization mathematical model , and Gauss 2

Keywords: Performance evaluation; Multiprocessor; Cache coherence protocol; Queueing network model; Forking; Mean value analysis; Fixed-point iteration;

For the 3-coupled DNLS equations with V (z) = 0, these computed global energy minimizers are also used as the initial point of a continuation method for tracking other minimal

In this work we propose a discretization using radial basis collocation with the quasi- Newton iteration scheme to solve a semilinear elliptic partial differential equation and

These computed global energy minimizers are also used as the initial point of a continuation method for the 3-component DNLS equations with VðzÞ ¼ 0 to track other minimal

We establish local and global existence results for Dirac- Klein-Gordon equations in one space dimension, employing a null form estimate and a fixed point argument.. Introduction