4

A friend showed me the code below.

r[i_] := {x[i, t], y[i, t], z[i, t]};
rji = r[i] - r[j];
solap = 2 a - Norm[rji];
FullSimplify[D[solap, t]]

I'm unsure about what she's trying to calculate, but we're both curious about the output produced:

enter image description here

What is Abs´?

andandandand
  • 2,393
  • 1
  • 15
  • 16
  • 1
    Put your cursor on it and press F1, thank me later. – paw Nov 01 '15 at 19:18
  • @paw: https://www.dropbox.com/s/sebmx5wxkwofnjw/Prime.PNG?dl=0 – andandandand Nov 01 '15 at 19:22
  • 2
    So @Paw, where in that directed documentation does it address the Abs followed by a tick? – IPoiler Nov 01 '15 at 19:23
  • 3
    Indeed, the help on Prime is not enlightening at all, unfortunately. The ' indicates a first derivative. This is linked with asking to calculate the derivative using D. However, Mathematica does not have a rule for the derivative of Abs. See http://mathematica.stackexchange.com/q/69077/27951 for a discussion. – MarcoB Nov 01 '15 at 19:32
  • 1
    @andandandand Sorry, didn't see the tick. The problem is related to the derivative of Abs. Try FullSimplify[D[ComplexExpand[solap], t]] instead. – paw Nov 01 '15 at 19:32
  • 2
    The derivative of Abs is not defined so it remains unevaluated as Abs'. If you ae dealing with real-valued functions then use the substitution Abs[x_] :> Sqrt[x^2] prior to taking the derivative. – Bob Hanlon Nov 01 '15 at 19:42
  • 2
    Try solap = 2 a - ComplexExpand@Norm[rji], too. – Michael E2 Nov 01 '15 at 20:01

0 Answers0