# Derivative of a function for a given x in Maple

I'm stuck on something that must be incredible simple to do. I calculate the second derivative of $f(x) = e^{\sin(x)}$ like so in Maple:

diff(diff(exp(sin(x)),x),x);


But now i want to calculate $D^2f(0)$, and can't seem to find a proper way to do this...

I tried:

 fsolve(Deriv = 0, x);


with Deriv:=diff(diff(...)) but that gives me $1,57...$ but it has to be $1$.

-
edit: here's the proper way to do it f := x-> exp(sin(x)); D(D(f))(0); –  Myself Jan 9 '11 at 13:56
Thanks, that makes more sense :) –  Aerus Jan 9 '11 at 16:10
Your command of fsolve(Deriv = 0, x); actually solves the equation $D^2 f(x) = 0$ for $x$, which isn't what you want. Instead, you want to compute $D^2 f(0)$, which is simply the second derivative $D^2 f$ evaluated at $x = 0$.
Here, the second derivative $D^2 f$ is $$D^2 f(x) = e^{\sin(x)} \cos^2(x) - e^{\sin(x)} \sin(x),$$ so plugging in $x = 0$ yields $D^2 f (0) = 1$ as you wanted.
Ok so i did: Deriv:=diff(diff(exp(sin(x)),x),x); and subs(x=0,Deriv); which gave me the correct answer. Then evalf(%); to make it show $1$. Thanks. –  Aerus Jan 9 '11 at 11:45