Confused about partial derivatives I am having some issues understanding what should I keep constant and what not in certain cases when I take partial derivatives. Specifically in this kind of situation: say we have a function
$$f(x,y) = x^3+7y^2$$
and we also know that $y=2x+1$ and we need to find the partial derivative with respect to $x$ at a given point, say $\frac{\partial f(2,3)}{\partial x}$. From what I understood, when taking partial derivatives with respect to a variable, you need to keep the other constant, in which case, if I do that above (keeping $y$ constant) I would get, $\frac{\partial f(x,y)}{\partial x}=3x^2$, so I get $12$. However, if I plug $x$ in $y$ explicitly I would get $$f(x,y) = x^3+7(2x+1)^2$$ so,
$$\frac{\partial f(x,y)}{\partial x}=3x^2+28(2x+1)$$
So, I get $152$. What should I do? Thank you!
 A: We split the task into two parts. At first we look at obtaining a partial derivative with respect to $x$. Then we consider the evaluation at the specific point $(2,3)$.
Chain rule revisited: In order to better see what's going on, we consider a somewhat more general situation and then we will see how OPs special case fits into this setting.
We start with OPs real-valued function $f$, namely
\begin{align*}
&f:\mathbb{R}^2\to\mathbb{R}\\
&f(x,y)=x^3+7y^2\tag{1}
\end{align*}

We put the relation $y=2x+1$ in a slighty more general context, which might help to make the application of the chain-rule more plausible. We consider $x$ and $y$ as functions of a variable $t$:
\begin{align*}
x&=x(t)=t\\
y&=y(t)=2t+1\tag{2}
\end{align*}
and define a new real-valued function $\varphi$ as
\begin{align*}
&\varphi:\mathbb{R}\to\mathbb{R}\\
&\varphi(t)=f(x(t),y(t))\tag{3}
\end{align*}

We can now write
\begin{align*}
\varphi(t)=f(x(t),y(t))=f(t,2t+1)\tag{4}
\end{align*} and have the same situation as OP when he is using the relation $y=2x+1$ and taking $f(x,y(x))=f(x,2x+1)$. The benefit is that we can now apply the chain rule using a familiar derivation:

On the one hand we obtain from (1) - (3):
\begin{align*}
\color{blue}{\frac{d\varphi}{dt}}
&=\frac{\partial \varphi}{\partial x}\,\frac{dx}{dt}+\frac{\partial \varphi}{\partial y}\,\frac{dy}{dt}\\
&=3\left(x(t)\right)^2\cdot 1+14y(t)\cdot 2\\
&=3t^2+14(2t+1)\cdot 2\\
&\,\,\color{blue}{=3t^2+56t+28}\tag{5}
\end{align*}
on the other hand we obtain from (4):
\begin{align*}
\color{blue}{\frac{d\varphi}{dt}}
&=\frac{d}{dt}f(t,2t+1)\\
&=\frac{d}{dt}\left(t^3+7(2t+1)^2\right)\\
&=3t^2+28(2t+1)\\
&\,\,\color{blue}{=3t^2+56t+28}\tag{6}
\end{align*}
in accordance with (5).

Conclusion: We conclude from (5) and (6) the following derivation of OP is valid:
\begin{align*}
\color{blue}{\frac{d}{d x}f(x,y(x))=3x^2+28(2x+1)}
\end{align*}
Evaluation at $(2,3)$:
We consider $f(x,y)=x^3+7y^2$ as above and evaluate the partial derivative wrt $x$ at $(x,y)=(2,3)$. We obtain this way
\begin{align*}
\frac{\partial}{\partial x}f(x,y)\Bigg|_{(x,y)=(2,3)}&=\frac{\partial}{\partial x}\left(x^3+7y^2\right)\Bigg|_{(x,y)=(2,3)}\\
&=\left(3x^2\right)\Bigg|_{(x,y)=(2,3)}\\
&=12
\end{align*}
but this is completely independent from the rule $y=2x+1$. In fact it cannot be conveniently connected with evaluation at a point $(x,y)=(2,3)$, since this point is not an element of the line $y=2x+1$.
A: The answer is that it depends (slightly) on the intent of the problem.  When I read the problem as you've written it, I see this:

Given that $y = 2x+1$ and  $f(x,y) = x^{3} + 7y^{2},$ calculate $\frac{\partial f(2,3)}{\partial x}$.

In that statement, I interpret this as $f$ is a function of two variables, $x$ and $y$, and we are asked to compute $\frac{\partial f}{\partial x}(x,y)$ and evaluate the result at $(x,y) = (2,3)$.  In this case, the fact that $y$ depends on $x$ isn't relevant, because since $f$ depends explicitly on $x$ and $y$, $\frac{\partial f}{\partial x}(x,y)$ mean hold $y$ constant and differentiate with respect to $x$.  That gives us $$\frac{\partial f}{\partial x}(x,y) = 3x^{2}\implies \frac{\partial f(2,3)}{\partial x} = 12.$$
Now, if instead the problem was phrased as

Given that $y = 2x+1$ and  $f(x,y) = x^{3} + 7y^{2},$ calculate the total rate of change of $f$ with respect to $x$ at $(2,3)$.

In this case, I would interpret the problem as asking for the total derivative, which accounts for dependencies among the variables.  In this case, your answer would be $$\frac{df}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\frac{dy}{dx} = 3x^2+28(2x+1) \implies \frac{df}{dx}(2,3) = 152.$$
If the original problem does indeed ask for $\frac{\partial f(2,3)}{\partial x}$ then I would say the first interpretation is correct.  If you are adding that notation yourself, it may be the case that the second interpretation is correct.
A: It's definitely important to make some distinctions with notation. Given a function ${f(x,y)}$, then ${\frac{\partial f}{\partial x}}$ means "treating $y$ as a constant, what is the derivative of $f$ with respect to ${x}$?" <- this does not, on it's own, necessary tell you about how $f$ changes overall with respect to $x$. In order to know this, we must use the multi-variable chain rule, which is:
$$
\frac{df}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\frac{dy}{dx}
$$
notice if ${\frac{dy}{dx}=0}$, i.e. ${x}$ and ${y}$ are independent, then ${\frac{df}{dx}=\frac{\partial f}{\partial x}}$ (i.e. the partial derivative tells us all we need to know about how $f$ changes with respect to $x$).
