Re: [sage-support] Re: Approximating integral with infinite bounds

2020-02-27 Thread saad khalid
echniques with Gaussian > pseudu-random numbers. > -- > *From:* sage-s...@googlegroups.com < > sage-s...@googlegroups.com > on behalf of saad khalid < > saad...@gmail.com > > *Sent:* Wednesday, February 26, 2020 9:41:19 PM > *To:* s

[sage-support] Re: Approximating integral with infinite bounds

2020-02-26 Thread saad khalid
n sage20:=int(sage16,sage17"Done", sage18w,sage190):; "Done" On Wednesday, February 26, 2020 at 10:21:21 PM UTC-5, saad khalid wrote: > > I'm trying to compute/estimate a rather complicated looking integral. Here > is the code I'm trying to run, with the necessary

[sage-support] Approximating integral with infinite bounds

2020-02-26 Thread saad khalid
I'm trying to compute/estimate a rather complicated looking integral. Here is the code I'm trying to run, with the necessary constants defined: var('t1,t2,u,w,k') T = 1 m = 100 E = 1 v = 0 y=1 O = 1 integral(integral(integral( integral(integral( e^(-t1^2/T^2)*e^(-t2^2/T^2)*e^(I*O*t1)*

[sage-support] Running the same function twice leads to different plots

2020-01-10 Thread saad khalid
Hey everyone: I'm not quite sure what I'm doing incorrectly here, but I wrote some code which outputs a plot in the end. I start by running: n =16; J = 1; h = 1; var('T,h'); spinConfig = Tuples([-1,1],n).list() Then, I run: def Ham(spins,J,h): total = J*sum(spins[x]*spins[x+1] for x in

Re: [sage-support] Unexpected error for asking diagonalizability

2019-11-07 Thread saad khalid
This functionality seems to be intended somehow? At least, it is made reference to in the documentation: http://doc.sagemath.org/html/en/reference/matrices/sage/matrix/matrix2.html Look at the part after: "A matrix that is not diagonalizable over the rationals, as evidenced by its Jordan form."

[sage-support] Pari/gp getting stuck while running

2019-10-14 Thread saad khalid
Hi all: This is a question about usage on Cocalc, apologies if this isn't the right place. I'm trying to run the following commands in cocalc: %gp e(x) = exp(Pi*I*x); e(1) Thn(n,z,t,a,b) = e((n+a)^2*t) * e(2*(n+a)*(z+b)); {Th(z,t,a,b) = suminf(n=0,Thn(n,z,t,a,b)) +

[sage-support] Re: Updating Sage documentation presentation

2019-06-20 Thread saad khalid
y, June 20, 2019 at 9:23:32 AM UTC-4, Kwankyu wrote: > > > > On Wednesday, June 19, 2019 at 9:31:05 PM UTC+9, saad khalid wrote: >> >> Hi all: >> >> The sage documentation hosted online (eg. >> http://doc.sagemath.org/html/en/reference/index.html ) looks very

[sage-support] Updating Sage documentation presentation

2019-06-19 Thread saad khalid
Hi all: The sage documentation hosted online (eg. http://doc.sagemath.org/html/en/reference/index.html ) looks very old. To me at least, it makes the software seem ancient, and I believe it puts off younger new users. The Cocalc interface for Sage maintains a modern looking aesthetic which

[sage-support] Plotting honeycomb crystal lattice

2019-05-16 Thread saad khalid
Hi everyone: I'm trying to using Sage's plot functionality to plot the honeycomb lattice: https://sites.google.com/site/makingplots4scipurposes/_/rsrc/1456789513003/gnuplot-samples-of-2d-lattices/honeycomb.png Plotting the honeycomb lattice is slightly different from plotting a simple (like a

[sage-support] Re: Function defined with matrices won't plug in values for function

2018-12-05 Thread saad khalid
Thank you all for the thoughtful responses, your comments helped me a lot. One last bit of trouble that I've been having related to this topic. This was is the code I was running: Mz = matrix([[0,1],[1,0]]) Mx = matrix([[1,0],[0,-1]]) M1 = Matrix([[1,0],[0,1]]) import numpy as numpy #R. = QQ[]

[sage-support] Re: Function defined with matrices won't plug in values for function

2018-12-02 Thread saad khalid
nts on the existence of this issue. Thanks for all of the help so far, I appreciate it! On Friday, November 30, 2018 at 4:59:40 PM UTC-5, saad khalid wrote: > > Hi all, > > I'm not sure what is happening, but I defined some matrices: > Mz = matrix([[0,1],[1,0]]) > Mx = matrix([[1

Re: [sage-support] Function defined with matrices won't plug in values for function

2018-11-30 Thread saad khalid
,[1,0]]) > Mx = matrix(R,[[1,0],[0,-1]]) > M1 = matrix(R,[[1,0],[0,1]]) > h = M1 + s*Mx > > sage: h(s=1/2) > [3/2 0] > [ 0 1/2] > > Here h is a matrix with entries in R, and substitution works... > > On Fri, Nov 30, 2018 at 9:59 PM saad khalid > wrot

[sage-support] Function defined with matrices won't plug in values for function

2018-11-30 Thread saad khalid
Hi all, I'm not sure what is happening, but I defined some matrices: Mz = matrix([[0,1],[1,0]]) Mx = matrix([[1,0],[0,-1]]) M1 = matrix([[1,0],[0,1]]) And then I tried defining a function where I multiply these matrices by some variable and add them together: h(s) = M1 + s*Mx h(.1) However,

[sage-support] Pauli matrices

2018-11-30 Thread saad khalid
Hey everyone: Perhaps I am missing something very obvious, but is there an implementation of the pauli spin matrices in Sage? They are simple enough to define, but ubiquitous enough that I would have assumed they were predefined. -- You received this message because you are subscribed to the

[sage-support] Re: Having Sage output latex for some computation

2018-11-13 Thread saad khalid
Oh I see, I had forgotten about the format() command. Thank you! On Monday, November 12, 2018 at 12:20:14 PM UTC-5, kcrisman wrote: > > > I'm doing an assignment in Sage atm (through cocalc specifically), and one >> thing I am doing is taking the derivative of a function and plugging in x = >>

[sage-support] Having Sage output latex for some computation

2018-11-12 Thread saad khalid
Hello everyone: I'm doing an assignment in Sage atm (through cocalc specifically), and one thing I am doing is taking the derivative of a function and plugging in x = 0 and showing that it is equal to 0. Since it is true, sage just outputs 0. I was hoping, however, that there was some way that

[sage-support] Mixing cython and Sage code

2018-03-21 Thread saad khalid
Hey everyone: I'm currently in the process of converting some code from Mathematica to Sage, my primary motivation being that Mathematica is running it too slowly and I was hoping that I could somehow get some increase in speed with Sage. My thought was that this would be easiest if I were

[sage-support] Re: Find_root not finding a root

2018-03-15 Thread saad khalid
hnik wrote: > > > > On Thursday, March 15, 2018 at 10:23:44 PM UTC, saad khalid wrote: >> >> I have to apologize, I gave a slightly incorrect Mathematica code >> earlier, the actual code was: >> >> Solve[ Exp[-2*a*x]-1+4*a*x==0,x]//N >> >> The earlier code gave t

Re: [sage-support] Re: Find_root not finding a root

2018-03-14 Thread saad khalid
==0,x]//N On Monday, March 5, 2018 at 5:14:05 PM UTC-6, vdelecroix wrote: > > On 05/03/2018 20:01, saad khalid wrote: > > Hello, and thank you for your response. While I agree that the behaviour > of > > the function certainly complies with the specifications listed in it

[sage-support] Re: Find_root not finding a root

2018-03-05 Thread saad khalid
Hello, and thank you for your response. While I agree that the behaviour of the function certainly complies with the specifications listed in its description, I think everyone would agree that it would be better if it did give all of the roots in a given interval. Would you happen to know

[sage-support] Find_root not finding a root

2018-03-01 Thread saad khalid
Hey everyone: I'm running this code: find_root(e^(-2*x*1)-(1 - 4*x),-2,2) It returns 2.4011774461136836e-13 which is approximately 0. However, there should be another root around x = -0.628. Why isn't it finding this root? Is there any way I can make sure it finds all of them? Thanks --

[sage-support] Plotting with respect to x^2

2018-01-27 Thread saad khalid
Hello! I have a function and I would like to plot it, but instead of the "x-axis" scaling by x, I would like have the x-axis scale by x^2. Is this possible with the current plot function? Thanks! -- You received this message because you are subscribed to the Google Groups "sage-support"

[sage-support] Re: Weird behavior of a divergent sum when using the assume() command

2018-01-17 Thread saad khalid
On Wednesday, January 17, 2018 at 1:40:35 AM UTC-6, Ralf Stephan wrote: > > On Tuesday, January 16, 2018 at 3:23:16 AM UTC+1, saad khalid wrote: >> >> Hello everyone: >> >> So, I was just messing around with the assume command, and did: >> >> var('i')

[sage-support] Weird behavior of a divergent sum when using the assume() command

2018-01-15 Thread saad khalid
Hello everyone: So, I was just messing around with the assume command, and did: var('i') assume(abs(x) < 1) f(x) = sum(x^i, i, 0, oo ) This is just 1/(1-x). I wanted to see what would happen when I tried using x > 1, and it still evaluates properly, even though the sum should be divergent for

[sage-support] Re: Misunderstanding or mistake with Coefficient function on multivariate taylor series

2017-07-13 Thread saad khalid
On Tuesday, July 11, 2017 at 1:04:39 AM UTC-5, Ralf Stephan wrote: > > Note that contrary to your other examples x2 is not in the expression you > expand the series from. A typo? > >> >> Yes, sorry, that was a typo. But thank you! I hadn't know about needing to substitute x1-1 with a single

[sage-support] Re: Misunderstanding or mistake with Coefficient function on multivariate taylor series

2017-07-09 Thread saad khalid
Another similar issues is this: sage: x1,x2,t = var('x1,x2,t') sage: ((1/(1-x2*x1^t)).taylor(x2,1,4).taylor(x1,1,4)).substitute(x2=1). coefficient((x1 - 1)) 0 sage: x1,x2,t = var('x1,x2,t') sage: ((1/(1-x2*x1^t)).taylor(x2,1,4).taylor(x1,1,4)).substitute(x2=1) -1/480*(t^8 - 10*t^6 + 9*t^4)*(x1

[sage-support] Misunderstanding or mistake with Coefficient function on multivariate taylor series

2017-07-09 Thread saad khalid
Hello everyone: I'm trying to get particular coefficients from taylor series expansions. So, I start with the function f(x1,x2) = 1/(1 - x2*x1^t), and I take the taylor series expansion at x1 = 1, and then I would like the coefficient on the 1/(1-x1) term. However, when I do this, I get two

[sage-support] Re: Why factor(6*x+3) doesn't give 3*(2*x+1) in SageCell?

2017-04-08 Thread saad khalid
I am a student and I definitely agree with Chris Seberino here. I don't think it is the job of software (or, rather, it is not good CAS design) to try and teach people mathematics in this way. I think that the CAS should be as convenient and intuitive as possible. As an example, I didn't even

[sage-support] Plotting just the real line

2017-04-04 Thread saad khalid
I'm trying to get an image of just the real line, ideally with a fairly thick line for the axis, with the points 1 and -1 labelled, but the line extending beyond them a bit. The main problem I'm having is, I'm trying to do this with the plot function. I just do plot(x,x,alpha = 0) However, I

[sage-support] Re: Incorrect output of a sum

2017-04-01 Thread saad khalid
Wow, sorry about that, I forgot that part... thank you! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to

[sage-support] Incorrect output of a sum

2017-03-31 Thread saad khalid
Not what sure the issue is, but I couldn't find any typos in what I was doing. I define a function: gamma3(a,b,c,j) = 1/((e^(2*pi*i*(a*j/16))-1)(e^(2*pi*i*(b*j/16))-1)(e^(2*pi* i*(c*j/16))-1)) Then I do the sum: sum(gamma3(1,2,9,j) for j in [1..7]).n() and this gives me 1.98224774759702 +

[sage-support] Documentation on defining functions on Sage

2017-03-31 Thread saad khalid
Hey everyone: I'm just looking for the documentation for properly defining functions on Sage. As far as I can tell, there are several ways to define functions. I think you can define functions as sage objects, and then functions as python functions, and then also lambda functions through

[sage-support] Setting end variable on print

2017-01-03 Thread saad khalid
Hey everyone: I would like to use the print function without it creating a new line. From what I remember, I could do print("whatever I want", end=""), and that should make it not create a new line. However, when I do this, I get an error saying print("hi", end = "") ^

[sage-support] Re: Grobner bases in sage

2016-12-17 Thread saad khalid
Hello! Some of this information may be of use to you: http://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/multi_polynomial_ideal.html -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group

[sage-support] Re: Using Objects from Sage in Macaulay2? Or perhaps doing dynamic coding?

2016-10-16 Thread saad khalid
at 3:44:35 AM UTC-5, Dima Pasechnik wrote: > > > > On Saturday, October 15, 2016 at 9:39:40 PM UTC, saad khalid wrote: >> >> Hello everyone! >> >> So, the title is almost a misnomer, because I don't really want to use an >> object from Sage in M2 as m

[sage-support] Using Objects from Sage in Macaulay2? Or perhaps doing dynamic coding?

2016-10-15 Thread saad khalid
Hello everyone! So, the title is almost a misnomer, because I don't really want to use an object from Sage in M2 as much as I want to just use a number from my python code in M2. Let me explain what I mean. I have a list in M2 with close to 5,000 matrix groups. Lets call the list MatrixList,

[sage-support] Comparing many lists to each other

2016-10-01 Thread saad khalid
Hello everyone: So, I have a bit of a python related question, but I wasn't sure where exactly to ask this. Currently, I've generated a 8000x20 matrix of taylor series expansion coefficients. So, basically, I had 8000 functions, and I computed the first 20 taylor series coefficients of each

[sage-support] Algebraic Geometry in Sage

2016-09-20 Thread saad khalid
Hey everyone: There's a command in M2 called "selectInSubring". I was wondering, though I know I can use M2 through sage, is there a direct way to do this through Sage itself? Or is interfacing to M2 the only way? Here is the M2 description of the function:

[sage-support] Re: Easy way to combine fractions in Sage?

2016-09-13 Thread saad khalid
On Tuesday, September 13, 2016 at 12:37:45 AM UTC-5, Ralf Stephan wrote: > > On Monday, September 12, 2016 at 9:26:34 PM UTC+2, saad khalid wrote: >> >> I couldn't find a better solution, so I made this: >> >> https://trac.sagemath.org/ticket/21477 >> >

[sage-support] Re: Computation has been running for a very long time...

2016-09-12 Thread saad khalid
I tried checking the process, here was the output: ~/Saad Khalid$ ps x | grep -w 12616 12616 pts/22 Ssl+ 0:00 /usr/bin/M2-binary --no-debug --no-readline --silent -e ZZ#{Standard,Core#"private dictionary"#"InputPrompt"} = lineno -> "_EGAS_ : ";ZZ#{

[sage-support] Re: Easy way to combine fractions in Sage?

2016-09-12 Thread saad khalid
I couldn't find a better solution, so I made this: https://trac.sagemath.org/ticket/21477 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[sage-support] Re: Computation has been running for a very long time...

2016-09-12 Thread saad khalid
The reason i didn't run it in a terminal is because the terminal would stop working after 25 hours(I have 25 hours of inactive time) and, while I know how to keep a sage worksheet active, I don't know how to keep a terminal active without interrupting the calculation. I will try running it in

[sage-support] Computation has been running for a very long time...

2016-09-12 Thread saad khalid
Hello everyone: I ran a computation on SMC that i figured would take some time. I'm generating 8000 groups, I believe, which is a slow process. Generating one group can take a few seconds, so I would expect generating 8000 groups to take 10-ish hours. However, this computation has been running

[sage-support] Easy way to combine fractions in Sage?

2016-09-10 Thread saad khalid
In mathematica, there is the function "together" which combines fractions by giving them a common denominator and then cancels out the factors. It is shown here: https://reference.wolfram.com/language/ref/Together.html In Sage, I would like to do something similar. I just want to do A,B =

[sage-support] Re: State of Sage Wiki and Support

2016-09-09 Thread saad khalid
bump Is there any interest in this? -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send

[sage-support] State of Sage Wiki and Support

2016-08-31 Thread saad khalid
Hey everyone: It's seemed to me lately that the state of the documentation is kinda all over the place and dated. I've been having increasing trouble recently with finding the documentation for functions online, perhaps my Google skills are falling off? I know that you can always run

[sage-support] Re: Writing fast M2 code + Cause for the difference in runtime in M2's "toString" and to_sage()

2016-08-28 Thread saad khalid
Thank you for the answers! Volker Braun, a question about your answer, I see that that gives the molien series of a group. However, is there any way to specify the matrix generating the group, like I did in M2 with the command: A=matrix{{zet^1,0,0},{0,zet^2,0},{0,0,zet^3}} -- You received

[sage-support] Writing fast M2 code + Cause for the difference in runtime in M2's "toString" and to_sage()

2016-08-27 Thread saad khalid
Hey everyone: So, Im going to be writing a program that needs to go through a loop and store a polynomial from M2 through each loop. I wanted this to work as quickly as possible, so I was comparing the speed of the toString function in M2 to the to_sage() part I contributed here:

Re: [sage-support] More decimal points of accuracy in real number computation.

2016-08-01 Thread saad khalid
Very cool, thank you! I looked into UCF a bit and on this page: http://doc.sagemath.org/html/en/reference/number_fields/sage/rings/number_field/number_field.html It says "Doing arithmetic in towers of relative fields that depends on canonical coercions is currently VERY SLOW. It is much better

[sage-support] More decimal points of accuracy in real number computation.

2016-08-01 Thread saad khalid
Hello! So, I run the following code to compute some numbers. They should all simplify to whole numbers(the imaginary part is 0), and originally I was using the simplify_full() function to make this happen, however this become more and more time intensive until, when using it in this case, the

[sage-support] how to factor elements in a list

2016-07-19 Thread saad khalid
Hello everyone: So, say I've got something like this reset() z1 = (e^(2*pi*i/15))^6 z2 = (e^(2*pi*i/15))^3 z3 = (e^(2*pi*i/15))^9 z4 = (e^(2*pi*i/15))^12 num = lambda k: -z1^k*(z2-1)^(k+1)*(z3-1)^(k+1)*(z4-1)^(k+1) + -z2^k*(z1-1 )^(k+1)*(z4-1)^(k+1)*(z3-1)^(k+1) +

[sage-support] using Macaulay2's toString to define a function in Sage

2016-07-11 Thread saad khalid
Hey everyone: So, it turns out that Macaulay2 has an inbuilt function to convert it's ascii output of exponents into a normal string. It can be seen at the end this example: reset() macaulay2.eval(""" K = toField(QQ[zet]/(zet^6 + zet^3 + 1)) A=matrix{{zet^1,0},{0,zet^8}} needsPackage

[sage-support] Could not read from remote repository when pushing to Trac

2016-07-04 Thread saad khalid
Here is the full error message: saad@saad-ThinkPad-X201:~/sage$ git status On branch t/20936/ adding_conversion_for_divide_and_product_class_in_sage_m2_interface nothing to commit, working directory clean saad@saad-ThinkPad-X201:~/sage$ git trac push Pushing to Trac #20936... Guessed remote

[sage-support] Re: How to run Macaulay2 code through Sage interface

2016-06-23 Thread saad khalid
Ahh yes, sorry, I misspoke. The first part that I ran in the macaulay2.eval was working fine, it was the sage/m2 conversion that was not working for me. Oh okay! I will try to use the GAP interface. It's setup is similar to the macaulay2 interface, isn't it? As in, I'll be doing gap.eval("the

[sage-support] Re: How to run Macaulay2 code through Sage interface

2016-06-23 Thread saad khalid
This is on the same subject, so I thought I'd ask: I was trying to use the Sage/M2 interface that Dima had been using, but I couldn't quite get it to work for me. Here is what I was trying to convert to sage: macaulay2.eval(""" K = toField(QQ[zet]/(zet^6 + zet^5 + zet^4 + zet^3 + zet^2 + zet +

[sage-support] Re: Substituting values for variables

2016-06-13 Thread saad khalid
Many of these expression shouldn't also simplify down to 0 just through algebra, though the symbolic manipulator usually doesn't recognize that. I try using using CC(gamma(2)), so that I can see if it's equal to 0, but it tells me that it can't evaluate a symbolic expression numerically, even

[sage-support] Re: Substituting values for variables

2016-06-13 Thread saad khalid
I should add that moving the part where I assign values to the u's to above the definition of gamma, like so: reset() var("G") var('i') G = 5 u = [SR("u_%i"%x) for x in [0..G-1]] u[1] = -1 u[2]= -1 u[3]= -1 u[4]= -1 gamma(k) = (1/G)*sum(-(u[i])^(k-1)/(u[i]-1)^k for i in (1..G-1)) show(1/5 -

[sage-support] Re: Substituting values for variables

2016-06-13 Thread saad khalid
I should add that moving the part where I assign values to the u's to above the definition of gamma, like so: reset() var("G") var('i') G = 5 u = [SR("u_%i"%x) for x in [0..G-1]] u[1] = -1 u[2]= -1 u[3]= -1 u[4]= -1 gamma(k) = (1/G)*sum(-(u[i])^(k-1)/(u[i]-1)^k for i in (1..G-1)) show(1/5 - 3*2/5

[sage-support] Re: Sage Sum vs Python Sum

2016-06-13 Thread saad khalid
Thanks for the help guys! :) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to

[sage-support] Substituting values for variables

2016-06-13 Thread saad khalid
Hey everyone: So, I start by making a symbolic function. Gamma(k) is the sum of some variables, u_i. Generating the function by hand is difficult, so I was hoping I could make it so that Sage generates the function and then I can give values for the u_i's, and have it compute the value for me.

[sage-support] Re: Sage Sum vs Python Sum

2016-06-11 Thread saad khalid
Is there a reason this is appearing in my post? I can't tell if this is a glitch or something. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[sage-support] Sage Sum vs Python Sum

2016-06-11 Thread saad khalid
Hey everyone: So, I was trying to compute this sum symbolically, and then make it so that I could plug in values for u later. I don't think that it's possible using the Sage sum, though it works with the python sum. This is my attempt to do it using a Sage sum: reset() var("G") G = 5 u =

[sage-support] Re: Getting Sage to give symbolic output with Variables

2016-06-07 Thread saad khalid
Thank you for the information! Yeah, it's working just fine now, I have no idea why it wasn't working before. Maybe it was because I hadn't reset y before trying to define it as a ring, I'm not too sure. But, it's working now on a fresh worksheet, so thank you! -- You received this message

[sage-support] Re: Getting Sage to give symbolic output with Variables

2016-06-02 Thread saad khalid
Thanks for the quick reply! Could you explain, or tell me what to search, what exactly "SR("y%s"%i)" does? Is SR Symbolic Ring? Also, the output for the sum is close to perfect, though it gives me: y1 + y10 + y11 + y12 + y13 + y14 + y15 + y16 + y17 + y18 + y19 + y2 + y20 + y3 + y4 + y5 + y6 +

[sage-support] Re: Getting Sage to give symbolic output with Variables

2016-06-02 Thread saad khalid
As another example, here is something I found in Mathematica: In: Sum[f[i], {i, 1, 5, 2}] Out: f[1] + f[3] + f[5] In this case, I believe it is treating f as a function, which is fine as I will eventually be writing y as a function. I just didn't know how I should define y in Sage so that it

[sage-support] Re: How to run Macaulay2 code through Sage interface

2016-06-02 Thread saad khalid
Not sure if this is helpful: http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/macaulay2.html Sage also has some functions that do the same thing as M2 (I believe they run on Singular). For eg, Groebner basis:

[sage-support] Getting Sage to give symbolic output with Variables

2016-06-02 Thread saad khalid
Hey everyone: So, there are some infinite sums that I would like to see computed out to around 20 terms, just so I can kind of see what form its taking. The problem is that it's a bit difficult to do by hand, and I'll be changing the parameters several times which means I would have to do it

[sage-support] Series expansion is incorrect?

2016-05-24 Thread saad khalid
Hey everyone: So, I have the following function: (2t^3+1)/((t^2+t+1)^2(t-1)^2) I want to take get the Laurent series expansion of it. It can be seen through Wolfram Alpha here: http://www.wolframalpha.com/input/?i=laurent+series+expansion+of+%282t^3%2B1%29%2F%28%28t^2%2Bt%2B1%29^2%28t-1%29^2%29

[sage-support] Re: Speed comparison to Mathematica

2016-05-03 Thread saad khalid
Thanks everyone for the responses. I guess I didn't know if there would be a speed difference between Cython and Mathematica the way there's a difference between C and Java(Even if it's less pronounced). I like the idea of implementing it in Sage to get a better grasp of sage/open-source

[sage-support] Speed comparison to Mathematica

2016-04-29 Thread saad khalid
Hey guys: I wasn't sure where to ask this, so I thought I'd put it here. I've got a fairly long algorithm that I've written in Mathematica. I was wondering, do you think there would be a speed increase if I were to program it into Sage? What are some tips for a speed increase? I was thinking

[sage-support] Re: Calculation of basis taking over 12 hours?

2016-03-30 Thread saad khalid
Also, I was wondering, does Sage use Singular for all groebner basis calculations? I was reading that FGb has a much faster implementation: http://www-salsa.lip6.fr/~jcf/FGb/index.html I can't seem to find out anywhere if we have any implementation of the F4/F5 algorithms through FGb. If we

[sage-support] Re: Calculation of basis taking over 12 hours?

2016-03-30 Thread saad khalid
Oh wow... so there's a possibility that the calculation might take million of years for what I'm trying to do? Or there some easy way to approximate how long it will take based off of how many variables I have? Thank you! -Saad On Wednesday, March 30, 2016 at 2:35:07 PM UTC-5, mmarco wrote: >

[sage-support] Calculation of basis taking over 12 hours?

2016-03-30 Thread saad khalid
Hello everyone! I'm trying to run macauly through sage(it won't work properly on my own laptop, I think that some of the calculations take up too much ram and crash my laptop). Anyways, so everything has worked fine except calculating the groebner basis in this one case. Note that this crashed

[sage-support] Partial differentiation on Sage

2016-02-29 Thread saad khalid
Hey everyone. So, here's the problem I have: z = x^2 + y^2 x = r*cos(theta) y = r*sin(theta) I need to calculate the partial derivative (dz/dx) while holding r constant. I was hoping I could define all of those functions and then just use the derivative command, but it doesn't seem to work the

[sage-support] Developing Sage on SMC

2016-02-24 Thread saad khalid
Hey everyone: So, I'm hitting a bit of a wall trying to edit Sage on SMC. I'm following this tutorial: https://github.com/sagemathinc/smc/wiki/SageMath-Development-on-SageMathCloud In step 4, it says to sage-dev-images/sage-6.8.beta3 obviously changing it to the appropriate version number.

[sage-support] Re: Contribute to sage

2016-02-24 Thread saad khalid
Hey! I'm in the same boat as you! If you go on trac, at the upper right side, you can click "View Tickets." When the page loads, one of the options is "Open Beginner Tickets." I believe that should be what you're looking for! Alternatively, if there are certain functions that you have wanted to

[sage-support] Re: Getting a Symbolic version of a Sum

2016-01-30 Thread saad khalid
Thank you for that! I didn't know you could bring up the mail list that way. But that's very promising I think! On Thursday, January 28, 2016 at 8:06:16 AM UTC-6, slelievre wrote: > > > > Le mercredi 27 janvier 2016 05:23:45 UTC+1, saad khalid a écrit : >> >> I

[sage-support] Re: Getting a Symbolic version of a Sum

2016-01-26 Thread saad khalid
I asked the list and here was the response I got. Personally, I think that it would be a good idea, but I don't know how to implement it myself. "The besselexpand is an option variable in maxima core (part of the bessel function package) and simplify_sum is a share package. In general I think

[sage-support] Re: Getting a Symbolic version of a Sum

2016-01-20 Thread saad khalid
Thanks everyone! I do think that it would be ideal if this were "automagically" converted to more elementary functions, especially from the perspective of a student who is trying to get his peers to use Sage. Some thoughts on this: 1. Would it be possible to implement in simplify_full() to,

[sage-support] Documentation for function

2016-01-18 Thread saad khalid
Hello! I was having a bit of trouble. I was trying to view the documentation for the exact_rational() command, however nothing I seemed to do worked. I tried doing "exact_rational()?", "exact_rational?", etc. How exactly can I go about viewing its documentation? I'm running this in SMC. -Saad

[sage-support] Getting a Symbolic version of a Sum

2016-01-18 Thread saad khalid
Hello everyone: I'm trying to compare some functionality in Sage with that of Mathematica. For my assignment, I have to take this series: sum((-1)^n*((x)^(2*n+1))/factorial(2*n+1),n,0,oo) And put it into a mathematical software to see what function it is equivalent to. In this case, this

[sage-support] Using elements from matrix in equation?

2016-01-01 Thread saad khalid
Hey everyone: For what I'm working on, I'm trying to take transform two variables over a matrix A, and then have the transformed variables plug into a function. reset() n = var("n") x = var("x") j = var("j") k = var("k") y = var('y') z = var('z') A = lambda n,j: (matrix([[cos(2*pi/n),

[sage-support] Sage Cloud won't Print as PDF

2015-09-06 Thread saad khalid
Hello everyone. I tried using Sage Cloud to write up a little report about the Q-Polygamma function. However, when i tried to print it as PDF, I got the error: Cannot GET /ed958656-69d9-4ad5-994d-365191c40c28/raw/q-polygamma%20inconsistent%20on%20mathematica.pdf?nocache=0.905481456043941 I'm

[sage-support] Re: Variable not being found

2015-09-03 Thread saad khalid
Thank you so much for your help. One last issue, I believe. Or rather, it's a lacking in my understanding. So, I have this: sage: Phi = lambda x,q: -ln(1-q) + ln(q)*sum((q^(n*x)/(1-q^n)),n,1,15) And I run both of your recommendations: plot(Phi(z,2/3),(z,1,2)) plot(lambda z:

[sage-support] Re: Variable not being found

2015-09-03 Thread saad khalid
Thank you so much for your help. One last issue, I believe. Or rather, it's a lacking in my understanding. So, I have this: sage: Phi = lambda x,q: -ln(1-q) + ln(q)*sum((q^(n*x)/(1-q^n)),n, 1,15) And I run both of your recommendations: plot(Phi(z,2/3),(z,1,2)) plot(lambda z:

[sage-support] Re: Variable not being found

2015-08-31 Thread saad khalid
I see, thank you for pointing that out. I ran the sum up to n = 5, just for testing, and I was able to run: Phi(.1,2/3) And have it return: mpf('-2.0635259684891158') My code now looks like this: var('q') var('n') var('z') Phi = lambda x,q: -ln(1-q) + ln(q)*sum((q^(n*x)/(1-q^n)),n,1,5)

[sage-support] Variable not being found

2015-08-29 Thread saad khalid
Hello everyone. I'm trying to write a function for the q-polygamma function. I'm getting the formula from this: http://ami.ektf.hu/uploads/papers/finalpdf/AMI_37_from95to100.pdf It's at the bottom of page 97(page 3 of pdf). Here is the code I'm running: var('q') var('n') var('z') Phi = lambda

[sage-support] Re: show_identifier() function in Sage Cloud shows pre-defined variables?

2015-08-19 Thread saad khalid
, 2015 at 5:14:17 PM UTC-5, saad khalid wrote: I was following along in the sage tutorial for showing variables: http://doc.sagemath.org/html/en/reference/misc/sage/misc/session.html I tried running the show_identifier() command in a new worksheet on Sage Math Cloud, and I got a very long list

[sage-support] Re: show_identifier() function in Sage Cloud shows pre-defined variables?

2015-08-17 Thread saad khalid
Thank you! I've never actually gotten to work on a ticket, so maybe I'll be able to take a look at this one tonight and see if I can do anything about it. On Sunday, August 16, 2015 at 5:14:17 PM UTC-5, saad khalid wrote: I was following along in the sage tutorial for showing variables

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-17 Thread saad khalid
I see, thank you again! I tried editting bits of your code to see why mine wasn't working. It seems as though the main difference between our code is that you import * whereas I was doing import qgamma. When I run my code with import *, it works for some reason. Would you happen to know why

[sage-support] Re: show_identifier() function in Sage Cloud shows pre-defined variables?

2015-08-16 Thread saad khalid
defined. On Sunday, August 16, 2015 at 5:14:17 PM UTC-5, saad khalid wrote: I was following along in the sage tutorial for showing variables: http://doc.sagemath.org/html/en/reference/misc/sage/misc/session.html I tried running the show_identifier() command in a new worksheet on Sage Math

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-16 Thread saad khalid
Just for clarification, how did you know from looking at the line qgamma(z+ 1,q) that q was supposed to be the first argument given? Because they put their variable q in second. Just to double check with wolframalpha, I ran it here:

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-16 Thread saad khalid
Thank you so much for your help! I'm sorry for the lack of clarity, I will work on that. I really appreciate the help everyone gave, thanks again! -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving

[sage-support] Re: Plotting a q analogue function as a challenge?

2015-08-15 Thread saad khalid
I did this code: from mpmath import * plot(qgamma((.5,x), (x, 0, .99))) I'm just trying to get a 2D plot for x =.5, with q going from 0 to .99. -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving

Re: [sage-support] Plotting a q analogue function as a challenge?

2015-08-14 Thread saad khalid
On Friday, August 14, 2015 at 1:13:53 AM UTC-5, jori.ma...@uta.fi wrote: On Thu, 13 Aug 2015, saad khalid wrote: I'm currently trying to get support from my professors in order for our school to move from Mathematica to Sage Math. One of them challenged me to - - What should we

Re: [sage-support] Plotting a q analogue function as a challenge?

2015-08-14 Thread saad khalid
The error ended up being that I had tried to plot it in 3d first, which required the call q,x = var('q,x'), which messed up my calls to x later. At least, I think that was the cause. Either way, doing reset() fixed the problem. The error now is that apparently there's no convergence... it says

Re: [sage-support] Plotting a q analogue function as a challenge?

2015-08-14 Thread saad khalid
Huh... for some reason, now I'm getting a totally different error, I didn't even change anything. So strange. It's saying: TypeError: cannot convert 0.500 to an integer -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe

[sage-support] Plotting a q analogue function as a challenge?

2015-08-13 Thread saad khalid
Hello everyone: I'm currently trying to get support from my professors in order for our school to move from Mathematica to Sage Math. One of them challenged me to simply plot the q-gamma function on sage math, which he does on Mathematica simply by calling on the QGamma function. Here is some

Re: [sage-support] Plotting a q analogue function as a challenge?

2015-08-13 Thread saad khalid
While qgamma isn't a native function, there's a qgamma implementation in mpmath, one of the libraries included in Sage, so: from mpmath import qgamma plot(lambda x: qgamma(4,x), (x, 2, 10)) should give you a plot of gamma_(q=4). Thank you! Though, looking at the documentation, I think

[sage-support] Re: Sage error HELP

2015-08-13 Thread saad khalid
You wrote x = (-5,5), and then you wanted to plot x^n, which is the same as (-5,5)^n. What were you intending with that? I'm assuming you wanted the plots of x^n for x = -5 to x=5? Or were you wanting (-5,5) to be your xmin and xmax? On Thursday, August 13, 2015 at 6:24:25 AM UTC-5, Luis

  1   2   >