Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

pi doesn't work in diff() #59

Closed
acttmer opened this issue Dec 8, 2016 · 3 comments
Closed

pi doesn't work in diff() #59

acttmer opened this issue Dec 8, 2016 · 3 comments

Comments

@acttmer
Copy link

acttmer commented Dec 8, 2016

For example, derivative of x^2pi should be 2pix, but this lib will give a result x^2.
It seems that in diff() pi is not supported.

@jiggzson
Copy link
Owner

jiggzson commented Dec 8, 2016

The problem is that you're more than likely not telling nerdamer with respect to which variable it's supposed to differentiate. In this case nerdamer should detect that pi is a constant since in version 6.0 and up this is the case but I haven't done so yet. Here it tries to assume you mean the first variable and since pi come before x, it's with respect to pi. To avoid this pass in the variable as the second argument so in your case

var x = nerdamer('diff(x^2*pi, x)');

@acttmer
Copy link
Author

acttmer commented Dec 8, 2016

Now I got it. This is a great project, thank for your effort again!

@jiggzson
Copy link
Owner

jiggzson commented Dec 8, 2016

No problem. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants