Pathwise Limit of Karhunen-Loeve Expansion By Karhunen-Loeve expansion we get an alternative representation of a Wiener process
$$W_t=\sqrt2 \sum_{k=1}^{\infty} Z_k \frac{ \sin(k\pi t)}{k\pi} $$
for $t \in [0,1]$ and with i.i.d. $Z_{k} \sim \mathcal{N}(0,1)$.
The series converges almost sure pathwise for fixed $t$ (among other types of convergence), that is a.s.
$$\underset{n \to \infty}{\lim} \, \|W_t-\sqrt2 \sum_{k=1}^{n} Z_k \frac{ \sin(k\pi t)}{k\pi}\|=0.$$
If we fix a path of $W_t$ is it possible to find the corresponding realizations of the series $(Z_k)_k$ so the Karhunen-Loeve expansion converges to this path?
 A: As in the comments pointed out the dependence of the $Z_k$ from $W$ is directly stated in the Karhunen Loeve theorem. In general
$$ Z_k(\omega)=\frac{1}{\sqrt{\lambda_k}}\langle X(t,\omega)|\phi_k(t) \rangle_{L^2([0,T])} $$ with eigenfunctions respectively eigenvalues $\phi_k$ and $\lambda_k$.
In case of Wiener process this yields
$$  Z_k=\sqrt{2}\pi(k-0.5)\int_{0}^{T} W(t) \sin((k-0.5)\pi t) \, \mathrm{d} t.$$ Altogether we get the Karhunen Loeve expansion in terms of a concrete path $W(t)$ as
$$  W(t)=2\sum_{k=1}^{\infty}\sin((k-0.5)\pi t)\int_{0}^{T} W(s) \sin((k-0.5)\pi s) \, \mathrm{d} s .$$
I don't know a closed form of the integral (Closed form of $\int_0^T W(t) \sin(t) \mathrm{d}t$?) so I simulated the integral numerical with trapezoidal rule. I predetermined $W(t)$ on a grid $0=t_0 \leq \cdots \leq t_n=T$ and used the same grid for numerical integration. I simulated $Z_k$ for $k=1,...,n$ this way equally much random variables go into the numerical represantation $W$ and the Karhunen-Loeve expansion $W_k$. The result is very exact with $n=100$
$$\underset{i=1,...,n}{\max} |W(t_i)-W_k(t_i)|=4 \cdot 10^{-15} $$
You can barely see a difference.

