m文件如下:
syms x
y=exp(x^2)*log(x);
yy=diff(y,2)
结果为:
yy =
4*exp(x^2) - exp(x^2)/x^2 + 2*exp(x^2)*log(x) + 4*x^2*exp(x^2)*log(x)
可这样:
syms x
y=exp(x^2)*log(x);dy2=diff(y,2)
结果是:
dy2 =
4*exp(x^2) - exp(x^2)/x^2 + 2*exp(x^2)*log(x) + 4*x^2*exp(x^2)*log(x)
sum x;y=e^x^2lnx;diff(y,x,2);