Ask Your Question
0

Computing derivatives

asked 2013-08-15 13:46:42 +0200

pinwheel gravatar image

Hey guys,

I dont know where the problem is, but sage (5.10 here) doesnt compute easy derivatives as e.g.

x = var('x')
f = sqrt(x)
diff(f,x)

This leads to the following error: TypeError: unable to simplify to float approximation

Whats the problem here?

edit retag flag offensive close merge delete

Comments

Can you give us your *complete* session? This should work fine, it sounds like you probably accidentally defined something in-between which changed things.

kcrisman gravatar imagekcrisman ( 2013-08-15 14:46:33 +0200 )edit
1

That's what you'd get if `sqrt` were actually `math.sqrt` and not Sage's `sqrt`.

DSM gravatar imageDSM ( 2013-08-15 14:55:35 +0200 )edit

DSM, why don't you put your answer as an answer so pinwheel can accept it?

kcrisman gravatar imagekcrisman ( 2013-08-15 21:55:23 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-08-15 17:39:10 +0200

pinwheel gravatar image

You are perfectly right. I defined sqrt as math.sqrt at the very beginning of my session. I completely forget that this is still included.

Thanks a lot!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-08-15 13:46:42 +0200

Seen: 418 times

Last updated: Aug 15 '13