The derivative symbol in "output" is always like this f'(x) but I want something like D[f[x],x] or df(x)/dx.

I tried TraditionalForm but it didn't work in "output".

Many Thanks!

Got it! Format[] function is very useful!

  • 1
    $\begingroup$ I do not understand, If the input is D[f[x],x] what do you mean by you want the output to be D[f[x],x]? You mean you want it to remain unevaluated? You can do HoldForm[D[f[x],x]] in this case. Or TraditionalForm@HoldForm[D[f[x], x]] which will display as you wanted. !Mathematica graphics $\endgroup$
    – Nasser
    Nov 18 '21 at 15:04
  • 1
    $\begingroup$ The full form of f'[x] is Derivative[1][f][x]. You could try assigning format values; e.g. something like Format[Derivative[1][f_][arg_]] := Row[{"[", HoldForm[D[f[x], x]], Subscript["]", x = arg]}] $\endgroup$
    – thorimur
    Nov 19 '21 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.