Suppose I have a function $f(x,t)$, a function of two variables. I want to find the integral of $f(x,t)$ in the given interval $[c,d]$. So I will do: $$\int_{c}^{d} f(x,t) dx$$ but now in $f(x,t)$, $x$ is random variable distributed uniformly and can take any value between $[0,a]$ where $0<c<d<a$. Now how should I perform the integration, when $x$ dis not fixed but distributed randomly.
Further clarification:
Let $f(x,t)$ is the probability of finding a particle at location $x$ and time $t$, so the probability of finding particle between $[c,d]$ will be $\int_{c}^{d}f(x,t)dx$. Now of course $x$ will be with respect to some reference, like particle is at origin when $t=0$. Let us suppose that $x$ is not fixed now, but distributed uniformly around $[0,a]$ at $t=0$, now how will I find the probability of getting particle in between $[c,d]$.
Your question is still a bit unclear to me. My best guess to what you want to do is to evaluate the expected value of $f(x,t)$ for a random variable $x$, i.e., ${\rm E}_x\{f(x,t)\}$. Is it that?
In that case, the way to go is to compute $$\int p_x(x) f(x,t) {\rm d}x,$$ where $p_x(x)$ is the probability density function of your random variable $x$. For a uniform random variable in $[0,a]$, you have $$p_x(x) = \begin{cases} \frac{1}{a} & x \in [0,a] \\ 0 & \text{otherwise}\end{cases} $$ and thus $${\rm E}_x\{f(x,t)\} = \frac 1a \int_0^a f(x,t) {\rm d} x.$$ Now what I still don't understand is that for some reason you are only looking at the interval $(c,d) \subset [0,a]$. Not sure what that means, looks like you are clipping away part of the realizations of your random $x$? Why, what does that mean?