Some ArtSGraph functions take expression as argument and returns expression as its value. Function diff(F,x), which performs analytical differentiation, is one of them.
Function diff(F,x) obtains derivative of expression F with respect to variable x.
Example
f=sin(x)/ln(x)
d=diff(f,x) ; d is (ln(x)*cos(x)-sin(x)/x)/(ln(x))2
Expression F can contain other variables besides x. In this case diff(F,x) returns partial derivative.
Example
f=a*sin(x)
d1=diff(f,x) ; d1 is a*cos(x)
d2=diff(f,a) ; d2 is sin(x)
d3=diff(f,y) ; d3 is 0
Using diff(F,x) you can calculate derivatives of high orders.
Example
F=sin(x)*cos(y)
Fxx=diff(diff(f,x),x) ; Fxx is cos(y)*(-sin(x))
Fyy=diff(diff(f,y),y) ; Fyy is sin(x)*(-cos(y))
Fxy=diff(diff(f,x),y) ; Fxy is cos(x)*(-sin(y))
Fyx=diff(diff(f,y),x) ; Fyx is (-sin(y))*cos(x)