syms x f
f=exp(-x)*sin(x^2);
diff(f,5)
ans =
59*exp(-x)*sin(x^2)-110*exp(-x)*cos(x^2)*x+40*exp(-x)*sin(x^2)*x^2-20*exp(-x)*cos(x^2)-80*exp(-x)*cos(x^2)*x^3-120*exp(-x)*sin(x^2)*x-80*exp(-x)*sin(x^2)*x^4+240*exp(-x)*cos(x^2)*x^2+32*exp(-x)*cos(x^2)*x^5+160*exp(-x)*sin(x^2)*x^3