This more a warning to focus your attention on a specific point than a true question.
I submit you this test case which works in Maple 2015 and Maple 2016 but not in Maple 2018.
In a few words:
- let X and Y two independant random variables with respective distributions Normal(mu__x, sigma__x) and
- let Z := q -> cos(q)
- You can easily verify that Maple can compute the formal expression of Mean(Z(X)) and Variance(Z(X))
(which means that it could compute Z(X+Y) for X+Y is just another gaussian RV)
- What I found is that:
- Mean(Z(X+Y)) returns same expressions in Maple 2015 and Maple 2016, but a different one in Maple 2018.
Luckily the later is more readable than the former ones, and closer to the one of Mean(Z(U)) where U=X+Y is the RV of distribution Normal(mu__x+mu__y, sqrt(sigma__x^2+sigma__y^2))
This suggest that the integration algorithm has evolved somewhere in between Maple 2016 and Maple 2018
- While Maple 2015 and Maple 2016 return an evaluated result for Variance(Z(X+Y)) Maple 2018 fails.
Can this "failure" be fixed by some adhoc option of Variance?
Or could it come from a "regression" in the implementation of this procedure (or of the underlying int procedure) in Maple 2018?
PS: I did not try to compute Variance(Z(X+Y)) from an explicit double integration