#1660 'diff() inconsistent


'diff(x*y,x) gives the correct result (holds form), while
'diff(x,x) gives 1, calculates the differencial.


  • Nobody/Anonymous

    I may be stupid or blind, but I do not see the problem here. Would you like to see diff(x*x,x) resulting in x rather than 2x? May be your remark is more subtle than this.

  • Žiga Lenarčič

    Problem is in quoted diff, which should not evaluate, but it does in 'diff(x,x) case:
    (%i2) 'diff(x*y,x);
    (%o2) -- (x y)
    (%i3) 'diff(x,x);
    (%o3) 1
    (%i4) 'diff(2*x,x);
    (%o4) -- (2 x)

  • Dieter Kaiser

    Dieter Kaiser - 2009-11-14

    'diff(x,x) gives 1 because of simplification in the simplifying function simpderiv.

    We have a similar simplification for integrals:

    (%i9) 'integrate(1,x);
    (%o9) x

    Therefore, we can do something like

    (%i10) 'diff('integrate(1,x),x);
    (%o10) 1

    Furthermore, the following simplification is build in:

    (%i15) 'diff(x,x,0);
    (%o15) x

    This works for an arbitrary expression too:

    (%i17) 'diff(sin(x),x,0);
    (%o17) sin(x)

    It might be arguable why Maxima does not do more simplifications of this type, but the implement simplifications are not wrong. I have no example, where these simplifications cause problems.

    So, I would suggest not to change the behavior of Maxima to simplify the examples in this bug report.

    Setting the status to pending and resolution "works for me".

    Dieter Kaiser

  • Dieter Kaiser

    Dieter Kaiser - 2009-11-14
    • status: open --> pending
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

  • SourceForge Robot

    • status: pending --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks