Change the order of this double integration

definite integralsintegrationmultiple integralmultivariable-calculus

Suppose I want to determine:
$$
\int_{0}^{1}\int_{x}^{e^{x}}2y-x\;dydx
$$

In this order, i.e. integrating with respect to y then x, it is straight forward enough to evaluate to:
$$
\int_{0}^{1}\int_{x}^{e^{x}}2y-x\;dydx = \frac{e^{2}-3}{2}\quad\text{(*)}
$$

However, looking at the domain of integration, I think it should be able to be evaluated by integrating with respect to x first then y last.

I'm aware that this would mean changing the limits and I think it should become:
$$
\int_{0}^{e}\int_{ln|y|}^{y}2y-x\:dxdy\quad\text{(**)}
$$

However, after evaluating $\text{(**)}$, it does not equal to $\text{(*)}$.

Can someone please explain to me, if I was to change the order of integration to become $dxdy$, what should be the limits of the integration be?

Thank you.

Edit:

I would like to add a diagram of the domain region, which is the region bounded by the blue, green, red, and orange curves.

Perhaps @Davis Yoshida is implying that because ln(y) isn't define to be all positive, we have to split the region and add them together?

However, this isn't what I want. If it is possible, can the order of the integration be swap to become dxdy without splitting?

Best Answer

We have that $y$ varies from $x$ to $e^x$. Since $x$ varies between $0$ and $1$, the minimum value for $y$ will be $y = 0$ and the maximum value of $y$ will be $e^1$. So, those are supposed to be the bounds for $y$, unless we have to break the domain, as will be the case here.

Now, we have to invert the relations for $x$ and $y$. Imagine the graph of the functions $x$ and $e^x$. The graph of $e^x$ is of course above the graph of $x$ for $x \in [0,1]$.

graph_pic

We see that whenever $y$ varies from $0$ to $1$, $x$ varies from $0$ to $1$ too. But whenever $y$ varies from $1$ to $e = 2.718...$, $x$ varies from $\ln y$ to $1$. So, we have the bounds for the integrations.

$$\int_0^1 \int_x^{e^x} (2y - x) dy dx = \int_0^1\int_0^1 (2y - x) dx dy + \int_1^e \int_{\ln y}^1 (2y - x) dx dy.$$

Related Question