Re: [sage-support] What do the different `make ****clean` targets do?

2018-02-13 Thread Michael Orlitzky
On 02/11/2018 08:57 PM, rickhg12hs wrote: > I've built from source to get a performance boost (I hope) and I'd like > to know when I should use the different levels of `make clean`.  In > the top-level make file I see, "misc-clean, bdist-clean, clean, > distclean, build-clean, bootstrap-clean,

Re: [sage-support] Simplifying symbolic expression with radicals

2017-10-16 Thread Michael Orlitzky
On 10/16/2017 04:21 PM, Emily G wrote: > > (*2* + sqrt(*2*))/(*1* + sqrt(*2*)) > > The above example should simplify to sqrt(2), > but simplify_full() and canonicalize_radical() don't work. Is there a > way that I can get Sage to simplify such expressions? > This gets the result that you want,

Re: [sage-support] Issue with ticket number #29146

2017-03-04 Thread Michael Orlitzky
On 03/03/2017 08:32 AM, Ashutosh Ahelleya wrote: > > No. I guess the back end does return a complex parameter in cases where the > answer is a complex solution. > This might be an appropriate example: > { { sage: > x = var('x') > eq = x^2 -3*x + 4 > solve(eq,x) > [x == -1/2*I*sqrt(7) + 3/2, x

Re: [sage-support] Issue with ticket number #29146

2017-03-03 Thread Michael Orlitzky
On 03/02/2017 10:57 PM, Ashutosh Ahelleya wrote: > Hello, > > I am interested in solving the documentation error having ticket number > #29146 but I have a doubt. > > In the description of ticket number #29146 > , I feel within the domain of x > that is

Re: [sage-support] simplifying radicals of trigonometric expressions

2017-01-15 Thread Michael Orlitzky
On 01/14/2017 03:42 AM, Enrique Artal wrote: > This is true. The problem is that if not used, simple expressions keep to > be too much complicated. Is there any compromise? > There is simplify_full() which should be safe for all expressions, and simplify_real() that assumes everything is real. T

Re: [sage-support] Displaying graphics from a Sage script

2017-01-13 Thread Michael Orlitzky
On 01/13/2017 06:50 PM, John H Palmieri wrote: > This question comes from > http://stackoverflow.com/questions/41638257/graphics-in-sage-script: if I > have a file "foo.sage" and I want to run "sage foo.sage" and have it pop up > a window displaying a plot, how do I do this? > > For example, if

Re: [sage-support] simplifying radicals of trigonometric expressions

2017-01-13 Thread Michael Orlitzky
On 01/13/2017 05:12 AM, Enrique Artal wrote: > I would like to know how to handle with this issue. Consider a function > f=sqrt(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6). It is possible to deal with > this function for standard procedures like numerical_integral in (-1,1). > If one considers f.canonicali

Re: [sage-support] Re: Plotting long functions

2016-12-29 Thread Michael Orlitzky
On 12/29/2016 04:46 AM, Fjordforsk A/S wrote: > Thanks Michael. I am plotting it now, and it is just waiting without giving > a crash. > Is it automatically right to use complex_plot command to plot the imaginary > part of the same plot as given below? > It depends, do you expect your function

Re: [sage-support] simplify

2016-12-29 Thread Michael Orlitzky
On 12/29/2016 04:48 AM, Ingo Dahn wrote: > > According to tab completion SageCell doesn't seem to support any other form > of *simplify*. Is there any strategy to combine Sage commands in order to > simplify rational function expressions? Plain "simplify" won't do much on its own. I guess it's

Re: [sage-support] Re: Plotting long functions

2016-12-28 Thread Michael Orlitzky
On 12/28/2016 10:33 AM, Fjordforsk A/S wrote: > This is how its supposed to go: > > sage: plot3d(((1 - (3/8 - 3*t^2 - 2*t^4 - 9*x^2 - 10*x^4 - 12*t^2*x^2) + > i*x*(15/4 + 6*t^2 - 4*t^2 - 2*x^2 - 4*x^4 + 8*t^2*x^2))/(1/8*(3/4 + 9*t^2 + > 4*t^2+ 16/3*t^6 + 33*x^2 + 36*x^24 + 16/3*x^6)))*e^(i*x)),

Re: [sage-support] Plotting long functions

2016-12-28 Thread Michael Orlitzky
On 12/28/2016 07:12 AM, Fjordforsk A/S wrote: > Hello, I am not sure on the reply sage gives me on plotting a long function: > > sage: plot3d(((1 - (3/8 - 3*t^2 - 2*t^4 - 9*x^2 - 10*x^4 - 12*t^2*x^2) + > x*(15/4 + 6*t^2 - 4*t^2 - 2*x^2 - 4*x^4 + 8*t^2*x^2))/(1/8*(3/4 + 9*t^2 + > 4*t^2+ 16/3*t^6

Re: [sage-support] how to force the use of Atlas instead of Openblas during the build of 7.4?

2016-11-04 Thread Michael Orlitzky
On 11/04/2016 05:17 AM, Dima Pasechnik wrote: > Documentation on this is lacking. > It's a ./configure option, --with-blas=atlas. And at least in the near future, a good place for it would be in the error message you get after OpenBLAS fails to compile... -- You received this message because yo

Re: [sage-support] linear solutions

2016-09-10 Thread Michael Orlitzky
On 09/10/2016 04:41 PM, Anton Sherwood wrote: > I haven't guessed the right keywords. How do I solve a set of linear > equations in which the coefficients are symbolic expressions like > a^2-sqrt(b)? > Try creating vectors/matrices over the symbolic ring "SR", and then use solve_left or solve_

Re: [sage-support] Substituting values for variables

2016-06-16 Thread Michael Orlitzky
On 06/13/2016 11:02 AM, saad khalid wrote: > 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 f

Re: [sage-support] Re: sqrt(x) * sqrt(y) versus sqrt(xy)

2016-05-25 Thread Michael Orlitzky
On 05/24/2016 10:14 PM, Vincent Delecroix wrote: >> >> What about sqrt(2*x^16 + 10*x^11 - 9*x^10 + x^7 + x^4 - 17*x^2 - x)? >> > > What is the problem with this expression? It is very easy to decide the > sign of any polynomial expression in one variable on any given interval. But how much comput

Re: [sage-support] Re: sqrt(x) * sqrt(y) versus sqrt(xy)

2016-05-24 Thread Michael Orlitzky
On 05/24/2016 10:20 AM, Vincent Delecroix wrote: > > The above is coherent. But I would prefer if simplify_real would raise > an error if some argument of sqrt has a chance to be < 0. > What about sqrt(2*x^16 + 10*x^11 - 9*x^10 + x^7 + x^4 - 17*x^2 - x)? -- You received this message because y

Re: [sage-support] Re: sqrt(x) * sqrt(y) versus sqrt(xy)

2016-05-24 Thread Michael Orlitzky
On 05/24/2016 09:55 AM, Vincent Delecroix wrote: > Well > > sage: (sqrt(-x) * sqrt(x) * sqrt(-x) * sqrt(x)).simplify_real() > -x^2 > If you're sure that every expression involved is real, that's still the correct answer, because x == 0. If sqrt(x) or sqrt(-x) might not be real, you're going to g

Re: [sage-support] sqrt(pi)*sqrt(n) != sqrt(pi*n)

2016-05-10 Thread Michael Orlitzky
On 05/10/2016 04:56 PM, Vincent Delecroix wrote: > still > > sage: n = SR.var('n') > sage: assume(n, 'real') > sage: assume(n >= 0) > sage: bool(sqrt(pi)*sqrt(n) == sqrt(pi*n)) > False > What `bool(expr1 == expr2)` does is something like, bool((expr1 - expr2).simplify_full() == 0) As long as

Re: [sage-support] sqrt(pi)*sqrt(n) != sqrt(pi*n)

2016-05-10 Thread Michael Orlitzky
On 05/06/2016 09:50 PM, Marc Tardif wrote: > Hi folks, > > When comparing the product of two square roots to the square root of > the product using two scalars, I get True: > > sage: bool(sqrt(pi)*sqrt(2) == sqrt(pi*2)) > True > > But when using a variable instead of one of the scalars,

Re: [sage-support] Re: is_prime() error

2016-04-05 Thread Michael Orlitzky
On 04/05/2016 01:03 PM, William Stein wrote: > > I think we should change is_prime for rational numbers, since people > get confused by this so much. > > How? Pretty much any change at all would be better than the current > situation. Options I can think of: > > - make is_prime([rational]) rai

Re: [sage-support] Moore–Penrose pseudoinverse?

2016-03-24 Thread Michael Orlitzky
On 03/24/2016 10:44 AM, Jeroen Demeyer wrote: > Does anybody know of an implementation of the Moore–Penrose > pseudoinverse (a generalised inverse for matrices) in Sage? I couldn't > find anything, but just in case I RTFM badly or it's known under some > different name, I ask here. > I looked

Re: [sage-support] Linear algebra and least squares regression

2016-03-02 Thread Michael Orlitzky
On 02/29/2016 10:19 PM, Emerson Misch wrote: > I am new to sage and have little knowledge of its computing power and am > interested in the coding for a few things. > > 1) Creating a vector space V over the field of Svalbard (all reals) or C of a > given dimension n. sage: VectorSpace(RR,n) o

Re: [sage-support] console prompt color

2016-01-27 Thread Michael Orlitzky
On 01/26/2016 10:17 PM, Volker Braun wrote: > On Tuesday, January 26, 2016 at 5:09:52 PM UTC-5, Michael Orlitzky wrote: > > You're just using "reasonable" to mean "has the color scheme I like." > > > That black text on white background is the most

Re: [sage-support] Writing 'n' variables in Sagemath linux ubuntu

2016-01-27 Thread Michael Orlitzky
On 01/27/2016 12:47 AM, Jori Mäntysalo wrote: > If I understood this, isn't > > var(['a'+str(i) for i in range(1,4)]) > > what is wanted? It will make a1, a2 and a3 to variables. > Yeah, but then you can't reference them later. -- You received this message because you are subscribed to the Go

Re: [sage-support] console prompt color

2016-01-26 Thread Michael Orlitzky
On 01/26/2016 03:30 PM, Volker Braun wrote: > On Tuesday, January 26, 2016 at 12:16:01 PM UTC-5, Michael Orlitzky wrote: > > The default should be NoColor, since whatever color scheme we choose is > going to be awful for a large number of users. > > > I disagree,

Re: [sage-support] Re: [sage-edu] Writing 'n' variables in Sagemath linux ubuntu

2016-01-26 Thread Michael Orlitzky
> On Tue, Jan 26, 2016 at 3:01 AM, Usman Afzal wrote: >> If I want to write one variable, the command is >> x=var('x') >> >> But I want to write "n" variables namely x1, x2, . . . , x(n). How can I >> write this? This is http://trac.sagemath.org/ticket/11576, but it's dead in the water. I still m

Re: [sage-support] console prompt color

2016-01-26 Thread Michael Orlitzky
On 01/24/2016 03:03 PM, Jagdpanther wrote: > I just compiled SageMath 7.0. Both the console and notebook interface > seem to work well. I use a dark gray background in my xterm (uxterm) > window where I run sage (console) and the dark blue "sage:" prompt is > hard to see. How do I change the c

Re: [sage-support] compile sage from source to link to existing applications

2016-01-26 Thread Michael Orlitzky
On 01/26/2016 01:13 AM, bernard ck Wong wrote: > Hi, I am wondering if it is possible to compile Sage from source and > configure it in such a way that it will use software that is already > installed in my system instead of building the bundled ones? For > example, I have R, Singular and Maxima al

Re: [sage-support] Re: Server and certificate chain

2015-11-12 Thread Michael Orlitzky
On 11/12/2015 12:00 AM, kcrisman wrote: > > Can Sagenb send certificate chain instead of just certificate of the > server itself? If yes, how? > > If not, what do you use as a frontend? Apache? > > > Cc:ing someone who may know this; I don't know anything about the > certificates. >

Re: [sage-support] Where is possible to view the code of one command? for example: lagrange_polynomial?

2015-10-05 Thread Michael Orlitzky
On 10/05/2015 10:05 AM, Dmitrij Moreinis wrote: > Hi everyone, where it is possible to find the code of each command or > maybe documentation? For example lagrange_polynomial. How can one see > the function code, but documention would be better. Thank you in advance. > Type the function name foll

Re: [sage-support] Interpolation in Sage

2015-07-22 Thread Michael Orlitzky
On 07/22/2015 04:04 PM, Santanu Sarkar wrote: > Hello, >I want to find a polynomial f(x_1,x_2,x_3,x_4) explicitly > by interpolation. I know that the degree of f is 2. I have enough data > points. How can I do this in Sage? > I have some code to do this here: http://michael.orlitzky.com/git

Re: [sage-support] What is wrong with this SAGE function?

2015-06-04 Thread Michael Orlitzky
On 06/04/2015 05:53 PM, Phoenix wrote: > > Thanks! > > Is there otherwise any standard operation in SAGE to create such vectors? > If the construction isn't too complicated, a "list comprehension" usually suffices. This will do what you want, I think: def elem(i,n): return [ ZZ(i == j)

Re: [sage-support] Decimal Answers

2015-05-11 Thread Michael Orlitzky
On 05/11/2015 03:40 PM, Selah Bryce wrote: > Thank you. It gave me 9.13877574435632e10. What does that mean? > It means 9.13877574435632 times 10^10, or 91387757443.5632. The "e10" at the end is scientific notation. I don't know where the 'e' came from, but I would guess it stands for "exponent"

Re: [sage-support] convert rationals to reals in symbolic expression

2015-05-07 Thread Michael Orlitzky
On 05/07/2015 11:19 AM, Douglas Davis wrote: > Is there a way to convert a symbolic result from using rational expressions > and constants to the corresponding expression using reals? > > For example if I have a result of > > -15/28*2^(2/3)*a*hh^2+32/pi*b^3 > > I need to convert it to > > -0.8

Re: [sage-support] difference between SR.symbol and SR.var

2015-04-10 Thread Michael Orlitzky
On 04/10/2015 05:09 PM, Daniel Krenn wrote: > Can someone explain me the difference between SR.symbol and SR.var ? > > (BTW: SR.symbol does not have a description) > SR.symbol is faster, but only lets you declare one variable at a time. SR.var will parse a string, so something like SR.var('x,y')

Re: [sage-support] Re: How to turn off colored prompt?

2015-02-06 Thread Michael Orlitzky
On 02/06/2015 08:49 PM, P Purkayastha wrote: > The colors are controlled by ipython. You can run the following to create a > default profile and get the path to the configuration file > > ~» sage -ipython profile create default > > Inside the file there is a color configuration. See this website

Re: [sage-support] How to close a plot.

2015-01-29 Thread Michael Orlitzky
On 01/28/2015 10:27 AM, Volker Braun wrote: > On Wednesday, January 28, 2015 at 4:18:50 PM UTC+1, kcrisman wrote: >> Does anyone think this might be useful to add to the FAQ or documentation > (if so, where?)? > > IMHO we should not make any guarantees about the behavior of showing plots > besi

Re: [sage-support] Real symbolic variable

2015-01-29 Thread Michael Orlitzky
On 01/29/2015 06:14 PM, Christophe Bal wrote: > Hello. > > Indeed, I just want to define complex number via the algebraic form z=a+i*b. > > expr.simplify_real() will be a great tool. I will be patient... > > It's actually already there, but at moment all you'll get out of it is abs(x) == sqrt(

Re: [sage-support] Real symbolic variable

2015-01-29 Thread Michael Orlitzky
On 01/28/2015 03:56 PM, Christophe Bal wrote: > Hello. > > How can I define a symbolic variable that is a real number ? Therer is an > optional argument real in the latest versions of Sympy but this not work in > Sage. > There isn't much support for declaring a variable real in Sage. By default

Re: [sage-support] How to close a plot.

2015-01-22 Thread Michael Orlitzky
On 01/22/2015 07:14 AM, xeno 20150131 wrote: > > > Hi group, > > A simple question (if the answer is just rtfm, just say so). I am opening > a plotting window (In a script that I am attaching to a notebook with say – > > show(plot(sin(x))) Something like this works, but I broke my sage

[sage-support] Spectral decomposition / factorization

2014-10-29 Thread Michael Orlitzky
I have a symmetric real matrix 'A', and I need to factorize it as X(X^T). An n-by-k X where k=rank(A) would be ideal, but a square X with zeros is fine too. Is there a built-in method I'm not seeing? Or something simpler than looping through the eigenvectors? -- You received this message because

Re: [sage-support] How to create and use lists of variables?

2014-10-29 Thread Michael Orlitzky
On 10/28/2014 10:47 PM, smohamm...@gmail.com wrote: > Thank you so much! I'm sorry I couldn't answer earlier. It worked as I > expected. Now as the last question on this discussion, do I need to use > 'SymbolicSequence', when I want to numerically solve a large ODE system? > I tried to use instruct

Re: [sage-support] How to create and use lists of variables?

2014-10-25 Thread Michael Orlitzky
On 10/25/2014 11:40 PM, smohamm...@gmail.com wrote: > Thank you Michael, I loaded the file and succeeded to make a list of > symbols. But now and after evaluating my expression in terms of its > elements, how should I assign them different values I want the > expression to be calculated for? (see

Re: [sage-support] How to create and use lists of variables?

2014-10-24 Thread Michael Orlitzky
On 10/22/2014 01:22 PM, smohamm...@gmail.com wrote: > Hello to every one, > I am a *primitive *sage user and I want to produce a function of n > variables (|x[1],x[2],...,x[n]|), in nested 'for' loops. I've searched > in sage's documentation, but I have still 2 problems: > 1. How to define a list o

Re: [sage-support] Re: Strange characters in sage terminal

2014-08-18 Thread Michael Orlitzky
On 08/18/2014 04:05 PM, Oscar Lazo wrote: > Yes, I ran uxterm and I still see strange characters there. Any ideas? > > Thank you, > You also need to be using a font which supplies those glyphs. I think the DejaVu family should have them if you want to test using that. -- You received this mess

Re: [sage-support] Options for the Sage expand function

2014-06-14 Thread Michael Orlitzky
On 06/14/2014 12:43 AM, jeanbigbo...@gmail.com wrote: > I am coming up to speed on Python, Sympy, and Sage by doing some simple > problems on all three. Sympy has an option for its expand function, > complex=True, that has made some of my expressions easier to read/use. > I'm working with quotient

Re: [sage-support] legend

2014-04-17 Thread Michael Orlitzky
On 04/17/2014 06:32 AM, HG wrote: > > Hi, > I do a plot with **params which is quiete usefull to have it as a > compact style. > After googling a lot I was trying to see if one can do the same with > **legend ? or other keyword ? > I didn't find any answer, is it possible ? > it would be easie

Re: [sage-support] Plotting equation of two perpendicular lines

2014-04-16 Thread Michael Orlitzky
On 04/16/2014 05:35 AM, omid habibi wrote: > Thanks for reply, Can you tell me how should I change the ratio? > > On Wednesday, April 16, 2014 1:40:04 PM UTC+4:30, John Cremona wrote: > > For both graphs you have set the x-range to -10..10 but the y-ranges > are different, and the graph h

Re: [sage-support] Zero power zero

2014-04-16 Thread Michael Orlitzky
On 04/16/2014 08:08 AM, Jori Mantysalo wrote: > print 0^0 > var('n') > simplify(0^n) > > prints > > 1 > 0 > > Is this a bug or feature? > Bug, 0^0 is undefined in Maxima but 0^x is 0. In Sage we've standardized on 0^0 == 1. -- You received this message because you are subscribed to the Goog

Re: [sage-support] bool function fails!?

2014-04-13 Thread Michael Orlitzky
On 04/13/2014 12:16 PM, Daniel Edler wrote: > I wanted to show that two equations are equal so I used the bool() > function. Unfortunately sage (6.1.1) do not see that it is equal but > obviously they are. If I replace log(x) with -log(1/x) it works and the > replacement itself is also true for sag

Re: [sage-support] Polynomial question.

2013-12-11 Thread Michael Orlitzky
On 12/11/2013 07:40 AM, Thierry Dumont wrote: > > Ok, this is correct, and seems nice; but I want to evaluate these > polynomials for different values of x, and you cannot evaluate a member > of "Integer Ring" at say, x=1/21... So I need to compute the parent of > polynomials (which possibly are

Re: [sage-support] Evaluate all expressions

2013-09-27 Thread Michael Orlitzky
On 09/26/2013 03:13 PM, Michael Orlitzky wrote: > On 09/25/2013 03:24 PM, Bassie wrote: >> Hello >> >> Can you evaluate all expressions at one? Like say, if i made a >> mistake 5 expressions before my last expression, and this mistake is >> reapeated in all the

Re: [sage-support] Evaluate all expressions

2013-09-26 Thread Michael Orlitzky
On 09/25/2013 03:24 PM, Bassie wrote: > Hello > > Can you evaluate all expressions at one? Like say, if i made a > mistake 5 expressions before my last expression, and this mistake is > reapeated in all the 5 last expressions, do I have to evaluate all 5 > expressions? > When you have enough cod

Re: [sage-support] sin(x)/cos(x)

2013-06-12 Thread Michael Orlitzky
On 06/11/2013 10:44 PM, robin hankin wrote: > OK thanks for this, bug reported [at least, I think it is. I > couldn't see it on trac]. > > Now what about this: > > > sage: solve(sin(x) + cos(x) == cos(2*x),x,to_poly_solve=True) > [x == 2*pi*z264, x == 2*pi*z268 + 1/6004799503160661*I - 355/4

Re: [sage-support] sin(x)/cos(x)

2013-06-11 Thread Michael Orlitzky
On 06/11/2013 07:26 PM, robin hankin wrote: > OK Michael, thanks for this. > > But my problem was > > solve(sin(x)/cos(x)==1,x,to_poly_solve="force") > > > returns an empty solution set, implying that there are no solutions > when in fact there are. Surely this is misleading? > > Worthy of a

Re: [sage-support] sin(x)/cos(x)

2013-06-11 Thread Michael Orlitzky
On 06/11/2013 04:43 PM, robin hankin wrote: > hello. Sage 5.9: > > sage: solve(sin(x)/cos(x)==1,x,to_poly_solve="force") > [] > > > > I find this unexpected because pi/4 is a solution, and sage seems to > indicate that there are no solutions. > > > Sage can handle the equation if I do some

Re: [sage-support] Quickly compute signs of eigenvalues

2013-05-21 Thread Michael Orlitzky
On 05/20/2013 05:19 PM, Theo Belaire wrote: > I have a large computation where I need to compute the number of > positive eigenvalues of a matrix. I am currently computing all the > eigenvalues then counting how many are positive, but I see when > profiling that "{method 'roots' of > 'sage.rings.po

Re: [sage-support] Re: Maxima-in-Sage versus plain Maxima

2013-03-04 Thread Michael Orlitzky
On 03/04/2013 11:10 AM, Jeroen Demeyer wrote: > Fair enough, but what if I want the "domain: real" behaviour in Sage? In > other words, what should do to have (abs(cos(t))^2).simplify() return > "cos(t)^2"? > > sage: maxima('domain: real;') > real > sage: var("t") > t > sage: assume(t, "real") > s

Re: [sage-support] Is there a way to factor an expression in terms of a set of variables?

2013-01-09 Thread Michael Orlitzky
On 01/06/13 13:46, Dillon wrote: > Hello, > > I am working on using Sage to help solve a KCL analysis for a > circuit. > > Sage is working great, I've managed to get it to produce the > expressions I need. For future circuit analysis, it would be very > helpful to be able to have Sage factor an e

Re: [sage-support] piecewise

2012-12-01 Thread Michael Orlitzky
On 12/01/2012 09:34 AM, kcrisman wrote: > > > On Friday, November 30, 2012 11:16:48 PM UTC-5, Michael Orlitzky wrote: > > On 11/30/2012 10:12 PM, Jason Grout wrote: > > > > Is there something better? I tried to get piecewise to work, but I > &

Re: [sage-support] piecewise

2012-11-30 Thread Michael Orlitzky
On 11/30/2012 10:12 PM, Jason Grout wrote: > > Is there something better? I tried to get piecewise to work, but I > couldn't plot, integrate, etc., the function. > I've collected a lot of code over the years for working with piecewise functions, but most of it was written before I knew anythin

Re: [sage-support] "Don't know a PDF representation for" alpha in graphics?

2012-11-15 Thread Michael Orlitzky
On 11/15/12 12:12, john_perry_usm wrote: > Hello > > I have created a nice graphic with some alpha. I try to save it. As a > Sage object, I have no problem. The EPS representation doesn't preserve > the alpha. The PNG does, but I'd prefer vector graphics. > > The PDF representation chokes on it.

Re: [sage-support] Re: Indexed variables/functions

2012-11-02 Thread Michael Orlitzky
On 11/01/2012 10:26 AM, Jason Grout wrote: > > Here's a conversation about this: > > https://groups.google.com/forum/?fromgroups=#!searchin/sage-support/Is$20there$20an$20efficient$20method$20of$20producing$20indexed$20variables?/sage-support/qj8q21wr7-0/Qs-Qxr8A0dAJ > > In particular, this is a

Re: [sage-support] About collect-function

2012-11-02 Thread Michael Orlitzky
On 11/01/2012 03:58 AM, Jori Mantysalo wrote: > For example > > (x^5 + x^2+ (5*a)*x^3).collect(x) > > returns > > x^5 + 5*a*x^3 + x^2 > > as I expected, but > > (x^5 + x^2+ (5*a)*x^3 + (10*a^2 + 6*a + 5)*x).collect(x) > > returns > > x^5 + 5*a*x^3 + (10*a^2 + 6*a + 5)*x + x^2 > > How to ord

Re: [sage-support] obtaining coefficient matrix of a set of linear equations

2012-09-09 Thread Michael Orlitzky
On 09/09/2012 02:31 AM, akhil wrote: > Hello, > > > Given a set of m linear equations in n unknowns, how do I use SAGE to > give me the coefficient matrix*A*(size m *n) and column vector *b*(size > m*1) such that Ax = b; where *x*(size n*1) is the vector of unknowns ? It depends on how those equ

Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread Michael Orlitzky
On 09/03/12 14:49, mazkime wrote: > Thank you for your answer and sorry for the typo mistake. > Your solution works well with the example given but doesn't work as I > would like with exponents (x^2, ...). Yeah it's not ideal. I needed to do this with symbolic derivatives, and the method I posted

Re: [sage-support] how to factorize an expression with constant variables ?

2012-09-03 Thread Michael Orlitzky
On 09/03/12 03:26, mazkime wrote: > Hello, > I would like to factorize an expression with sage that contains constant > variables (i.e. parameters), but I cannot figure out how to do that. > > Here is an example : x, y are variables and A is a parameter > > * > var('A x y') >

Re: [sage-support] Possible error of function show when converting formulas to latex style

2012-09-01 Thread Michael Orlitzky
On 09/01/2012 12:25 PM, Joan C wrote: > Hello, > > Don't know if this possible bug has been reported before, I was unable to > find it: > > I use Sage Version 4.5, Release Date: 2010-07-16, with a Ubutu 10.x > (Maverick). > > When I try to solve the next differential equation > Sa

Re: [sage-support] Re: Latex tick labels in plot

2012-06-01 Thread Michael Orlitzky
On 06/01/12 13:26, ObsessiveMathsFreak wrote: > > The problem is that if the tick marks are too close together, the labels > repeat themselves, or seem not to appear. It's very frustrating. For > example try > > P0=plot(x^2,(r,0,2),ticks=[[1,2],[0.5,1]],tick_formatter=latex_ticklabels(x_labels,y

Re: [sage-support] Unintuitive behavior of round()

2012-05-13 Thread Michael Orlitzky
On 05/13/2012 12:50 PM, Lorenzo wrote: > u = sqrt(43203735824841025516773866131535024) We actually have a doctest confirming that it's awful =) This would probably be an easy project. Definition: u.round(self) Source: def round(self): """ Round this expression to the nea

Re: [sage-support] Re: Discrepancy in assumptions and assume

2012-05-11 Thread Michael Orlitzky
On 05/11/12 09:23, kcrisman wrote: > > I've updated the ticket with this. There is still some discussion > there, a year old, about nested expressions... once again, the perfect > has become the enemy of fixing at all. > I haven't looked at this closely, but why not just open another ticket for

[sage-support] Equivalent of init.sage when executing scripts

2012-05-10 Thread Michael Orlitzky
I have a bunch of convenience functions that I've been copying around from place to place. For example, I replace the default plot() with one that uses the 'latex' tick_formatter. I'd like to be able to import these automatically, or at least without having to hard-code the path in all my scripts.

Re: [sage-support] Compiling SAGE - Bizarre ZFS bug?

2012-05-10 Thread Michael Orlitzky
On 05/09/12 21:10, Kevin wrote: > Linux dkar.research.pdx.edu 2.6.18-274.3.1.el5xen #1 SMP Tue Sep 6 20:57:11 > EDT 2011 x86_64 x86_64 x86_64 GNU/Linux > > cp -p ../include/NTL/*.h > /n/oregano.cic.pdx.edu/export/vol-apps/apps-linux-x86_64/user/src/sage-4.8/local/include/NTL > > cp: preserving

[sage-support] Adding constants to the legend

2012-05-04 Thread Michael Orlitzky
Is there a smarter way to add (un-plotted) constants to the legend? Right now I'm just plotting them with linestyle="None". -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more optio

Re: [sage-support] Error in integrate

2012-04-14 Thread Michael Orlitzky
On 04/14/2012 12:04 PM, Laurent Decreusefond wrote: > Dear all, > > here is my problem > > sage: var('t') > t > sage: integrate(e^(-2*t)/sqrt(1-e^(-2*t)),t,0,infinity) > -1 > > ... a negative value for the integral of a positive function. This is a bug in upstream Maxima. I've opened a sage ti

Re: [sage-support] Suppress print from R.inject_variables()

2012-04-10 Thread Michael Orlitzky
On 04/10/2012 08:00 PM, diophan wrote: > I am writing a program that has a big loop that increases the adjusts the > variables in a polynomial ring each time. However each time I create the > polynomial ring with the following: > > R = PolynomialRing(GF(p),strvars) > R.inject_variables() > > Wh

Re: [sage-support] Re: How to substitute a list of equalities into a formula?

2012-04-10 Thread Michael Orlitzky
On 04/09/12 22:18, ancienthart wrote: > Hah. Thanks Michael and P. I first learnt Python in the 1.5 era, so > there's a few of the nice new syntax features I'm still not up to speed on. > Any reason why .subs doesn't accept multiple arguments? Would there be > any point in requesting .subs_expr bec

Re: [sage-support] Re: How to substitute a list of equalities into a formula?

2012-04-08 Thread Michael Orlitzky
On 04/08/2012 03:33 AM, P Purkayastha wrote: > Something like this? > > sage: solns = solve([f.diff(ar) for ar in f.args()],f.args(), > solution_dict=True)[0] > sage: f( *(solns[ar] for ar in f.args()) ) > 0 The `subs_expr` method accepts multiple equations already, so you can shave a few charact

Re: [sage-support] Keeping coefficients as floats when using solve

2012-02-23 Thread Michael Orlitzky
On 02/20/2012 11:35 AM, Burcin Erocal wrote: Or you can do this: sage: t = -2/3*x + 4/3 sage: t._convert(RR) -0.667*x + 1.33 I opened a ticket to make this visible: http://trac.sagemath.org/sage_trac/ticket/12577 Thanks again for the easy solution. -- To post to

Re: [sage-support] Keeping coefficients as floats when using solve

2012-02-20 Thread Michael Orlitzky
On 02/20/12 11:35, Burcin Erocal wrote: > > > Or you can do this: > > sage: t = -2/3*x + 4/3 > sage: t._convert(RR) > -0.667*x + 1.33 > Where were you a few weeks ago? =) Would anyone be opposed to making this a visible method? -- To post to this group, send email to

Re: [sage-support] Keeping coefficients as floats when using solve

2012-02-20 Thread Michael Orlitzky
On 02/20/12 10:39, Michael Orlitzky wrote: > For a workaround, someone recently showed me this. You would call > `symbolic_approx` on your result. Whoops, you'll need this, too: from sage.symbolic.expression_conversions import Converter -- To post to this group, send email to s

Re: [sage-support] Keeping coefficients as floats when using solve

2012-02-20 Thread Michael Orlitzky
On 02/19/12 19:58, Mike wrote: > When I run: > > x,y=var('x,y', domain=RR) > solve(2.0*x+3.0*y==4.0, y) > > I get > > [y == -2/3*x + 4/3] > > but I would like to get > > [y == -0.666*x + 1.3] > > How can I do this? > Wild guess: the float coefficients are coerced to

Re: [sage-support] Numerical approximation of symbolic coefficients

2012-02-05 Thread Michael Orlitzky
On 02/05/2012 11:23 PM, D. S. McNeil wrote: First attempt: loop through each term and try to n() the coefficient. Madness. Based on a suggestion Mike Hansen once gave me -- http://ask.sagemath.org/question/411/substituting-expressions-for-numbers -- I tend to use subclasses of Converter when I

[sage-support] Numerical approximation of symbolic coefficients

2012-02-05 Thread Michael Orlitzky
I've got these polynomials in two variables, `x`, and `u`. The polynomials are low degree (eight at the moment), but I'm working symbolically, so they print exactly: ..+ 314069483520)*sqrt(3) - 80295755776*x + 4831838208)/(1953125*x^63 - 73828125*x^61... All I would really like is to see

Re: [sage-support] Re: reg SAGE

2012-02-01 Thread Michael Orlitzky
On 02/01/2012 02:05 PM, William Stein wrote: It is pretty amazing how incredibly non-newbie-friendly less and more are. We could change ipython or the docstring so it includes a hint at the end of the message, which would make it so we don't have to hack the pager (less), so at least the user k

Re: [sage-support] Fwd: sagemath question re: implicit differentiation

2012-01-20 Thread Michael Orlitzky
-- Forwarded message -- From: storne...@mathisasport.com That's fine, but now I want to solve for dy/dx, so I try: sage: solve(equation2.diff(),diff(f(x),x,1)) /home/stornetta/sage-4.7.2/local/lib/python2.6/site-packages/IPython/iplib.py:2260: DeprecationWarning: Substitution usi

Re: [sage-support] Issues with bessel function.

2012-01-19 Thread Michael Orlitzky
On 01/19/2012 05:57 PM, Eric Kangas wrote: I have worked with bessel functions before and haven't had a problem until now. Code: - r,p,z,ro,gro,g,k = var('r, p, z,ro,gro,g,k') g = 1; k = 1; ro = 1; gro = 1 def Psi(r,z): return lambda r,z: (r*bessel_J(1, g*r))/(ro*bessel_J(1, gro))*cos(k*z)

Re: [sage-support] Minor issue: Polynomial simplify, square roots

2012-01-19 Thread Michael Orlitzky
On 01/17/2012 04:54 AM, Jori Mantysalo wrote: After saying R. = PolynomialRing(QQ) both of these works: expand ( (t-(5-sqrt(7))) * (t-(5+sqrt(7))) ) expand ( (t-(5-sqrt(7))) * (t-(5+sqrt(7))) ) and I got t^2 - 10*t + 18 and t^2 - 4*t + 1 as expected. However, expand ( (t-(2-sqrt(3))) * (t-(

Re: [sage-support] Re: Simplifying log expressions

2012-01-18 Thread Michael Orlitzky
On 01/15/12 13:18, JamesHDavenport wrote: > Thanks. Given that, here's the sagenb (4.7.2) version, showing the bug > (wrong when t is negative real): > sage: t=var('t') > sage: f=(1/2)*log(2*t)+(1/2)*log(1/t) > sage: f.full_simplify() > 1/2*log(2) I created a ticket for this here: http://trac.s

Re: [sage-support] Re: Simplifying log expressions

2012-01-13 Thread Michael Orlitzky
On 01/13/2012 07:38 PM, JamesHDavenport wrote: Unfortunately, full_simplify has its own problems, notably with branch cuts. sage: f = (1/2)*log(2*t) + (1/2)*log(-t) sage: f.full_simplify() 1/2*log(2) In my session, I had the difference of two logarithms. In yours above, you've got the sum. Is

Re: [sage-support] Simplifying log expressions

2012-01-12 Thread Michael Orlitzky
On 01/12/12 17:16, Tom Judson wrote: > I would like to simplify the difference of two log expressions to show > that I get a constant, but > > simplify((1/2)*log(2*t) - (1/2)*log(t)) > > just returns the expression. Does anyone know of an easy fix for > this? Preferably, I would like something

Re: [sage-support] Re: Problems with rank and HasseDiagram

2012-01-11 Thread Michael Orlitzky
On 01/11/2012 03:25 PM, Raymond N. Greenwell wrote: Adding "format='adjacency_matrix') doesn't change anything. I still don't understand why the rank function isn't working on this Hasse diagram and how to make it work. It works fine in the example on the page I quoted. I disagree about the arr

Re: [sage-support] Problems with rank and HasseDiagram

2012-01-10 Thread Michael Orlitzky
On 01/10/2012 09:17 PM, Michael Orlitzky wrote: We could do a lot better here -- I had to read the source for DiGraph.__init__ -- but it looks like when you called DiGraph(m), it considered 'm' to be an adjacency matrix. Or maybe I'm just bad at looking. DiGraph() is actual

Re: [sage-support] Problems with rank and HasseDiagram

2012-01-10 Thread Michael Orlitzky
On 01/10/2012 11:37 AM, Raymond N. Greenwell wrote: Hello everyone! I tried using the HasseDiagram and rank features of Sage as described on http://www.sagemath.org/doc/reference/sage/combinat/posets/hasse_diagram.html Things worked ok, but when I then tried: m= Matrix([[0,1,1],[0,0,1],[0,0,0]

Re: [sage-support] Re: Solving differential equations with unit_step?

2012-01-10 Thread Michael Orlitzky
On 01/10/2012 06:33 PM, achrzesz wrote: On Jan 9, 6:39 pm, Renan Birck Pinheiro wrote: Hi, I'm trying to solve a differential equation with unit step, e.g. the equation y'(x) = U(x-5) - where U is the unit step, and the inicial condition y(0) is 0. The result is 0 for 05 (it's a simple integ

Re: [sage-support] Re: coeffs cannot handle a general function

2012-01-03 Thread Michael Orlitzky
On 01/03/2012 12:16 PM, Yi Wang wrote: Thanks a lot for creating the ticket! But in 4.7.0 coeffs doesn't work either. Because sage: f.coeffs(g) [[g(t)^2 + t + 3*g(t), 0]] is a wrong result for f = 3*g + g**2 + t. I expect a result [[t, 0], [3, 1], [1, 2]]. It would be very kind of you to upda

Re: [sage-support] coeffs cannot handle a general function

2012-01-03 Thread Michael Orlitzky
On 01/03/2012 10:48 AM, Yi Wang wrote: Hi, I found coeffs does not work with a general function. It would be of great help for me to have it fixed. Thank you! I created a ticket for this, http://trac.sagemath.org/sage_trac/ticket/12255 You should be able to CC yourself and be notified of a

Re: [sage-support] problem evaluating integral

2011-12-11 Thread Michael Orlitzky
On 12/10/2011 06:56 PM, andres.ordonez wrote: Hi, I'm having trouble evaluating this integral integral( x / (exp(x) - 1) , (x,0,oo)).n() I get TypeError: cannot evaluate symbolic expression numerically The answer (according to mathematica) should be pi^2 / 6 Is something wrong with my code?

Re: [sage-support] Dependence set of a symbolic expression

2011-12-01 Thread Michael Orlitzky
On 12/01/2011 10:46 AM, Santanu Sarkar wrote: > Hello, > Let S be a symbolic expression of a certain number of variables taken > from a particular set of variables. How do I find out the list of the > distinct variables that S depends on? > Suppose {x0,x1,x2,x3,x4,x5,x6,x7,x8,x9} is a set of unknow

Re: [sage-support] Re: Emacs support for visiting spkg files?

2011-11-15 Thread Michael Orlitzky
On 11/14/11 17:41, Ivan Andrus wrote: > On Nov 14, 2011, at 8:09 PM, Michael Orlitzky wrote: >> On 11/14/11 08:34, Keshav Kini wrote: >>> Will this work for uncompressed SPKGs too? >>> >> >> Not without modification. If you can't rely on the extension to

  1   2   >