Defining a function from a derivative?



df(x):=''(diff(f(x),x))

or

xxx : diff(f(x),x)$

df(x):=''xxx$

That is two single-quotes in a row, not a double-quote.

On 5/6/06, Alasdair McAndrew <amca01 at gmail.com> wrote:
>
> How do I create a function from a derivative?  For example, if I have a
> function, say f(x):=x^3+x^2; then I can find its derivative with
> diff(f(x),x); but how do I turn this into a function?  I can do it with
> df(x):=subst(x,t,diff(f(t),t)): but that seems very clumsy.
>
> Thanks,
> Alasdair
>