Josep
Josep

Reputation: 3

Differentiate the number e (exp(1)) symbolically

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)

Upvotes: 0

Views: 68

Answers (2)

Daniel
Daniel

Reputation: 36720

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

diff(exp(-x))

Upvotes: 2

Matt J
Matt J

Reputation: 1137

What if you do

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

Upvotes: 0

Related Questions