Professional Documents
Culture Documents
Mock Quiz#7 With Solution
Mock Quiz#7 With Solution
Q1: Show first two steps of Newton- Raphson method to compute the solution of 𝑥𝑒 𝑥 − 2 = 0. Use x =1 as initial guess.
=
=
=>
=
f(x) (1 + x)
=
en => f(x) 2e
=
5.43
=
Checkif is
f(x1) sufficiently close to zero,
quit
de we go to next step.
0.87-*2)
tion/Step x1
-f
2:
x = =
e0.87
( 0.87)
+
0.87-0.017=
= >
0.852
Checkif f(xz) is
sufficiently close to
zero, (f(x2)) < tolerance -
quit.
Q2: Show first two steps of Secant method to compute the solution of 𝑥𝑒 𝑥 − 2 = 0. Use 𝑥1 = 0.5 and 𝑥2 = 1 as initial guesses.
x,
named and
Sep1: We have two guesses in rz.
the
only difference we use the approximation of fic).
xs =
xz -
1)-(2-xi)
(f(x2) f(x)) -
x3 1
=
2-(-0.5) =
1 -
-
C 2.
=
0.5
0.5 0.8104
=>
0.5
( -
2) -
0.5 -
2) 2 -
0.52
Iteration
fess
#2: NextInitial que, an xo- =
a
↓
compute it -
Q3. Use the Newton-Raphson method to find the solution to the following nonlinear system of equations,
𝑓1 (𝑥1 , 𝑥2 ): 𝑥12 + 𝑥1 𝑥2 − 10 = 0
𝑓2 (𝑥1 , 𝑥2 ): 3𝑥1 + 3𝑥1 𝑥22 − 2 = 0
We can also write the above set of equation in a form of vector as,
I
x x,xz 10
L
0
-
𝐹(𝑋) = [ ]
0 F(x) =
where 𝐹(𝑋) = [
-
M
], 𝐹(𝑋) = [ 2 ]
𝑓2 (𝑥1 , 𝑥2 ) @
-𝑥1 + 𝑥1 𝑥2 − 2
=>
(t eI (axter i
x1
Ex) =
-
and
COL CO)
b. Starting with the initial guess of 𝑥1 = 1 and 𝑥2 =2. Compute the first two steps of Newton-Raphson.
[]=(2]
We initial X*
are
given gun,
Jacobian atX .
Compute
JIY)
a*/x
=
x
=
J(x10) =
Iarctice ! In s
-
(i) (e]
L isin]
J(x(0) =
Evaluate F(X) X"
(s]
at -> FIx*
(Il!]
F(x)
( "):()
=> =
F(X*
x=X -
(xx)
↑ ↑ I
Next-quen Currentques Inverse of Jacobian Vector ofnonlinea equations
matrixevaluated evalent at
current-guess
& X
=
Let y J(x(x)
=
F(X,0))
fnon-lineal equations.
e
↑
Jacobian Matrix Vector
-
this is linear system of equations, for y we can solve
X=X- Y
After
obtaining x
"
We check if I/F(X") Is is
very
small then we
proceed and compute next
step literation and use XC as initial
guns.
X" initial find X.
():Using
-
as goes,
x( x"
=
-
5(y() F(X)
y 5(x )F(xx")
=
5(x) y F(xc)
=> =
↑ ↑
Jcx) is jacobian FCX) is F(x)
evalated & XC, evaluated at X".