# Revision history [back]

The method substitute_function allows to substitute a function with another.

This allows to check if a particular function solves a particular partial differential equation.

For example:

sage: x, y = SR.var('x y')
sage: f = function('f')
sage: eq = diff(f(x, y), x, x) + diff(f(x, y), y, y) == 0
sage: eq
diff(f(x, y), x, x) + diff(f(x, y), y, y) == 0
sage: g(x, y) = x*y - 3*x - 2*y + 7
sage: g
(x, y) |--> x*y - 3*x - 2*y + 7
sage: eq.substitute_function(f, g)
0 == 0
sage: bool(eq.substitute_function(f, g))
True