I've seen the following question:
Determine the values of $a,b,c,d \in \Bbb{R}$ such that $g_x(x,y)=ax+by$ and $g_y(x,y)=cx+dy$ are the correct partial derivatives.
I've answered it as follows:
$g=ax² +byx+k=cyx+dy²+k$
Deriving the first one wrt $y$ and the second wrt $x$, we get:
$g_y=bx \quad \quad \quad \quad g_x=cy$
Comparing with what we have:
$ax+by=cy\quad \quad \quad cx+dy=bx$
Here we see that $b=c$ and $a=d=0.$
But the answer was:
Using Clairaut's Theorem, $g_{xy}=g_{yx}$. From this, we see that $b=c$ and $a,d$ are any numbers.
Although, I don't get what is wrong with my answer and the actual answer seems a little bit suspicious to me. What is actually wrong with what I did?
Since you’re looking at partial derivatives of $g$, the “constants” of integration of their antiderivatives are arbitrary functions of the other variable. That is, $$\int g_x \, dx = ax^2+bxy+h(y)$$ and differentiating this with respect to $y$ gives $bx+h'(y)$, not simply $bx$. Comparing this to the given $g_y$, we have $b=c$ and $h'(y)=dy$. Integrating the latter with respect to $y$ gives $h(y)=dy^2+k$ (now we can use a constant constant). We therefore have $g(x,y)=ax^2+bxy+dy^2+k$ so, just as in the answer you quoted, we can’t say anything about the values of $a$ and $d$.