replacing variable coordinates into an equation