如果只是为了求出表达式:
clear
syms x;
k=diff(exp(x)*log(1-x^2),2) %注意:matlab里没有ln函数,log就是ln. e^x不能直接表示,要exp(n)
如果你要求把x=n代入,在上面基础上
subs(k,n)
或
sym2poly(subs(k,n))
syms x
diff(diff(e^x*ln(1-x^2))
>> syms x
>> diff(exp(x)*log(1-x^2),2)
ans =
log(1 - x^2)*exp(x) + (2*exp(x))/(x^2 - 1) + (4*x*exp(x))/(x^2 - 1) - (4*x^2*exp(x))/(x^2 - 1)^2