Question: Take Exponent in Maple

In Maple, to take the exponent of a term of the form $x^a$, we can define 

    Exponent := proc(x::`^`) 

    local r; 

    r := op(2, x); 

    return(r);

    end proc:

This also works for a term of the form $Y[1,3]^{-1/3}$.

But this does not work for taking exponent of a term of the form $Y[1,3]$. How to define a function $f$ in Maple, such that $f(Y[1,3]^{a}) = a$ for any $a \in \mathbb{Q}$? Thank you very much.

Please Wait...