This is probably a basic Maple question. I'm trying to introduce $g$ as the derivative of $f$:

Somewhat puzzling, Maple now says $g$ is two times the function $x()$.
I've tried g := x -> diff(f(x),x) and g := diff(f,x), but no luck. Google tells me I can use subs(x=3,g) to evaluate the derivative at $x=3$, but that's not very practical.
Is there a way to define a Maple function as the derivative of another Maple function?
Use D (capital D): g:= D(f); This is the functional derivative operator.
In your case: