Sagemath :Replace an expression in a formula by a function define previously

3.1k Views Asked by At

I have defined a function F by $F(x)=(f(x)+h)/g(x)$ where $f, g$ are functions and $h$ a variable.

Suppose that I write $f(x)+h$, how can i ask to sagemath to use F in the result: $F(x)*g(x)$

Thanks