I am trying to modify the following recursive function.
EX[n_] := EX[n] = EX[n - 1]*x^n
EX[1] := x
This code works and provides output such as.
In[194]:= EX[7]
Out[194]= x^28
What I would like is a function that looks like this.
EX[x_,n_] := EX[x,n] = EX[n - 1]*x^n
EX[1] := x
So that;
EX[y,15]
results in,
y^15
Obviously, the code above does not work. Any help is greatly appreciated.