Let's consider the following function I've already mentioned in my previous question:
rot[i](f) := sum(sum(sum(sum(
G[r,i]*G[q,j]*W[i,j,k]*('diff(f[k], y[q]) + sum(K[k,q,m]*f[m], m, 1, N)),
r, 1, N),
j, 1, N),
k, 1, N),
q, 1, N) $
It kind of works in general, but what if original expression f
already contains symbols r
, j
, and so on? In this case it doesn't do the right thing. The only solution I've found so far is to use some unique prefix for these symbols or at least start their names with underscores: r
→ __r
, j
→ __j
. But I hope there should be a more idiomatic solution. Is there anything?