If I do something like
1/Sqrt[x] /. {Sqrt[x] -> a}
it does not lead to an expected result, but can be fixed with
1/Sqrt[x] /. {Sqrt[x] -> a, 1/Sqrt[x] -> 1/a}
I am wondering if, for given g[x] and h[x], there exists a general way of replacing any f[g[x]] with f[h[x]]?




FullFormof your expression to write a working replacement rule. – Daniel Huber Apr 11 '22 at 20:301/Sqrt[x] /. {x -> a^2} // PowerExpand. – Bill Watts Apr 11 '22 at 20:45