Question: How to do dchange OLD=NEW where NEW contains parameter?

I am learning how to use dchange in Maple. I can do  something as dchange(x=t^2) OK, but I need to do dchange(x=t^n) where "n" is meant to be a parameter that I can later use subs on to set it to any number I want.  But I do not know how to tell Maple that "t" is the new variable and that "n" is meant to be used as constant or parameter.

As an example, this works

n:=2;
ode:=x^2*diff(z(x),x)=0;
PDEtools:-dchange({x=t^n},ode,{t})

But this does not work

n:='n';
ode:=x^2*diff(z(x),x)=0;
PDEtools:-dchange({x=t^n},ode,{t});
subs(n=2,%)

It used "n" above as new variable. So the dependent variable which was z(x) became z(t,n). 

So I need to tell Maple that "t" is the new variable only and not "n" as well. 

Is it possible to do this in Maple?

Maple 2019 on windows.

 

Please Wait...