Implicit Differentiation & Profit Function Here is the question:

A firm produces one output commodity. The cost of producing and selling $x$ units and spending $y$ dollars on advertising is $C = cx + y + d$. The resulting quantity demanded is given by $x = \gamma ap + b + R(y)$ where $p$ is the price per unit. We assume that $R(0) = 0, R′(y) &gt; 0$ and $R′′(y) &lt; 0$. The constants $a, b, c, d$ are all positive.


Determine the profit function from selling $x$ units and spending $y$ dollars on advertising; call it $\pi(x, y)$.
Write and solve the following system of equations:
$$\frac{\partial \pi(x^*,y^*)}{\partial x} = 0$$
$$\frac{\partial \pi(x^*,y^*)}{\partial y} = 0$$


where $x^* &gt; 0$ and $y^* &gt; 0$ represent the number of units sold and amount spent on advertisement that maximize profits. In this case, solving the system means finding one equation that only depends on $y$, the function $R(\cdot)$ (and its derivative), and the parameters of the problem $(a, b,...)$ - in other words an equation where $x^*$ has disappeared.


The equation found in the previous question defines $y^*$ implicitly as function of $a, b,$ and $c$. Find $\frac{\partial y}{\partial b}$ by implicit differentiation.


Embarrassingly, my problem seems to be with the profit function. If we get a revenue function by $p \cdot x$ we are left only with an $x$ in the cost function, I cannot figure out how to get a profit function which would result in $y^*$ as a function of $b$. Anyone know what I'm doing wrong?
I will only set up the first part of your question. See if you can move on from there.

If you try and set revenue as $p \cdot x$ immediately, you will get

$$p \cdot x = p \cdot (\gamma ap + b + R(y))$$

which as you note means $x$ will not be in this term. Profit could technically still be expressed in terms of $x, y$ in this case, but...

$$\pi(x, y) = p \cdot (\gamma ap + b + R(y)) - (cx + y + d)$$

is awkward since $x$ can be expressed in terms of $p$ and vice versa, so why would we have both in our equation?

So instead, solve for the inverse demand function:

$$x = \gamma ap + b + R(y) \implies \boxed{p = \frac{x - b - R(y)}{\gamma a}}$$

So you can solve for $p \cdot x$, but instead of substituting for $x$, you substitute for $p$. Once you solve for your first order conditions, you should be able to solve for $y$ as a function of variables including $b$.

Hope this helps.