Ask Your Question

Jaleks's profile - activity

2021-02-03 15:30:45 +0100 received badge  Notable Question (source)
2021-02-03 15:30:45 +0100 received badge  Popular Question (source)
2015-09-20 17:19:28 +0100 received badge  Nice Answer (source)
2015-09-15 17:46:40 +0100 commented answer Is there a way to fix my html() lines?

If I paste it in: https://sagecell.sagemath.org/ the output of html() will be without warning, is pretty printed and (hopefully) will be in future (?)

2015-09-15 17:20:59 +0100 received badge  Teacher (source)
2015-09-15 17:05:56 +0100 answered a question Is there a way to fix my html() lines?

maybe something like this Python snippet below – used before the first time you try 'html()' – will do the trick for you; here it is working in a quick test...

try:
    # if old_html ist not yet defined
    old_html == None
except NameError:
    # set it to the current html function
    old_html = html
    # and define a wrapper
    def html(*args):
        pretty_print(old_html(*args))

# now try results
old_html('Suppose we wanted to calculate $2+2=4$')
html('Suppose we wanted to calculate $2+2=4$')
2015-09-15 16:26:32 +0100 commented answer Understanding the 'solve()' result with braces and brackets ("([{x:z},{x:y}],[1,1])")

Thanks so far, now I understand a bit more, but: How does it come? I mean, if there is already an x==y as solution, for what is it useful to add another result where these both values are just the same? And where is the y:z solution I now would expect?

2015-09-15 10:32:32 +0100 received badge  Editor (source)
2015-09-15 09:58:47 +0100 asked a question Understanding the 'solve()' result with braces and brackets ("([{x:z},{x:y}],[1,1])")

Having following code

var('x,y,z')
P=-x^2*y + x*y^2 + x^2*z - y^2*z - x*z^2 + y*z^2 == 0
solve(P,x,y,z)

Sage gives me a result of

([{x:z},{x:y}],[1,1])

which I am not really able to interpret, also the help(solve) did not get me any further - is there anyone who can help me out with that? (btw. as -(x-y)*(x-z)*(y-z)==0 is an alternate form for writing the polynomial my expected answer would be something like x=y or x=z or y=z but in other cases where I'd get a similar answer I would have no idea, so I'd be happy to get this format explained.)