I'm having trouble finding out how to expand
a*(x+y)
when wrapped by cos(). The expression
expand(a*(x+y))
expands as expected, but
expand(cos(a*(x+y)))
, leaves the expression unchanged. I would prefer a solution that scales for more complex expressions