Definitely not Number theory ... number theory deals more on integers, not numerical methods
I was asking how you defined "'diff(x,t)" ... I know it's supposed to be the derivative at (x,t), but does maxima calculate it for you automatically? If so, how? If not, then how did you define the function?
As for the other way, what you can do is find the points when diff(x,t)=0, those will be your maximum/minimum points. Then use those values to calculate an average value for the period. Once you have that period, use the formula presented by qmech ... and to be clear, I mean write the code to do this ... don't do it "by hand"
