Changing variables



Moby wrote:
> I have what is probably a very simple question.  I have a function 
> defined in Maxima, say the following:
> 
> G(s) := 1/(3*s^2+2*s+1)
> 
> Now I would like to define a variable r such that
> 
> r^2 = 3*s^2
> 
> and then define G(s) in terms of this new variable r.  How does one go 
> about achieving this in Maxima?

Perhaps this will help:

subst([s = r/sqrt(3)], 1/(3*s^2+2*s+1))
-> 1/(r^2+2*r/sqrt(3)+1)

Ray