So this could be a bug - or feature - in Maxima. Of course, such functions are in general multivalued, so depending on your context this might not really be a good answer anyway. You might instead like