integrating absolute values: For f(x) = 1 – |x|, -1 <= X <= 1, find E(X).

__SB

New member
Joined
May 21, 2015
Messages
33
integrating absolute values: For f(x) = 1 – |x|, -1 <= X <= 1, find E(X).

f(x) = 1 – I x I -1 < X < 1 (less than or equal to)
Find E(x)
My question is why do you get
x(1 + x ) between the limits of -1 and 0 (integrating)
and x(1 – x) between 0 and +1
The rest of the question is not an issue; just unsure as towhy its 1 + x between those limits

Thanks in advance
 
f(x) = 1 – I x I -1 < X < 1 (less than or equal to)
Find E(x)
My question is why do you get
x(1 + x ) between the limits of -1 and 0 (integrating)
and x(1 – x) between 0 and +1

\(\displaystyle |x|=\begin{cases}-x &: x< 0 \\ x &: x\ge 0\end{cases}\)
\(\displaystyle \displaystyle\int_{ - 1}^1 {\left( {1 - |x|} \right)dx} = \int_{ - 1}^0 {\left( {1 - [ - x]} \right)dx} + \int_0^1 {\left( {1 - [x]} \right)dx} \)
 
\(\displaystyle |x|=\begin{cases}-x &: x< 0 \\ x &: x\ge 0\end{cases}\)
\(\displaystyle \displaystyle\int_{ - 1}^1 {\left( {1 - |x|} \right)dx} = \int_{ - 1}^0 {\left( {1 - [ - x]} \right)dx} + \int_0^1 {\left( {1 - [x]} \right)dx} \)

Thanks for the response.
Why is mod x equal to –x when x < 0 ?
I always thought modulus just makes things positive?
 
Thanks for the response.
Why is mod x equal to –x when x < 0 ?
I always thought modulus just makes things positive?
\(\displaystyle \Large |-3|=-(-3)=3\)
 
Thanks for the response.
Why is mod x equal to –x when x < 0 ?
I always thought modulus just makes things positive?

Pka's response answers your question perfectly, but I just wanted to add that the absolute value function (i.e. |x|) and the modulus function (i.e. x % y) are not the same thing. Modulus is also sometimes called the remainder function, as it returns the remainder after division. That is to say,

6 % 3 = Remainder of 6 / 3 = 0
7 % 3 = Remainder of 7 / 3 = 1
8 % 3 = Remainder of 8 / 3 = 2
etc.
 
I just wanted to add that the absolute value function (i.e. |x|) and the modulus function (i.e. x % y) are not the same thing. Modulus is also sometimes called the remainder function, as it returns the remainder after division. That is to say,
In most of the non-English speaking it is called the Modulus function.
I think that you are correct if it is spelled modulo function.
 
Top