I will give a example that I tried to integrate by parts in $x$:
\begin{align} \int_0^1 \int_0^1 ye^x \frac{d^n}{dx^n} x^n\:\: dxdy \end{align} Using the rule of integration by parts:
$f= ye^x \implies f^{(n)} = ye^x$
$g'= \frac{d^n}{dx^n}x^n \implies g = x^n$
I found the $n$ th derivative and integrated $n$ times.
\begin{align} &\int_0^1 \int_0^1 ye^x \frac{d^n}{dx^n} x^n\:\: dxdy = \\ &fg\vert_0^1 - \int_0^1 \int_0^1 f'g \: \:dxdy=\\ & ye^x x \vert_0^1 - \int_0^1 \int_0^1 ye^x x^n \:\:dxdy=\\ & y e - \int_0^1 \int_0^1 ye^x x^n \:\:dxdy\\ \end{align}
The left side is a function of $y$ and the right side is a function of $n$. Since $n$ a natural number we can evaluate the right side but why is the left side a function of $y$? Shouldn't be the integral a function of $n$?
Is this how we integrate by parts in two variables ?