I am new to Mathematica so the my questions might be pretty much at the pupil's level.

If I want to use differentiation to derive:

    (fg)' = f'g + g'f

How can I keep empty symbol f, g from been evaluated for derivative and get 0? For example if I use

    D[f g, x]

I immediately get 0 result. I guess it might be related to hold, but couldn't find out the correct way to get it work.

  • 1
    $\begingroup$ Try Dt[f g, x]. $\endgroup$ – J. M. will be back soon Jun 4 '13 at 16:02
  • 2
    $\begingroup$ Or perhaps, D[f[x] g[x], x]. $\endgroup$ – Michael E2 Jun 4 '13 at 16:05
  • $\begingroup$ Or try D[f[x] g[x], x] $\endgroup$ – user21 Jun 4 '13 at 16:05
  • 3
    $\begingroup$ Michael wins this round $\endgroup$ – Jacob Akkerboom Jun 4 '13 at 16:06
  • 2
    $\begingroup$ Closely related: how to differentiate formally $\endgroup$ – Jens Jun 4 '13 at 16:11

Some alternatives (picked from the comments):

D[f[x] g[x], x]

Dt[f g, x]

f[#] g[#] &'
  • $\begingroup$ Great it is solved! $\endgroup$ – JimmyLin Jun 4 '13 at 17:09
  • $\begingroup$ Thanks! Didn't think of something like f[#] g[#] &'. $\endgroup$ – Silvia Jun 4 '13 at 19:43

Your Answer

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

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