# how to calculate partial derivative?

how do I find $\frac{\partial q}{\partial k}$ of $q(k,l,m) = k\,p(k,l) + m^2$ ?

I have tried

$\frac{\partial q}{\partial k}= p(k,l) \times\begin{bmatrix}\frac{dk}{dm}+\frac{dl}{dm}\end{bmatrix} + p(k,l)\\ \frac{\partial q}{\partial l} = k\,p'_l(k,l)\, \\\frac{\partial q}{\partial m} = 2m$

-

here it is: $$\frac{\partial q}{\partial k}= 1p(k,l) + k \times\frac{\partial p}{\partial k}\\ \frac{\partial q}{\partial l}= k \times\frac{\partial p}{\partial l}\ \ \\\frac{\partial q}{\partial m} = \frac{\partial k}{\partial m}p(k,l) + k \times\frac{\partial p}{\partial m}+2m=\frac{\partial k}{\partial m}p(k,l)+k \times\begin{bmatrix}\frac{\partial p}{\partial k}\frac{\partial k}{\partial m}+\frac{\partial p}{\partial l}\frac{\partial l}{\partial m}\end{bmatrix} + 2m\$$

-
-ignore the $m^{2}$ because it is constant w.r.t. k
-Use the product rule on $kp(k,l)$ :
$\partial_{k}$$kp(k,l)$=$p(k,l)+k\partial_{k}p(k,l)$