Skip to content

nerdamer.diff("x * sqrt(y)","x") function returning incorrect expression during partial differentiation if the constant term in the equation (in this case sqrt(y)) is under square root #675

Description

@sg13041995

nerdamer.diff("y * sqrt(x)","y") returns => (sqrt(x^0.5));

But is should return (sqrt(x)) or (x)^0.5

So, I have conducted multiple tests and found out that, this issue is occurring if,
"The constant term during partial differentiation, in the equation or function is under square-root"

Example:
f(x,y) = the expression = y * sqrt(x)
f(x,y) = the expression = y / sqrt(x)

In this case if we try nerdamer.diff("y * sqrt(x)","y") or nerdamer.diff("y/sqrt(x)","y") where sqrt(x) is a constant, then output is coming wrong.
But it perfectly works if nerdamer.diff("y*sqrt(x)","x") where y is constant now and we are differentiating w.r.t x.

It will again throw wrong out put => 0.5*sqrt(x^0.5)*y^(-0.5) if we try nerdamer.diff("sqrt(y)*sqrt(x)", "y") as sqrt(x) in the equation was a constant in the context of the partial differentiation.

The major mistake is in the output equation that I have observed is, where it should throw sqrt(x) it is throwing sqrt(x^0.5).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions