0
$\begingroup$

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$.

  • 0
    Thanks, that makes more sense :)2011-01-09

1 Answers 1

2

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.

  • 1
    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.2011-01-09