Question:How to extract the coefficients of the random variables in a linear combination of random variables?

Question:How to extract the coefficients of the random variables in a linear combination of random variables?

Maple 2022

How to use collect() or coeffs() on random variables instead of standard variables?

I need to re-organize a linear combination of RVs nu[1], nu[2], u[1], u[2], u[3] by collecting the coefficients on each of these 5 RVs. Note that the Xs are correlated with each other and the Ys are correlated with each other (but Xs and Ys are uncorrelated).

For example, nu is a 2D gaussian vector where nu[1] and nu[2] are defined in terms of _R1, _R2, means, standard deviations and correlation coefficient. They are quite "nested" and the 3D gaussian vector u is even worse, so when these enter a linear combination it becomes hard to identify them back as simply nu[1], nu[2], u[1], u[2], u[3].

Is there a way to "isolate" them in a linear combination by using collect()-like or coeffs()-like functions (i) directly on the RVs or (ii) indireclty on the explicit expressions of _Rs, means, standard devs, correlation coeffs?

(I already checked the answers to these two somewhat similar questions but did not help for my case:

https://mapleprimes.com/questions/235215-Reduce-Length-Of-Sum-Of-Products

https://mapleprimes.com/questions/234292-Re-How-To-Collect-Using-A-Term-By-Multiplication

)

See my script below:

For example, I would want collect() on nu[1] (or equivalently on _R1*sigma__v[1]+nu__0[1]) to give me X__1+X__3 (as you easily see from my definition of Omega).

 > # 2.2.1 Define the Omega random variable as Omega__1+Omega__2+Omega__3:
 >
 (1)
 > # 2.2.2 Simplify and re-arrange the Omega RV to obtain the easy-to-read version (a,b,c,d,e,f are the coefficients): #Omega__* = a + b*nu[1] + c*nu[2] + d*u[1] + e*u[2] + f*u[3]; # How to do it? Collect() does not work...simplify() doesn't make it any easier...
 >
 >
 >