In the course of work, I deduced such an expression.
$$ p(t)=\int\limits _{-\infty}^{\infty}\begin{cases} 1/x_{max}, & 0\leq t<x\\ 0, & other \end{cases}\cdot dx, $$ where $x \in [0,x_{max}]$ ($x_{max} = 10$ for example),
$t$ - is variable.
I have built a graph that is calculated numerically using python.
import numpy as np
import matplotlib.pyplot as plt
x_max = 10
t = np.linspace(-x_max * 0.1, x_max * 1.1, 1000)
num_point = 1000
pre_p = np.zeros((num_point, t.size))
x = np.linspace(0, x_max, num_point)
for i, this_x in enumerate(x):
pre_p[i] = np.where((0 <= t) & (t < this_x), 1/x_max, 0)
p = np.trapz(pre_p, x=x, axis=0)
plt.plot(t, p)
I intuitively figured out how this function should look in symbolic form.
$$ p(t)=\begin{cases} 1-\frac{t}{x_{max}}, & 0\leq t<x_{max}\\ 0, & other \end{cases} $$
But how can the integral be taken symbolically according to the rules of mathematics? The thing is, my function is piecewise. And the variable by which I integrate is right in the condition. It would be great to have links to literature or an article, thanks.