This question already has an answer here:

I have a question, I would be grateful if someonr helped me.

Suppose I have these functions:

te[x_] := x^2
te1[x_] := te[x] x

How can I numericaliy differentiate te1 with respect to te — something like

D[te1[x], te[x]]


ND[te1[x], te[x]]

I know there are much easier ways to obtain these two, but I want to understand the logic of these calculations.


marked as duplicate by Carl Woll, m_goldberg, Coolwater, bbgodfrey, Henrik Schumacher Dec 27 '17 at 7:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ @ Carl Woll for numerical too ND?? $\endgroup$ – kmsin Dec 25 '17 at 20:32
  • $\begingroup$ You can use te1'[1.] / te'[1.] for a numerical derivative at x=1.. Note that you need to use machine numbers instead of integers. $\endgroup$ – Carl Woll Dec 25 '17 at 22:54
  • $\begingroup$ @ Carl Woll Thanks But I need some thing with ND $\endgroup$ – kmsin Dec 25 '17 at 23:26
  • $\begingroup$ Is ND actually a function? It doesn't seem like it. $\endgroup$ – numbermaniac Dec 26 '17 at 0:01