3
$\begingroup$

The integral in question is this:

$\int_{-2\pi}^{2\pi}xe^{-|x|}$

My attempt:

Since there is a modulus, we split it up into cases. I'm not really sure which cases to split it into, do I just separately integrate these two functions?

$\int_{-2\pi}^{2\pi}xe^{-x}$

$\int_{-2\pi}^{2\pi}xe^{x}$

Or do I split it into these two? $\int_{0}^{2\pi}xe^{-x}$ $\int_{-2\pi}^{0}xe^{x}$

I am leaning towards the second split (splitting the bounds of the integral), which seems better.

The question is: What does it mean by 'splitting it into cases', and why does it work? Another side question I have is how to differentiate a function that has a modulus somewhere inside it.

$\endgroup$
  • 2
    $\begingroup$ Let $f\colon [-2\pi, 2\pi]\to \mathbb R, x\mapsto xe^{-|x|}$. You should know by now that $\displaystyle \int \limits_{-2\pi}^{2\pi}f=\int \limits_{-2\pi}^{0}f+\int \limits_{0}^{2\pi}f$ and also $\forall x\in [-2\pi, 0]\left(f(x)=xe^{-(-x)}\right)$. $\endgroup$ – Git Gud Sep 15 '14 at 10:29
  • $\begingroup$ @GitGud What if there is a modulus and the bounds of the integral are both positive? $\endgroup$ – surelyourejoking Sep 15 '14 at 10:30
  • $\begingroup$ @ surelyyourjoking. Then $x$ would only ever be a positive value (or zero) and so the modulus can be replaced simply by $x$ alone since $\mid x\mid\geq 0$ for all $x$. $\endgroup$ – Pixel Sep 15 '14 at 10:50
  • $\begingroup$ ah I see, so the modulus is meaningless in an indefinite integral? $\endgroup$ – surelyourejoking Sep 15 '14 at 11:24
  • $\begingroup$ No, the modulus is not meaningless for indefinite integrals. When considering definite integrals as your question does we have bounds on the integral, which tells us the domain of the integrand to consider. Because we know the domain, we also know the sign (positive/negative) of a given $x$ value. Hence we can then split the integral into positive/negative parts to evaluate it. Notice also that an indefinite integral can be written as a definite integral since $$\int f(x)dx = \int_\lambda^x f(t)dt,$$ where the "lower bound" $\lambda$ gives a constant of integration. $\endgroup$ – Pixel Sep 15 '14 at 12:00
3
$\begingroup$

$$I=\int_{-2\pi}^{2\pi} xe^{-\mid x\mid}dx.$$

Loosely speaking, you can think about the definite integral as the area bounded by the function $xe^{-\mid x\mid}$ and the $x$-axis, as the variable $x$ moves from $x=-2\pi$ to $x=0$ then from $x=0$ through to $x=2\pi$. So, intuitively it's not too much of a step to see that $$I=\int_{-2\pi}^{0} xe^{-\mid x\mid}dx+\int_{0}^{2\pi} xe^{-\mid x\mid}dx.$$ Notice in the left integral the $x$ values are only ever negative or zero, and in the right integral the $x$ values are only ever positive or zero, so we can rewrite the whole expression $$I=\int_{-2\pi}^{0} xe^{x}dx+\int_{0}^{2\pi} xe^{-x}dx,$$ since $-|x|=x$ for $x\leq 0$ and $-|x|=-x$ for $x\geq 0$. You can now evaluate the integrals separately to obtain the correct result. Hope this helps.

$\endgroup$
2
$\begingroup$

$$\int_{-2\pi}^{2\pi}xe^{-\left|x\right|}dx=\int_{-2\pi}^{0}xe^{-\left|x\right|}dx+\int_{0}^{2\pi}xe^{-\left|x\right|}dx=\int_{-2\pi}^{0}xe^{x}dx+\int_{0}^{2\pi}xe^{-x}dx$$

This is a split of cases killing the annoying modulus.

$\endgroup$
  • $\begingroup$ Alright, I understand it for this example now. But in general? when the bounds of the integral are both positive? $\endgroup$ – surelyourejoking Sep 15 '14 at 10:35
  • 2
    $\begingroup$ @ surelyyourjoking. Then $x$ would only ever be a positive value (or zero) and so the modulus can be replaced simply by $x$ alone since $∣x∣≥0$ for all $x$. $\endgroup$ – Pixel Sep 15 '14 at 10:58
1
$\begingroup$

If you have a function $f: [a,b] \to \Bbb R$ defined by parts, as in: $$f(x) = \begin{cases} f_1(x), \mbox{if } a \leq x \leq c \\ f_2(x), \mbox{if } c < x \leq b\end{cases}$$ then: $$\int_a^b f(x) \ \mathrm{d}x = \int_a^c f_1(x) \ \mathrm{d}x + \int_c^bf_2(x) \ \mathrm{d}x.$$

In your case, $f(x) = xe^{-|x|}$, so $c = 0$ and $f_1(x) = xe^{x}$ and $f_2(x) = xe^{-x}$, using the definition of absolute value. Remember the interpretation of the integral for a positive function: the integral is the area, so the sum of the areas is the sum of integrals.

$\endgroup$
  • $\begingroup$ so this works even when the bounds of the integral are both positive? $\endgroup$ – surelyourejoking Sep 15 '14 at 10:34
  • $\begingroup$ Sure, why not? You have to pay attention where to split the integral. Try splitting $$\int_{-2}^3 |x - 1|e^x \ \mathrm{d}x$$ to see if you can do it (you don't need to solve it, that's not the point here) $\endgroup$ – Ivo Terek Sep 15 '14 at 10:36
0
$\begingroup$

$|x|=x$ for x>0

and = -x for x<0

and 0 for x=0

since x is positive and negative in the limits $-2\pi$ to $2\pi$ you have to split it into two parts and then evaluate your integral.

So in this function you are splitting into cases for |x| where x>0 and x<0.

this is done because |x| is defined that way in its domain.since you get two different functions for different intervals in the domain, you have to consider two different limits. imagine a function

f(x)=0 for x<0

and 1 for x>0

and we are evaluating an integral $\int{xf(x)}dx$ with limits -1 to 1.

so because of the definition of f(x) you have to split the integral into two.

here its just two integrals sometimes you have to split into many more.

$\endgroup$
  • $\begingroup$ I understand that you have to split it up into cases, I just dont get technically how or why this is done $\endgroup$ – surelyourejoking Sep 15 '14 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.