Beginner's problem: Multivariable indefinite integral with two contradicting solutions

48 Views Asked by At

I want to evaluate the indefinite integral $\int dx dy x\ln(xy)$, and as far as my understanding goes, there could be two possible ways to do this, which lead to two slightly different solutions:

Option 1: \begin{align*} \int dx dy x\ln(xy) &= \int x \left( \int dy \ln(xy)\right) dx \\ &= \int x \left( \int dy \ln(x) + \ln(y)\right) dx \\ &= \int x \left( y\ln(x) + y\left(\ln(y)-1\right) + c_1\right) dx \\ &= \int xy\ln(x) + xy\left(\ln(y)-1\right) + xc_1 dx \\ &= \frac{yx^2}{4}\left(2\ln(x)-1\right)+\frac{x^2y}{2}\left(\ln(y)-1\right) + \frac{x^2}{2}c_1+c_2 \\ &= \frac{yx^2}{2}\left(ln(xy)-\frac{3}{2}\right)+\frac{x^2}{2} c_1+c_2 \end{align*}

Option 2: \begin{align*} \int dx dy x\ln(xy) &= \int dx \int x \left(\ln(x)+\ln(y)\right) dy \\ &= \int dx \left(x\ln(x) + x\ln(y)\right) dx \\ &= \int yx\ln(x) + yx(\ln(y)-1) +c_1 dx \\ &= \frac{yx^2}{4}\left( 2\ln(x)-1\right)+\frac{yx^2}{2}\left(\ln(y)-1\right)+xc_1+c_2 \\ &= \frac{yx^2}{2}\left(\ln(xy)-\frac{3}{2}\right) +xc_1+c_2 \end{align*}

In option 1, I treat $x$ as a constant in the integral w.r.t. $y$, and pull it out of the integral, so it gets multiplied by the intebration constant $c_1$. In option 2, I don't do that, so the two solutions differ by a non-constant term which leads me to believe that they cannot be equivalent.

Which one is correct?

1

There are 1 best solutions below

0
On BEST ANSWER

Recall that the constants added are $c=-F(x_0)$ in the formula $\displaystyle \int_{x_0}^xf(t)\mathop{dt}=F(x)-F(x_0)$

Now if you integrate $\displaystyle\int_{Y_0}^Y x\ln(y)\mathop{dy}=\bigg[xy(\ln(y)-1)\bigg]_{Y_0}^Y=xY(\ln(Y)-1)-x\underbrace{Y_0(\ln(Y_0)-1)}_\text{constant}=xY(\ln(Y)-1)+cx$

This is not what you wrote at line $3$ of option $2$ where you get $+c_1$ alone without $x$.

You can also see it as $\displaystyle\int x\ln(y)\mathop{dy}=x\int \ln(y)\mathop{dy}=x\bigg(y(\ln(y)-1)+c\bigg)$

Where the $c$ belong to the indefinite integral relative to $y$.