How do we integrate a function wrt a different variable For example, we have this func:
$$\int{x~ \sin (y) ~dx + y~\sin (x) ~dy}$$
how do we integrate wrt a different variable?
EDIT
Please read the following:
We got a question in school as follows:
Find integral of following:
$$\int{y~dx + x~dy}$$
It was taught to us that $$d(xy) = y~dx + x~dy$$
So , $$\int{y~dx + x~dy} = \int{d(xy)} = \boxed{xy + C}$$
BUT
if we do it by method that people told me here, it should be :
$$\int{y~dx + x~dy} = y\int{dx} + x\int{dy} = xy + xy + C = \boxed{2xy + C}$$
!!
Which is correct? Please enlighten me. I dont know calculus much. Also please recommend me a good reading on calculus and solving calculus problems.
 A: It depends on what framework your teacher is using. If $x,y$ are variables that depend on some parameter $t$, then $\frac{d(xy)}{dt} = \frac{dx}{dt} y + x \frac{dy}{dt}$ by the product rule. We could define $\int x\ dy$ to mean an anti-derivative of $x$ with respect to $y$, specifically that $\frac{d(\int x\ dy)}{dy} = x$ for all values of $t$. Then we certainly get:

$\frac{d(\int x\ dy + \int y\ dx)}{dt} = \frac{d(\int x\ dy)}{dt} + \frac{d(\int y\ dx)}{dt} = \frac{d(\int x\ dy)}{dy} \frac{dy}{dt} + \frac{d(\int y\ dx)}{dx} \frac{dx}{dt} = x \frac{dy}{dt} + y \frac{dx}{dt} = \frac{d(xy)}{dt}$

And hence if the derivatives are defined everywhere we get:

$\int x\ dy + \int y\ dx = xy + c$ (for all values of $t$) for some constant $c$ (with respect to $t$).

This also means that you cannot find what you asked for at the start of your question because $x,y$ are not defined. You must specify the dependence of $x,y$ on the parameter space before you can find the integral as defined in this framework.
A: The confusion here comes from the notation $\int$ that may mean different things. If $\int y\,dx$ means antiderivative wrt $x$ and $y$ is just a constant that does not depend on $x$ then it is $xy+C$. However, your integral looks like
$$
\int y\,dx+x\,dy
$$
so it is more likely to be a line integral where (as @user21820 have mentioned) $x$ and $y$ are not independent variables. It is more common to use the integration path explicitly, i.e. to write 
$$
\int_\gamma y\,dx+x\,dy
$$
where the curve $\gamma$ is given, but in your case the differential form is exact, i.e. it has a potential function $U(x,y)=xy$, so the integral becomes path-independent and $\gamma$ is omitted in the integral (a bit sloppy I would say).
P.S. the line integral
$$
\int x\sin(y)\,dx+y\sin(x)\,dy
$$
is path-dependent, because the differential form is not exact, so you can calculate it only along a particular curve $\gamma$ (which must be given).
