Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.