Examples:

  1.         e1 := x^2 - x - 6
            s2 := subs(x=2, e1)
            s4 := subs(x=4, e1)
            s10 := subs(x=1/7, e1)
            d10 := evalf(s10)
          
    Maple Screenshot

    Comment: Note that the original expression e1 is not changed by the subs command. Each execution of the subs command produces its own new result.

  2.         e2 := subs(x=z+3, e1)
            t2 := subs(z=2, e2)
            t4 := subs(z=4, e2)
            t10 := subs(z=1/7, e2)
          
    Maple Screenshot

    Comment: In the first subs command a new mathematical expression is substituted for x. In the next commands, numerical values are substituted, demonstrating that the subs command will substitute whatever you ask it to substitute.

  3.         e3 := subs(x=z^2→-z-6, e1)
            u3 := subs(z=3/7→, e3)
            evalf(u3)
          
    Maple Screenshot