1

In one of the questions that I'm solving, I have got an integral like this $$k(w) = \int_{w-1}^{w}f(x)dx$$ where the function $f(x)$ is defined in this way $$f(x)= \begin{cases} x,& \text{if } 0\leq x \leq 1\\ 2-x,& \text{if } 1\leq x \leq 2\\ 0, & \text{otherwise} \end{cases}$$

The support of $w$ is $[0,3]$. I know that the final solution will be a piecewise function like this $$k(w)= \begin{cases} g_1(w),& \text{if } 0\leq w \leq 1\\ g_2(w),& \text{if } 1\leq w \leq 2\\ g_3(w),& \text{if } 2\leq w \leq 3\\ 0, & \text{otherwise} \end{cases}$$.

Give me some idea about solving this type of integrals.

Note: This integral is an intermediate step in the proof of three variables Irwine Hall distribution. Check the first answer for this post here

AxyuS
  • 399

2 Answers2

1

It may be useful to write $f(x)$ as a sum of $f_i(x) \theta(x-x_i)$, where $\theta(x)$ is the Heaviside step-function, and integrate each term. Once you have the anti-derivative $F(x)$ as a sum of step-functions, you can express $F(w)-F(w-1)$ generally

Rd Basha
  • 604
  • 3
  • 9
1

Case 1: $0<w\le 1$

$k(w) = \int_{w-1}^w f(x) \ dx = \int_{w-1}^0 f(x) \ dx + \int_{0}^w f(x) \ dx\\ k(w) = \int_{w-1}^0 0 \ dx + \int_{0}^w x \ dx = \frac 12 w^2$

Case 1: $1<w\le 2$

$k(w) = \int_{w-1}^1 x \ dx + \int_{1}^w 2-x \ dx\\ \frac 12 - \frac 12 (w-1)^2 - \frac 12 (2-w)^2 + \frac 12 = - w^2 + 3w - \frac 32$

etc.

Doug M
  • 57,877