Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Some equations fail to solve even with to_poly_solve

In the following, I would expect to obtain [z == 1/y*lambda_w(y)]:

sage: z=var('z')
sage: y=var('y')
sage: solve(log(z)+3*z==0, z, to_poly_solve=True)
[z == 1/3*lambert_w(3)]
sage: solve(log(z)+y*z==0, z, to_poly_solve=True)
[z == -log(z)/y]

But Sage doesn't want to solve the equation for z. Perhaps, in view of the fact that it solves the equation when 3 is in place of z, it doesn't realize that y is supposed to represent a real number. I tried assume(y,'real') but that command did not help.

Some equations fail to solve even with to_poly_solve

In the following, I would expect to obtain [z == 1/y*lambda_w(y)]:

sage: z=var('z')
sage: y=var('y')
sage: solve(log(z)+3*z==0, z, to_poly_solve=True)
[z == 1/3*lambert_w(3)]
sage: solve(log(z)+y*z==0, z, to_poly_solve=True)
[z == -log(z)/y]

But Sage doesn't want to solve the equation for z. Perhaps, in view of the fact that it solves the equation when 3 is in place of z, it doesn't realize that y is supposed to represent a real number. I tried assume(y,'real') but that command did not help.

Does anyone know a workaround?