2
$\begingroup$

For a long time i've evaluated D[f[t],{t,3}] to get this power-like derivative thing:

$$f^{(3)}(x)$$

Is it possible to obtain same through an easier keyboard shortcut?

$\endgroup$
3
  • 3
    $\begingroup$ f'''[t] ????? $\endgroup$
    – Artes
    Commented May 17, 2013 at 15:10
  • 1
    $\begingroup$ yes i know, but i mean without evaluation needed, like for second derivative, f ctrl+6 esc ' ' esc $\endgroup$
    – Sren
    Commented May 17, 2013 at 15:29
  • 3
    $\begingroup$ Derivative[3][f][x] then Ctrl + Shift + n? $\endgroup$
    – Silvia
    Commented May 17, 2013 at 20:34

1 Answer 1

4
$\begingroup$

Edit: My interpretation of your question:

From the clarification in your comment to the question:

like for second derivative, fCtrl6Esc''Esc

I assume you want the analogous entry method for the third derivative as you demonstrated for the second derivative. The difference to the other entry methods is that it uses the special character \[DoublePrime] in the input, as a superscript. That's very different from the input method using simply f'''[x] where the character ' is repeated three times.

End edit

This works by setting an InputAlias for the unicode character of the triple prime so that you can enter it as ESC'''ESC, and then setting $PreRead to translate triple primes in superscript boxes before they get converted to Power:

SetOptions[EvaluationNotebook[], 
 InputAliases -> 
  Join[Quiet@
     OptionValue[Options[EvaluationNotebook[]], InputAliases] /. 
    InputAliases -> {}, {
    "'''" -> FromCharacterCode[8244]}]]

$PreRead = ReplaceAll[#, SuperscriptBox[f_, "‴"] :> RowBox[
      {
       RowBox[{"Derivative", "[", "3", "]"}], "[", f, "]"}]] &;

f[x_] := x^4

f‴[z]

(* ==> 24 z *)

g‴[x]

$g^{(3)}[x]$

The example code above can't be copied directly: you have to enter the triple primes as superscripts, i.e., fCtrl6Esc'''Esc

A similar alias definition using Unicode was done in this answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.