-8

I have function and need to take partial derivatives respect to its two variables.

The function is:

sum over r, p, q

Since I am not really good at math, I need some help to know the following derivatives:

df/dp and df/dq

hnefatl
  • 5,860
  • 2
  • 27
  • 49
mgokhanbakal
  • 1,679
  • 1
  • 20
  • 26

1 Answers1

1

Let F(p,q) be

F(p,q) = sum(j, [ r(j) - sum(i, p(i,j)*q(i,j)) ]^2 )

Then dF/dp is the matrix A formed by elements

A(i,j) = 2 * [r(j) - sum(k, p(k,j)*q(k,j))] * (-q(i,j))

dF/dq is the matrix B formed by elements

B(i,j) = 2 * [r(j) - sum(k, p(k,j)*q(k,j))] * (-p(i,j))
Erwin Kalvelagen
  • 15,677
  • 2
  • 14
  • 39