3

If I run the following code:

a^2/b^2 /. {a/b -> c}

I'm getting output:

a^2/b^2

How can I obtain c^2? How to generalize this problem for any powers?

xzczd
  • 65,995
  • 9
  • 163
  • 468
Mieczmik
  • 33
  • 2

1 Answers1

9

What about

a^2/b^2 /.a->b c
(*c^2*)
Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55