Suppose that we have two functions, namely $f$ and $g$ that are both functions of one variable, call it $x$. We can combine the two and get a new function $h$ of one variable again in the following way:
$$h(x)=(f\cdot g)(x)$$
What if we had name the variable of the second function as "$y$". Could we then combine them in the same way as they were both funtion of "$x$"? I would say yes because in either case the mapping is from $\rm{R}$ to $\rm{R}$. But what troubles me is if "$x$" and "$y$" were both physical quantities then the new quantity would be a function of two physical quantities (variables). Another thing that troubles me is that we can write for a function of two variables:
$$h(x,y)=f(x)\cdot g(y)$$
How can we write it in this case but not in the first case? Does the "$y$" serves only as a convention to understand that our function is of two variables and not one, i.e. the mapping is from $\rm{R}^2$ to $\rm{R}$? Lets suppose that $f(x)=2x$ and $g(y)=2y$. In the first case if I combine them I would get the function of one variable:
$$h(x)=4x^2$$
whereas in the second case I would get the function of two variables:
$$h(x,y)=4xy$$
What determines if the combined function would be of one or two variables?
Combination of functions with different variables
Lets suppose now that again $f(x)=2x$ but $g$ is function of three variables $g(x,y,z)=2xy+z$. Can I get a combined function by adding them, such that:
$$h(x,y,z)=(f+g)(x,y,z)=2xy+ z + 2x$$
What is the proper way to combine functions? Should they have the same number of variables? What if the variables are physical quantities? I started to think about this when I say a common calculus rule that states:
$$d(f+g)= df + dg$$
I thought that in order to be able to perform such an operation both functions must have the same variables. But in Thermodynamics one can perform such an operation even when $f$ and $g$ have different variables. For example we define, Gibbs free energy $G=H-TS$ where $H=H(S,P,n)$ and $S=S(U,V,n)$. We can take the differential of this function:
$$dG=dH-TdS-SdT$$
without actually care about the number of variables that $H$, $T$ and $S$ have.