home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
sm22a.zip
/
SYMBMATH.H07
< prev
next >
Wrap
Text File
|
1993-04-16
|
1KB
|
51 lines
7.5 Differentiation
SymbMath differentiates an expression expr by functions
d(expr, x)
d(expr, x, order)
d(expr, x=x0)
d(expr, x=x0, order)
Example 7.5.1. Differentiate x^(x^x).
Input:
d(x^(x^x), x)
end
Output:
x^(x^x)*(x^(-1 + x) + x^x*ln(x)*(1 + ln(x)))
Example 7.5.2. Differentiate the expression f=sin(x^2+y^3)+
cos(2*(x^2+y^3)) with respect to x, and with respect to both x and y.
Input:
f=sin(x^2+y^3)+cos(2*(x^2+y^3))
d(f, x)
d(d(f, x), y)
end
Output:
f = sin(x^2 + y^3) + cos(2*(x^2 + y^3))
2*x*cos(x^2 + y^3) - 4*x*sin(2*(x^2 + y^3))
-6*x*y^2*sin(x^2 + y^3) - 12*x*y^2*cos(2*(x^2 + y^3))
To define a derivative.
Input:
d(si(x_),x_) := sin(x)/x
d(si(t),t)
end
Output:
d(si(x_),x_) := sin(x)/x
sin(t)/t
Or the package d.sm is included before finding the derviatives.
Example:
Input:
include 'd.sm'
d(si(t),t)
end
Output:
done
sin(t)/t
If SymbMath cannot find some derivatives, you should include
the package 'd.sm' in your program or in the initial package 'init.sm'.