MATLAB's Symbolic Toolbox operator limit() may be used to compute the derivative of a function from the definition of derivative as a limit of difference quotients. More directly, the Symbolic Toolbox operator diff() may be used to compute derivatives. See below.
>> syms x h >> limit( (sin(x+h)-sin(x))/h , h, 0 ) ans = cos(x) >> diff( sin(x) ) ans = cos(x) >> [diff(cos(x)),diff(tan(x)),diff(cot(x)),diff(sec(x)),diff(csc(x))] ans = [ -sin(x), tan(x)^2 + 1, - cot(x)^2 - 1, sin(x)/cos(x)^2, -cos(x)/sin(x)^2]
Are the results of the final computation above literally identical to those in the textbook? Are they equivalent?
Mathematica's Limit[] operator may be used to compute the derivative of a function from the definition of derivative as a limit of difference quotients. More directly, the D[] operator may be used to compute derivatives.