Ask Your Question

kkumer's profile - activity

2016-01-29 04:49:33 +0200 received badge  Notable Question (source)
2015-01-13 21:39:08 +0200 received badge  Popular Question (source)
2013-03-17 16:08:30 +0200 received badge  Famous Question (source)
2012-06-05 08:09:33 +0200 commented answer Why is 3e1 not equivalent to 30?

c = Integer(3e8) is good enough for me. Tnx.

2012-06-01 09:56:59 +0200 commented answer Why is 3e1 not equivalent to 30?

Thanks for the explanation. I was somehow expecting that default 53-bit precision of 3e1 would come into play only when explicit approximation or printout would be requested and not immediately. So, if I define a symbolic function with a single literal constant c=3e8, and I want to be able to choose the precision after calling and getting the output, I have to define this constant as c=300000000. Am I right?

2012-06-01 08:58:58 +0200 commented answer How to use an external text editor to create script (interact) and render it in a browser

To follow-up on myself: In google chrome browser I get the same feature by using vrome extension.

2012-06-01 07:47:51 +0200 asked a question Why is 3e1 not equivalent to 30?

I thought that 3e1 is completely equivalent to 30. However, it is not:

sage: (1/30).n(digits=30)
sage: (1/3e1).n(digits=30)

Then I thought that 3e1 is always 53-bit real number or something like that. But I was wrong again:

sage: 1/3e1.n(digits=30)

Now I am just confused. Is this a bug? If not, how should I understand the second input above, and where can I find it documented? (Sage 5.0)

2012-05-18 01:55:21 +0200 received badge  Good Question (source)
2012-05-18 01:55:21 +0200 received badge  Nice Question (source)
2012-05-03 04:54:00 +0200 received badge  Famous Question (source)
2012-03-24 03:43:04 +0200 received badge  Notable Question (source)
2011-10-26 10:39:33 +0200 received badge  Notable Question (source)
2011-06-28 21:16:41 +0200 received badge  Popular Question (source)
2011-06-20 23:51:56 +0200 received badge  Popular Question (source)
2011-02-25 05:26:52 +0200 commented question Notebook improvements

As said, most of this is available via shift-click. However, the most important feature that I would like to have is to be able to make sections of worksheet invisible/collapsed, as it is possible in Mathematica. Now, working in sage, my worksheets soon become too large and lot of scrolling is needed.

2011-02-23 21:30:43 +0200 received badge  Taxonomist
2011-01-10 05:45:01 +0200 answered a question lagranian mechanics

Yes. It seems that direct differentiation with respect to function is not possible in sage. See also this ticket. You might try the workaround by using variables in place of functions and then subtituting the functions after differentiation e.g.

var('m l g th_fun thdot_fun  t')
th = function('th',t)
L = 1/2*m*l^2*thdot_fun^2 - m*g*l*(1-cos(th_fun))
EulerLagrange = diff(diff(L, thdot_fun).subs(thdot_fun=diff(th)), t) - diff(L, th_fun).subs(th_fun=th)==0
desolve(EulerLagrange, th, ivar=t)
2010-10-18 04:09:15 +0200 answered a question How to use an external text editor to create script (interact) and render it in a browser

Another possiblity, which is maybe Firefox specific, is to use a browser add-on that makes it possible to edit editboxes in external editors. There was 'mozex' extension that did that, but now I am using It's All Text! Firefox add-on which creates a small 'edit' button next to each Sage input cell, which opens edits in external gvim editor. This can give you also python syntax highlighting.

2010-10-16 18:58:48 +0200 asked a question Uploading and opening .sws file by click in the browser?

I have a lot of worksheet .sws files hyperlinked from a WWW page (plain page, not a Sage notebook). I would like to avoid going through the "save link to file" -> upload -> browse for file -> "upload to my notebook" procedure to look at each of those worksheets. Any ideas?

BTW, page is not exactly plain (one reaches it after some authentification) and .sws files are served by PHP script so this restricts possibilities. I assume one should write some script and tell Firefox to call this script for sws files, but I am not sure how to communicate with Sage notebook server.

2010-10-16 18:35:32 +0200 commented answer Sage Installation on Windows

If VirtualBox is not supported for a last few releases, one should probably edit the windows install page on where VirtualBox and VMWare are presently treated as essentially equivalent options for a Windows user.

2010-10-14 23:11:12 +0200 received badge  Teacher (source)
2010-10-14 23:11:12 +0200 received badge  Student (source)
2010-10-14 23:11:11 +0200 received badge  Supporter
2010-08-30 05:14:38 +0200 commented answer How do I quickly setup a remote Sage server?

How to create proper SSL certificate for sage server, so that browsers stop complaining? Anybody knows?

2010-08-26 09:41:15 +0200 commented answer Double Integral

Hm. I am puzzled. This works for me: sage: version() 'Sage Version 4.4.4, Release Date: 2010-06-23' sage: numerical_integral(lambda h: numerical_integral(lambda d:(1/d)*h*e^d*e^(h/2),4,5)[0],4,5)[0] 894.91270304016609

2010-08-25 20:06:07 +0200 answered a question Double Integral

You could try with numerical_integral. You didn't provide definition of B(), so here is example with simpler function:

sage: var('d h')
  (d, h)
sage:  integral(integral(exp(-(h-1)^2-(d-2)^2), d, 0,Infinity), h, 0, Infinity)
  1/4*pi + 1/4*(pi + pi*erf(1))*erf(2) + 1/4*pi*erf(1)
sage: n(_)
sage: numerical_integral(lambda h: numerical_integral(lambda d:exp(-(h-1)^2-(d-2)^2), 0,Infinity)[0], 0, Infinity)
  (2.8877377671374997, 2.8275945874944256e-06)

BTW: I'd like to know how to do the above without 'lambda'.

BTW2: Are you sure your integral converges at d=0?

2010-08-25 11:42:23 +0200 asked a question How to get all (numerical) solutions of an equation?

Mathematica's NSolve can produce all roots of a polynomial equation, like this:

sage: mathematica('NSolve[9*x^6 + 4*x^4 + 3*x^3 + x - 17 == 0,  x]')
{{x -> -1.1030150726298147}, 
  {x -> -0.49110203599909275 - 0.9883314953720708*I}, 
  {x -> -0.49110203599909275 + 0.9883314953720708*I}, 
  {x -> 0.5426095723140001 - 1.0543115206871092*I}, 
  {x -> 0.5426095723140001 + 1.0543115206871092*I}, {x -> 1.}}

OTOH, Sage's solve gives just one real solution:

sage: solve(9*x^6 + 4*x^4 + 3*x^3 + x - 17 == 0,  x)
 [x == 1, 0 == 9*x^5 + 9*x^4 + 13*x^3 + 16*x^2 + 16*x + 17]

Is there a simple way to get all solutions?