Question

I want to take the derivative the a function that includes the number e (exp(1)). How can I solve symbolically using e (i.e., not decimal numbers). For example:

syms x
e=exp(1)
diff(e^-x)
Était-ce utile?

La solution 2

What if you do

 syms x;
 e=exp(sym(1));

Autres conseils

It's rarely a good idea to assign predefined constants to variables when using the symbolic toolbox:

diff(exp(-x))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top