I need someone help to calculate the partial derivative. Following is the question
$$R=\frac{ba^2}{(b+k)^2}-\textrm{Cost}\left(\frac{ba}{b+k}\right)$$
Derivative of the first term has been calculated as following $$\frac{\partial}{\partial b}\frac{ba^2}{(b+k)^2}=\frac{(b+k)^2a^2-2a^2b(b+k)}{(b+k)^4}=\frac{a^2k-ba^2}{(b+k)^3}$$
Now, what will be the partial derivative of the following (that is the second term of $R$)? $$\frac{\partial}{\partial b}\textrm{Cost}\left(\frac{ba}{b+k}\right)=?$$
$$\textrm{Cost}(x)={\lambda_2x^2}+{\lambda_1x}-{\lambda_0}$$
Note: here, I need to calculate the partial derivative of the following two cases e.g., different values of $x$ variable
$$x=a$$
$$x=\frac{ba}{b+k}$$
$$\frac{\partial R}{\partial b}=\frac{\partial}{\partial b}\left[\frac{ba^2}{(b+k)^2}-\textrm{Cost}\left(\frac{ba}{b+k}\right)\right]=?$$ Please help to me calculate the deravitive in both cases, I will need both solutions.
Use the chain rule
$$ \frac{\partial C}{\partial b} = \frac{dC}{dx}\frac{\partial x}{\partial b} $$
where $C$ is the cost function.
You then have
$$ \frac{dC}{dx} = 2\lambda_2x + \lambda_1 $$
and
$$ \frac{\partial x}{\partial b} = \frac{\partial}{\partial b}\left(\frac{ab}{b+k}\right) = \frac{ak}{(b+k)^2} $$
Now multiply them and plug in $x$ in terms of $b$