Question: Inverse series, solve and RootOf

Spawned from here.

1. series() shows some strange dependence on the session history, the first call breaking subsequent computations. Also, for F(x, y), the zeroth term is RootOf(F(0, _Z)), even though 1 is the only solution, but for G(x, y), RootOf(G(0, _Z)) is evaluated to 1, even though 1 is not the only solution:

F := (x, y) -> ln((1+x)*y)+exp(x^2*y^2)-x-cos(x):
G := (x, y) -> ln((1+x)*y)+exp(x^2+y-1)-x-cos(x):

series(RootOf(G(x, y), y), x = 0, 5);
                 1-(1/2)*x^2-(1/6)*x^3+(7/48)*x^4+O(x^5)

series(RootOf(G(x, y), y), x = 0, 6);
Error, (in series/RootOf) unable to compute series

forget(series);
series(RootOf(G(x, y), y), x = 0, 6);
           1-(1/2)*x^2-(1/6)*x^3+(7/48)*x^4-(1/60)*x^5+O(x^6)

series(RootOf(F(x, y), y), x = 0, 1);
                         RootOf(ln(_Z)) + O(x)

2. For some reason solve hangs the first time, then returns a result quickly, and apparently doesn't go along well with simplify, because the last output contains an escaped local variable ans. Besides, I'm not sure why solve generates a huge answer. Is it expanding something to a high order? I was expecting just RootOf(_Z+tan(_Z))+O(x).

ser := series(y+tan(y)+x, x = 0, 1);

iser := timelimit(30, solve(ser, y)): # appears to run indefinitely without timelimit
Error, (in ArrayTools:-NumElems) time expired

iser := solve(ser, y): # returns immediately

evalf(iser); # OK
                                             O(x)

evalf(simplify(iser)); # less OK
       .1250000000*(eval(RootOf(_Z+tan(_Z)), [RootOf = ans, tan(_Z) = sin(_Z)/cos(_Z)]))+O(x)

This is in Maple 2017.3.

Please Wait...