# Thread: trouble with e

1. ## trouble with e

Hi

f(x) = e^-x/ (1-e^-2) if 0<= x <= 2

so the question is to find the mathematical expectation of X - ie calculate

integral sign ("S") b=2; a=0 x f(x) dx

Now I am not completely sure where the x came from so a clue there would be helpful.

But really I am not sure what to do with this - even if the x shouldn't be there I am not sure if I should use partial integration since I can't tell what should be
u and what should be dv when both have e's to the power so I don't know how that would make them dv able.

All help would be appreciated.

Beginner Calculus

2. Do you know what the expected value is? Expected value is the weighed average of the possible values a random variable can assume. Here $f(x)$ is the probability density function (i.e. the weight). The analogue for a discrete probability distribution would work like this : suppose you had a random variable which took the values 1, 2, 3 with respective probabilities 0.3, 0.3, 0.4. Then the expected value would be

$\sum x P(x) = 1 \times 0.3 + 2 \times 0.3 + 3 \times 0.4 = 2.1$

For a continuous probability distribution the sum is replaced by an integral

$\int_D x f(x) \ dx$

where D is the domain of the random variable. You can think of the expected value of a real random variable as the center of mass of a rod whose mass distribution is the probability density function.

To answer your other question : yes, that integral would be done by parts. Set $u=x$ and $dw=e^{-x} dx$.

3. ## still lost

Okay so if u = x then du = dx

if dv = e^-1 then v = e^-1

so I have S u (v^u/ 1-v^2) and I am lost

Please explain where I go from here.

Thanks

Calculus Beginner

4. Why do you set $dv=e^{-1}$? That is not even a function of $x$.

You want to set $dv=e^{-x}$ (so $v=-e^{-x}$) or $dv=-e^{-x}$ (so $v=e^{-x}$). In my calculations below I use the first approach.

I'll do the indefinite integral and I'll let you figure out the details.

$\int xe^{-x}\ dx = \int x\ d(-e^{-x}) = x(-e^{-x}) - \int d(x)(-e^{-x})$

$= -xe^{-x} - \int (-e^{-x})\ dx = -xe^{-x}-e^{-x}$

Now we can verify the answer : $\frac{d}{dx}(-xe^{-x}-e^{-x}) = -e^{-x}+xe^{-x}+e^{-x} = xe^{-x}$

so it's good.