Differentiate.
Syntax
diff(S,'v')
diff(S,n)
diff(S,'v',n)
Description
diff(S)
differentiates a symbolic expression S
with respect to its free variable as determined by findsym
.
diff(S,'v')
or diff(S,sym('v'))
differentiates S
with respect to v
.
diff(S,n)
, for a positive integer n
, differentiates S
n
times.
diff(S,'v',n)
and diff(S,n,'v')
are also acceptable.
Examples
Assume
syms x t
Then
diff(sin(x^2))
returns
2*cos(x^2)*x
and
diff(t^6,6)
returns
720
See also
int
, jacobian
, findsym
[ Previous | Help Desk | Next ]