Should the constant of integration be a number or a function? $g$ is multi-variable, while $\partial g/\partial x$ is single variable

calculusderivativesintegration

I have a multivariable function $g: (x,y) \mapsto \mathbb{R}$, however $\partial g/\partial x := b$ where $b$ is a single variable function of $y$.

Taking the antiderivative with respect to $x$,

$$ g(x,y) = \int \frac{\partial g}{\partial x} \; dx = \int b(y) dx = xb(y)$$

Should the constant of integration be $+C$ or some function of $y$? My initial reaction was that the constant of integration should be a number since we are integrating a single variable function. However $g$ is a multivariable function to begin with, and we are taking the integral with respect to the other variable, so maybe the constant of integration should be a function? Actually in this case are both answers correct?

If you think of $\partial g/\partial x: y \mapsto$ whatever, then the constant of integration should be a constant. However if you think of $\partial g/\partial x: (x,y) \mapsto$ whatever, even though you only see $y$'s explicitly (you don't see $x$'s because the function doesn't depend on $x$ – but it still considered a 2-input function), then the constant of integration should be a function of $y$?

Best Answer

Yes the "constant" of integration should be a function of $y$, but of course that itself could turn out to equal a constant (though without more information, you cannot assert that).

Suppose I have the multivariable function

$$g(x,y) = xb(y) + a(y)$$

Then if I partial differentiate with respect to $x$, I'll get

$$\frac{\partial g}{\partial x} = b(y)$$

The function $a(y)$ disappears, because it has no $x$ dependence.

Integrating again (taking the "anti-derivative") I'll get

$$g(x,y) = \int{b(y)\text{d}x} = b(y)\int{\text{d}x} = xb(y) + a'(y)$$

(I've denoted the constant of integration $a'(y)$ because depending on boundary conditions etc it could be that $a'(y)\neq a(y)$).

Related Question