Question: Preventing nested input

Hi, I'm using Maple 13 off of my university's server. I was wondering how I can prevent "nested input", for lack of better words.

 

For example, say if define f := x -> something

Then I want another function to handle f's derivative: df := x ->diff(f(x),x)

Now I want to evaluate df at x=1 value so I do df(1)...

but I get an error:

Error, (in df) invalid input: diff received 1, which is not valid for its 2nd argument

It seems like "1" is being input to f and then being differentiated. I want "1" to be input for x after differentiation. My workaround is to copy the symbolic result of differentiation and paste it in the definition of a new function, but these was I can't automatically have changes carried forward from earlier steps because of the manual copy/paste.

Thanks

Please Wait...