It would help if you provided expected output. I suspect that you're trying to do some sort of change of variables, maybe something like this;
{Sin[(a b)/c], Sin[a - b - c]} /. {a -> x + y, b -> x - y, c -> x*y}
{Sin[((x - y)*(x + y))/(x*y)], Sin[2*y - x*y]}
If that's the case, then to understand why it didn't work you need to understand how Mathematica does scoping in constructs like Module
. So, modify your WU
function like this:
WU[ex_] :=
Module[
{a, b, c, ex1, sk},
Print[SymbolName[a]];
a = x + y;
b = x - y;
c = x*y;
ex1 = ex;
sk[t_] := Sin[t];
Return[sk[ex1]]]
Now evaluate WU[a*b/c]
. Notice that what appears as a
inside the Module actually has a more complicated name. Before going into a lengthy explanation, I think it would be easier if you explained exactly what you're trying to do, what you intend for WU
to do, what your objective is, what your expected outputs are, etc. We can probably help you get to where you want to be without diving too deeply into scoping rules.