I have a problem about writing an equation in mathematica.
I am writing the following equation:
u[x_, y_] = x + 2*y
and when I write for example u[2,4] , it gives the result. But the problem that I have is expressing this equation with parameters. That is
u[x, x] = x + 2*x
but when I ask u[2,4];
it gives u[2,4] result.It doesn't calculate.It doesn't work
So, how can I write this equation?