4 ms·
Do people do it this way? Isn't using index notation + Einstein summation convention way easier and more powerful? You only need to remember two rules: 1. dx_i
by jules 6y ago
Do people do it this way? Isn't using index notation + Einstein summation convention way easier and more powerful? You only need to remember two rules:
1. dx_i/dx_k = [i==j] where [i==j] is 0 if i != j and 1 if i == j
2. (AB)_ij = A_ik B_kj
You don't even need the second rule if the function you want to differentiate is in index notation in the first place.
The example of the other comment:
f(x) = x^T A x = x_i A_ij x_j
df/dx_k = d/dx_k (x_i A_ij x_j) = [i==k] A_ij x_j + x_i A_ij [j==k] = A_kj x_j + x_i A_ik.
You can also skip the intermediate [i==k] step and immediately set the indices of other factors in a term equal. For example, differentiating with respect to A is immediate, even though the method from the article can't even handle it directly:
df/A_kl = x_k x_l