I would like to replace the expresion $(n1-1)$ to $z1$ in following:
2*n1*p[n1-1,n2]
2*(z1+1)*p[z1,n2]
I have tried Replace
, ReplaceAll
, /.
, //.
but nothing seems to be working. Only part inside $p[n1-1, n2]$ is replaced. Can anyone help me with this?
(* stuff *) /. n1 -> z1 +1
doesn't do what you want? $\endgroup$