# Substituting a variable by a value: ()

### 5.12.19 Substituting a variable by a value: ()

Another way to substitute a variable by a value, besides with the | operator or the subst command, is with something akin to functional notation. You can follow an expression or expression name with equalities of the form variable = value.

#### Examples.

- Input:
  Expr:= x + 2*y + 3*z
  then:
  subst(Expr,[x=1,y=2])
  or:
  Expr | x=1, y=2
  or:
  Expr(x=1,y=2)
  Output:

  5+3 z

- Input:
  (h*k*t^2+h^3*t^3)(t=2)
  Output:

  4 h k+8 h3