I'm a bit new to Mathematica so this question might be a bit basic. Still, I could not find an answer.
I wish to define a symbolic differential operator. Currently, I do something like the following:
op[g_] = g'
Now, I would like this operator to work well with compositions. For example I would like
to return $2g'*g'$. However I only get $(g^2)'$.
Another thing I'm hoping will work is to compose the operator with itself, so that
will return $g''$.
I understand that the problem is that the argument 'g' was never defined to be a 'function of x'. But I'm sure how to define everything correctly.
Any help would be appreciated.