Ask Your Question

achrzesz's profile - activity

2018-12-15 05:50:43 -0500 received badge  Good Answer (source)
2016-07-25 04:42:00 -0500 received badge  Good Answer (source)
2016-05-25 01:24:27 -0500 received badge  Nice Answer (source)
2015-03-20 04:11:28 -0500 received badge  Good Answer (source)
2014-01-22 04:17:53 -0500 received badge  Nice Answer (source)
2014-01-04 14:29:40 -0500 received badge  Great Answer (source)
2014-01-03 16:00:17 -0500 received badge  Good Answer (source)
2013-12-09 22:41:32 -0500 received badge  Good Answer (source)
2013-07-16 19:15:54 -0500 received badge  Nice Answer (source)
2013-07-08 00:40:21 -0500 received badge  Nice Answer (source)
2013-04-05 00:56:51 -0500 received badge  Enthusiast
2013-03-30 10:08:08 -0500 received badge  Good Answer (source)
2013-03-13 02:07:42 -0500 commented question How to treat with logarithm numerically when it becomes negative?

Have you tried: find_root(log(x*x-x),-2,0) -0.6180339887498988 find_root(log(x*x-x),-2,2) 1.6180339887498947

2013-02-24 07:59:25 -0500 commented answer 3d Complex function plot

http://ask.sagemath.org/question/1767/coloring-surfaces-in-plot3d

2013-02-24 04:14:57 -0500 answered a question 3d Complex function plot

My colouring is based on the z=f(x,y) value of the plotted function. Compare:

sage: var('x y');
sage: cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)]
sage: plot3d(lambda x,y:cos(sqrt(abs((x+I*y)*(x-I*y)))),(x,-2*pi,2*pi),(y,-2*pi,2*pi),adaptive=True,color=cmsel)

or:

sage: cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0.05,0.75,0.02)]
sage: plot3d(lambda x,y:sin(x+I*y).imag(),(x,-2*pi,2*pi),(y,-2,2),adaptive=True,color=cmsel,mesh=True)

http://ask.sagemath.org/question/1405...

2013-02-23 23:59:51 -0500 answered a question 3d Complex function plot

For example:

sage: var('x y');
sage: cmsel = [colormaps['gnuplot2'](i) for i in sxrange(0,1,0.02)]
sage: plot3d(lambda x,y:(sin(x+I*y)).imag_part(),(x,-3*pi,3*pi),(y,0,2),adaptive=True,color=cmsel)
2013-02-23 20:48:41 -0500 answered a question integral interpretation

Sage gives you the correct answer. You can check it for example in wolframalpha.

Ei

is the exponential integral (and not a product).

To obtain a better formatted code you can copy-paste your code,

mark it and use the 101... icon.

2013-02-21 04:33:00 -0500 received badge  Nice Answer (source)
2013-02-15 23:16:04 -0500 answered a question How does one find solutions to a polynomial over a finite field?
sage: E=EllipticCurve(GF(5),[0,1]);E
Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 5
sage: pp=E.points()
sage: [p.xy() for p in pp[1:]]
[(0, 1), (0, 4), (2, 2), (2, 3), (4, 0)]
2013-02-13 17:17:18 -0500 commented answer Disabling y-axes in 2-D plot

O.K. I did.

2013-02-13 08:48:47 -0500 commented answer Disabling y-axes in 2-D plot

Try the edited version above

2013-02-13 05:18:39 -0500 answered a question Disabling y-axes in 2-D plot

In matplotlib you can use for example the link

http://www.shocksolution.com/2011/08/...

In Sage you can use a workaround:

p=plot(sin,ticks=[0.2,[]],thickness=3,zorder=20) 
p+=arrow((-1,0),(1,0),ticks=[0.2,[]],color='black',zorder=10)
p.axes_color('white')  
p.show()
2013-02-12 04:16:09 -0500 received badge  Nice Answer (source)
2013-02-11 23:17:18 -0500 answered a question Extracting a matrix from linear expressions
maxima('coefmatrix([a-b,b-c,c-a],[a,b,c])').sage()      
[ 1 -1  0]
[ 0  1 -1]
[-1  0  1]
2013-02-05 08:21:27 -0500 answered a question Elliptic Curve functions don't seem to exist?

Your commands are O.K.:

sage: p=354990952970600489                      
sage: E = EllipticCurve(GF(p),[9326,1376127157])
sage: E
Elliptic Curve defined by y^2 = x^3 + 9326*x + 1376127157 over Finite Field of size 354990952970600489
2013-01-22 17:10:56 -0500 commented answer Unable to evaluate integral of x*x/(exp(x)+1)

Zeta is by definition the sum of a series, so this approach seems to be natural. I suspect that Mathematica uses a similar approach. As far as the speed is concerned: sage: timeit('numerical_integral(x^2/(exp(x)+1),0,oo)') 625 loops, best of 3: 1.36 ms per loop

2013-01-22 00:46:25 -0500 commented answer Unable to evaluate integral of x*x/(exp(x)+1)

This method works for higher powers of x Wolfram alpha does not allow for x^n, n>4

2013-01-21 18:32:41 -0500 answered a question Unable to evaluate integral of x*x/(exp(x)+1)

Maxima can not compute the limit but expanding into series and integrating term by term helps:

sage: maxima('powerseries(x^2*exp(-x)/(exp(-x)+1),exp(-x),0)')
x^2*%e^-x*'sum((-1)^i1*%e^-(i1*x),i1,0,inf)
sage: var('k x');
sage: assume(k+1>0);
sage: sum(integrate(x^2*exp(-x)*(-1)^k*exp(-(k*x)),x,0,oo),k,0,oo)
3/2*zeta(3)
2013-01-20 04:49:07 -0500 commented question simplify sinh expression

sinh(log(1+sqrt(2))).n() 1.00000000000000

2013-01-18 21:45:05 -0500 answered a question Product of Elements in Group

Use D(x)*D(y) instead of D(x*y):

sage: D = SymmetricGroup(4)
sage: H=D.subgroups()
sage: A=Set(D(x)*D(y) for x in H[18] for y in H[6])
sage: print(A)
{(1,4,3,2), (), (1,3,4), (2,4), (1,3,2,4), (1,2,3), (1,4,2,3), (1,2)(3,4)}
sage: A=Set(D(x)*D(y) for x in H[18] for y in H[26])
sage: print(A)
{(1,4), (1,3)(2,4), (1,3,4,2), (2,3), (3,4), (1,4,2,3), (), (2,3,4), (1,3,2,4), (1,4)(2,3), (1,4,3), (1,2,4), (1,2), (1,2)(3,4), (1,3,2), (1,2,4,3)}
2013-01-15 13:45:11 -0500 received badge  Nice Answer (source)
2013-01-15 13:44:17 -0500 received badge  Nice Answer (source)
2013-01-15 11:33:55 -0500 edited answer Matrices and mpmath

Use mpmath operations to mpmath matrices

M=mp.matrix([[2,0],[0,2]])
mp.inverse(M)             
matrix(
[['0.5', '0.0'],
 ['0.0', '0.5']])

You can also control precision in Sage:

sage: m=matrix(RealField(100),[[2,0],[0,2]])
sage: m^-1
[0.50000000000000000000000000000 0.00000000000000000000000000000]
[0.00000000000000000000000000000 0.50000000000000000000000000000]