Treść książki

Przejdź do opcji czytnikaPrzejdź do nawigacjiPrzejdź do informacjiPrzejdź do stopki
ThecorrectnessoftheaboveexpressionhasbeenverifiedbymeansofthefollowingMATLABscript:
%RELATIVEERRORPROPAGATIONTHROUGH
%FORMULAy=tan(x)^x
symsx
y=tan(x)^x;
T=x*diff(y,x)/y;
fplot(log10(abs(T)),[0,pi/2]);gridon
xlabel('x');ylabel('log[|T(x)|]')
title('y=tan(x)^x')
T1=x*log(tan(x))+2*x^2/(sin(2*x));
fprintf('T1(x)-T(x)=%s\n',simplify(T1-T))
%testedexpressionforT(x)
%referenceexpressionforT(x)
T1(x)-T(x)=0
Problem1.8:Assesstheabsoluteerrorcorruptingtheargumentofthecomplexvariable:
z
~
±
a
~
2
+
j
b
~
1
j
b
~
2
causedbythefloating-pointrepresentationofthedata:
bd
~
1
2,
ad
~
2
1
and
bd
~
2
1.
Solution#1:Ontheonehand,wehave:
z
~
±
(
a
~
2
+
j
b
~
2
)(
a
~
2
j
b
~
2
)
±
bb
~~
12
a
~
2
2
+
+
j
b
ba
~
~~
2
12
2
j
ba
~
1
(
~
2
j
b
~
2
)
whichmeansthat:
tg
()
I
~
±
ba
bb
~~
~~
12
12
±
a
b
~
~
2
2
(where
I
~istheargumentofz
~)
andaftersubstitution
a
~
2
±+
1
O
2
and
b
~
2
±+
1
B
2
:
tg
()
I
~
±
1
1
+
+
O
B
2
2
Ś+
1
O
2
B
2
Ontheotherhand,theTaylorexpansionof
tg
()
I
~
,
limitedtothefirsttwocomponents,is:
tg
()
I
~
±
tg
(
I
+
I
)
d
tg
()
I
+
cos
2
()
I
I
Thecomparisonofbothexpressionsfor
tg
()
I
~leadstotheconclusionthat:
tg
()
I
±and
1
cos
2
()
I
d
IO
2
B
2
whichaftersubstitution
cos
2
()
I
±+
1tg
2
()
I
±
2
providesthesolutiontotheproblem:
d
I
cos
2
()(
IO
2
B
2
)
±
0.5
(
O
2
B
2
)
and
I
d
0.5
O
2
B
2
Ś
eps
whereepsisthelimiterrorofthefloating-pointrepresentationofdata.
Solution#2:Alternatively,theassessmentoftheerror
I
maybebasedonthefollowingformula:
d
I
B
B
a
I
2
a
2
+
B
B
b
I
1
+
b
1
B
B
b
I
2
b
2
±
a
2
B
B
a
I
2
O
2
+
b
1
B
B
b
I
1
B
1
+
b
2
B
B
b
I
2
B
2
where:
I
±
Imln
f
|
L
(
|
k
a
2
+
b
1
j
b
2
N
|
)
1
|
J
Hencetheassessment:
I
Ś
a
2
B
B
a
I
2
O
2
+
b
1
B
B
b
I
1
B
1
+
b
2
B
B
b
I
2
B
2
Ś
Ceps
|
19