Ask Your Question

TSchwenn's profile - activity

2016-09-21 13:15:54 +0200 received badge  Popular Question (source)
2015-06-11 19:36:14 +0200 received badge  Famous Question (source)
2014-05-29 11:30:39 +0200 received badge  Notable Question (source)
2013-12-13 13:19:44 +0200 received badge  Famous Question (source)
2013-06-15 03:00:21 +0200 received badge  Popular Question (source)
2013-04-30 20:32:10 +0200 received badge  Famous Question (source)
2013-02-21 09:30:43 +0200 received badge  Notable Question (source)
2012-12-09 19:58:39 +0200 received badge  Notable Question (source)
2012-11-19 09:30:16 +0200 received badge  Good Question (source)
2012-10-31 15:21:16 +0200 received badge  Popular Question (source)
2012-10-11 08:55:28 +0200 received badge  Popular Question (source)
2012-07-07 18:07:06 +0200 received badge  Nice Question (source)
2012-05-22 18:15:42 +0200 commented answer Sage-5.0 VirtualBox shell access

That leads to sagevm login: I enter "sage" as the user name, then "sage" again as the password, but then the terminal shows nothing but an underscore in the top left. I press [host]-F2 to go back to Chrome, then [host]-F1 again, and the shell appears and works normally.

2012-05-22 14:42:03 +0200 commented answer Sage Wiki: who's responsible for the SageAppliance page?

But at the top left of the page, under *Recent Changes*, it says "Immutable Page." Also the "If you do not have an account, [you can create one now](http://wiki.sagemath.org/SageAppliance?action=newaccount)" link is broken ("403 Forbidden").

2012-05-21 19:33:55 +0200 asked a question Sage Wiki: who's responsible for the SageAppliance page?

The Sage Wiki page about The Sage Virtual Machineis now out of date (see http://ask.sagemath.org/question/1435...). Whom do I ask about updating it?

2012-05-21 18:29:03 +0200 asked a question Sage-5.0 VirtualBox shell access

The sage-5.0.ova virtual machine (I got mine via torrent) now boots directly into a Chrome browser open to the notebook page. (The old sage-4.8.ova boots to the Sage shell and asks you to direct your browser to localhost:8000.) While this new behavior may be convenient for quick use, I can't figure out how to configure the server behind it. The VirtualBox window running Sage-5.0 is all Chrome, with neither close button nor any toolbar visible. The right-click menu has nothing of use: just back, forward, view source, etc.) How can I access the Sage shell now?

The directions at http://wiki.sagemath.org/SageAppliance#Using_the_Sage_shell ("press Ctrl C") no longer work with this new version. I also tried Alt-F4 to quit Chrome, but it shut down the whole virtual machine with it.

2012-05-18 01:59:38 +0200 commented question Using solve() to find positive real solutions to a complex equation

Please clarify the "should not do this" part. What's the _this_?

2012-05-16 02:25:20 +0200 asked a question Using solve() to find positive real solutions to a complex equation

I need solve() to return only positive real solutions to a symbolic complex equation, but it fails to find a useful solution:

sage: var('x, y', domain='positive')
sage: z = 1/(i*x + 1/(i*y + 1))
sage: Equation = z == 2
sage: solve(Equation, x, y)
([x == (-I*y + 1)/(2*y - 2*I)], [1])

I want solutions in the form [x == foo, y == bar]. Splitting Equation into real and imaginary components does the trick:

sage: Equation = [z.real() == 2, z.imag() == 0]
sage: solve(Equation, x, y)
[[x == (-1/2), y == -1], [x == (1/2), y == 1]]

But why is that reformulation necessary to produce useful results? Isn't it equivalent to the original Equation?

Also, why does solve() ignore my variables' domain='positive' clause? Solve also ignores positive x and y assumptions:

sage: assume(x>0)
sage: assume(y>0)
sage: solve(Equation, x, y)
[[x == (-1/2), y == -1], [x == (1/2), y == 1]]

And it bugs out when positive x & y clauses are added to Equation:

sage: Equation.append(x>0, y>0)
sage: solve([Equation, x>0], x, y)
[[0 < x, [1/((y^2 + 1)*(1/(y^2 + 1)^2 + (x - y/(y^2 + 1))^2)) == 2, -(x - y/(y^2 + 1))/(1/(y^2 + 1)^2 + (x - y/(y^2 + 1))^2) == 0, x > 0, y > 0]]]
2012-05-12 23:43:08 +0200 received badge  Scholar (source)
2012-05-12 23:43:08 +0200 marked best answer Display a PNG image file in a worksheet

How do you want to show it? The command you gave is showing a string (DATA is a Python string), so that is why that doesn't work.

To just insert the image, use the TinyMCE GUI editor (shift-click on a blue "new cell" line). Full instructions were at Mike May's great worksheet, where you don't even need the DATA variable to use the image link; this is just doing the same thing.

This is what I think you mean - see these screen captures. Basically, you upload the file, and then in the TinyMCE editor you click on the picture icon and put just the name of the file in as your picture file name. Here I uploaded a picture of your question into my worksheet.

image description

image description

image description

image description

I imagine that you could also get it to show up by inserting some HTML into a cell with html() and using an <img> tag or something?

2012-05-12 23:06:37 +0200 received badge  Nice Question (source)
2012-05-12 17:53:09 +0200 received badge  Student (source)
2012-05-12 17:28:32 +0200 received badge  Editor (source)
2012-05-12 17:08:10 +0200 asked a question Display a PNG image file in a worksheet

I've uploaded an image file (DATA+'foo.png') into a notebook worksheet. How can I display it in the worksheet? I've tried using the statement

show(DATA+'foo.png')

but it just returns the file's path:

'/home/sage/.sage/sage_notebook.sagenb/home/admin/18/data/foo.png'

2012-04-29 20:44:07 +0200 received badge  Teacher (source)
2012-04-29 18:20:18 +0200 answered a question Plotting Piecewise function

Quick and dirty, with a cleaned up sample dataset (I just added *s by hand, but there must be a smarter way to do that). See the output at http://www.sagenb.org/home/pub/4662/

x = var('x')
sample = [(1234, 1234), 0.0020259319286871956*x + 2.5]\
, [(1234, 1234), 0.0060777957860615869*x + 7.5]\
, [(1234, 1234), 0.010129659643435977*x + 12.5]\
, [(1234, 1244), 0.0156672069165316*x + 19.333333335]\
, [(1244, 1254), 0.015541264738745977*x + 19.333333335]\
, [(1254, 1264), 0.015417331208133968*x + 19.333333335]\
, [(1264, 1274), 0.015295358651107592*x + 19.333333335]\
, [(1274, 1312), 0.015175300890894815*x + 19.333333335]

def piecewiser(pieces):
    p = 0
    for i in pieces:
        if i[0][0] == i[0][1]: #if this piece is a point
            q = text("o", (i[0][0], i[1].substitute(x=i[0][0]))) #put an "o" at that point
        else:
            q = plot(i[1], (x, i[0][0], i[0][1])) #otherwise plot it as a function
        if p == 0:
            p = q
        else:
            p = p + q
    return p
show(piecewiser(sample))
2012-04-26 03:30:27 +0200 received badge  Supporter (source)