Page 98 -
P. 98
Pb. 4.3 ( cot( ))x x at x → 0
(1− cos(2x ))
Pb. 4.4 2 at x → 0
x
Pb. 4.5 sin(2x )cot(3x ) at x → 0
4.2 Derivative of a Function
DEFINITION The derivative of a certain function at a particular point is
defined as:
fx() − fx( )
′ fx( ) = lim 0 (4.3)
−
0
x →x 0 xx
0
Numerically, the derivative is computed at the point x as follows:
0
1. Construct an x-sequence that approaches x .
0
2. Compute a sequence of the function values corresponding to the
x-sequence.
3. Evaluate the sequence of the ratio, appearing in the definition of
the derivative in Eq. (4.3).
4. Read off the limit of this ratio sequence. This will be the value of
the derivative at the point x .
0
Example 4.2
Find numerically the derivative of the function ln(1 + x) at x = 0.
Solution: Edit and execute the following script M-file:
N=20;n=1:N;
x0=0;
dxn=(1/2).^[1:N];
xn=x0+dxn;
yn=log(1+xn);
dyn=yn-log(1+x0);
© 2001 by CRC Press LLC