Graphics Programs Reference
In-Depth Information
EXAMPLE 4.9
Find a solution of
y 2
sin x
+
+
ln z
7
=
0
2 y
z 3
3 x
+
+
1
=
0
x
+
y
+
z
5
=
0
using newtonRaphson2 .Start with the point(1
,
1
,
1).
Solution Letting x
=
x 1 , y
=
x 2 and z
=
x 3 , the code defining the function array f ( x ) is
functiony=fex4
9(x)
% Function used in Example 4.9
y=[sin(x(1))+x(2)ˆ2+log(x(3))-7;...
3*x(1) + 2ˆx(2) - x(3)ˆ3 + 1;
_
...
x(1) + x(2) + x(3) - 5];
The solution can nowbeobtainedwith the single command
_
>> newtonRaphson2(@fex4
9,[1;1;1])
which results in
ans =
0.5991
2.3959
2.0050
Hence the solutionis x
=
0
.
5991, y
=
2
.
3959 and z
=
2
.
0050.
PROBLEM SET 4.1
1.
Use the Newton-Raphson me thod and a four-function calculator (
+−×÷
oper-
75 with four significant figure accuracy.
2. Find the smallest positive(real) root of x 3
ationsonly)tocompute
3
23 x 2
3
.
5
.
54 x
+
9
.
84
=
0 by the
method of bisection.
3.
The smallest positive, nonzero root of cosh x cos x
1
=
0lies in the interval(4
,
5)
.
Compute this root by Brent's method.
4.SolveProb.3bythe Newton-Raphsonmethod.
5. A root of the equation tan x
tanh x
=
0lies in (7
.
0
,
7
.
4)
.
Find this root with three
decimal place accuracybythe method of bisection.
6. Determine the two roots of sin x
+
=
,
3 cos x
2
0thatlie in the interval(
2
2).
Use the Newton-Raphsonmethod.
Search WWH ::




Custom Search