Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify("(x^2)^0.5") should be "abs(x)" #3329

Open
paulftw opened this issue Nov 29, 2024 · 1 comment
Open

simplify("(x^2)^0.5") should be "abs(x)" #3329

paulftw opened this issue Nov 29, 2024 · 1 comment

Comments

@paulftw
Copy link
Contributor

paulftw commented Nov 29, 2024

While there are genuine use cases when returning "x" would be better (that's what most humans would expect), strictly speaking it is incorrect.

To reproduce in the mathnotepad:

derivative("(x^2)^0.5", "x").evaluate({x:-3})
    1

derivative("(x^2)^0.5", "x", {simplify:false}).evaluate({x:-3})
    -1

Here I evaluate the same derivative at the same point x=-3 but get two different results.
Same problem for x^4 and I assume all other even powers.

@josdejong
Copy link
Owner

Thanks that is a very good and valid point.

Anyone able to improve simplify? Help would be welcome.

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

No branches or pull requests

2 participants