[sage-support] Re: general legendre polynomials incorrect...

2018-07-29 Thread Ralf Stephan
See also https://trac.sagemath.org/ticket/25034 On Thursday, July 26, 2018 at 9:31:34 PM UTC+2, sss...@mst.edu wrote: > > I'm pretty convinced that the general legendre polynomials are incorrect > in some cases and lead to the associated legendre polynomials and spherical > harmonics to be incor

[sage-support] Re: Automatic Differentiation in Sage?

2018-06-25 Thread Ralf Stephan
On Sunday, June 24, 2018 at 2:35:27 AM UTC+2, Matthias Goerner wrote: > > However, when I try > sage: sin(2 / (A((0.99, 1.01)) + dx + 3*dy)) > ValueError: Can only apply sin to formal power series with zero constant > term. > The result of such a series in general rings would contain expressions

[sage-support] Re: Numeric Approximation with Symbolics

2018-05-20 Thread Ralf Stephan
On Saturday, May 19, 2018 at 11:12:57 PM UTC+2, slelievre wrote: > > Is there a tutorial about walking the expression tree and doing various > operations there? > There isn't even a description of the possible parts of an expression in Sage. That's in the GiNaC tutorial but C++ centric. The Expre

[sage-support] Re: Numeric Approximation with Symbolics

2018-05-19 Thread Ralf Stephan
There is a function is_unit() in symbolic/units.py, so you just need to walk the expression tree using the ExpressionTreeWalker class in symbolic/expression_conversions.py. I would first check for symbol with ex.is_symbol() which is very fast. See DefiniteSumExpander for example. Regards, --

[sage-support] Re: order of variables in symbolic operations

2018-05-19 Thread Ralf Stephan
But have you tried using a polynomial ring? -- 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, sen

[sage-support] Re: order of variables in symbolic operations

2018-05-19 Thread Ralf Stephan
This is not possible at the moment. If it's changeable somehow the change would not be high priority. -- 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-suppo

[sage-support] Re: laplace_transform hypergeometric?

2018-04-13 Thread Ralf Stephan
I confirm conversion of hypergeometric 2F1 to SymPy is broken---but 2F2 is not so the workaround would be to give an additional 1 argument in the second slot. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and

[sage-support] laplace_transform hypergeometric?

2018-04-13 Thread Ralf Stephan
The transform is implemented via calling of SymPy but apparently something went wrong in the conversion to SymPy. I cannot say more as I'm not at my box but you can try to use SymPy directly as a workaround. Regards, -- You received this message because you are subscribed to the Google Groups

[sage-support] Re: Mixing cython and Sage code

2018-03-23 Thread Ralf Stephan
On Wednesday, March 21, 2018 at 7:29:37 PM UTC+1, saad khalid wrote: > > ...For example, one of the Mathematica functions takes a polynomial in 2 > variables as input and computes the value of the order in one of the > variables (ie for x1^3 + x1*x2^2 + x2, the order for x1 would be 3). > Not di

Re: [sage-support] Re: [sage-cell] Where Oh Where is my Divide By Zero Error?

2018-03-20 Thread Ralf Stephan
On Sunday, March 18, 2018 at 5:19:07 PM UTC+1, Johan S. H. Rosenkilde wrote: > > I don't have a better explanation for why this difference has been > adopted in Sage than the above: following IEEE standard vs doing the > mathematically safe-and-fail-early-solution. Perhaps someone more > knowled

Re: [sage-support] Re: Is this a bug?

2018-02-28 Thread Ralf Stephan
Sorry for the noise, it already works fine, just not with characteristic polynomials of symbolic matrices. They messed up my Sage session, so the minpoly example seemed to fail too. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscrib

Re: [sage-support] Re: Is this a bug?

2018-02-28 Thread Ralf Stephan
It might not be necessary to (re)assign the global variable. Only if the user wants to do operations with the polynomial he wants an x to be that poly variable, and certainly not another x. So, the parser can do the part of figuring out what x is meant, maybe by checking all generator names. Ex

[sage-support] Re: Is this a bug?

2018-02-28 Thread Ralf Stephan
Why should I define x when Sage gives me a polynomial with x, doesn't it already know it? That's what a user would ask and, frankly, s/he would be right. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop r

[sage-support] Re: Is this a bug?

2018-02-28 Thread Ralf Stephan
On Wednesday, February 28, 2018 at 9:09:04 AM UTC+1, Dima Pasechnik wrote: > > I would be for dropping 'x' as the only "default" variable (defined at > start time). > I agree but does it solve the problem I demonstrated. Can you then add x to the minpoly? -- You received this message because y

[sage-support] Re: Is this a bug?

2018-02-27 Thread Ralf Stephan
On Tuesday, February 27, 2018 at 10:58:38 AM UTC+1, Dima Pasechnik wrote: > > This is now https://trac.sagemath.org/ticket/24853 > While that fixes the infinite loop, it only works around another issue that is uncovered, namely that the x in the polynomial returned by charpoly() is not accessibl

[sage-support] Re: Numeric Approximation with Symbolics

2018-02-26 Thread Ralf Stephan
On Tuesday, February 27, 2018 at 1:06:37 AM UTC+1, Pstrang Rzekle wrote: > Is there a way to trick SageMath into presenting numeric approximations > with symbolics? In this specific case, handling numbers with units attached. > You will have to use an internal method and convert the number of di

[sage-support] Re: How to get special values of arccos

2018-02-26 Thread Ralf Stephan
On Monday, February 26, 2018 at 9:08:47 AM UTC+1, Simon King wrote: > > Question: How can one get the exact value of arccos(1/2*sqrt(sqrt(2) + 2)) > (which is pi/8)? I tried .simplify_full() and so on, but to no avail. > First, there is no such ready functionality. There are probably several wa

[sage-support] Re: Bug report-Sage

2018-02-12 Thread Ralf Stephan
It's the pattern sqrt(f(x)) with f containing trigonometric functions. Use giac for such integrals. sage: integral(abs(sin(pi*x)), x, 0, 1, algorithm='giac') 2/pi There is no meta ticket for this, you can find integration tickets at https://trac.sagemath.org/wiki/symbolics#Integrationtickets I

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

2018-01-17 Thread Ralf Stephan
Looking back to earlier posts in this thread I think the confusion was because of assuming x<1 not abs(x)<1. Finally in your cocalc worksheet the assumption abs(x)<1 holds at the time the integral is done so you get the value. -- You received this message because you are subscribed to the Goog

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

2018-01-17 Thread Ralf Stephan
On Wednesday, January 17, 2018 at 10:54:10 PM UTC+1, saad khalid wrote: > > what I meant was, when I use the assume(abs(x) < 1), but still plug in a > value for x that is greater than 1 into the function. For example, f(1.5) > runs fine, even when I have assume(abs(x) < 1). > The right side of

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

2018-01-16 Thread Ralf Stephan
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') > 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

Re: [sage-support] find_local_maximum of the absolute value of a polynomial with complex coefficients

2018-01-13 Thread Ralf Stephan
On Friday, January 12, 2018 at 4:51:32 PM UTC+1, Vegard Lima wrote: > > TypeError: unable to coerce to a real number > Thanks. I opened https://trac.sagemath.org/ticket/24536 https://trac.sagemath.org/ticket/24537 -- You received this message because you are subscribed to the Google Groups "

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-18 Thread Ralf Stephan
Also I think that results other than 20 are wrong for both formulae because the binomial part always amounts to binomial(2-n,3-n), i.e. zero, and you're just adding 5 four times. But I'm not 100 per cent on that. -- You received this message because you are subscribed to the Google Groups "sag

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-17 Thread Ralf Stephan
BTW instead of unhold() you can also use n() to get the value of an unevaluated definite sum. -- 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+unsub

[sage-support] Re: Evaluation of sum function in callable expression

2017-12-17 Thread Ralf Stephan
This looks like a bug, you get the sum unevaluated. You can as a workaround evaluate it manually. I get: print(h3(3,h3n=5).unhold()) 20 Thanks for the report. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and

[sage-support] Re: integrals and algorithms

2017-11-13 Thread Ralf Stephan
On Sunday, November 12, 2017 at 11:30:51 AM UTC+1, Enrique Artal wrote: > > It seems that fresnels is defined in sympy but not in sagemath, Is it > possible to correct these errors? Thanks, Enrique. > > I opened https://trac.sagemath.org/ticket/24212 Thanks for the report, -- You received this

[sage-support] Re: Error with simple integral, "CEXPT only defined for non-negative integral exponents."

2017-11-08 Thread Ralf Stephan
See also https://trac.sagemath.org/ticket/12152 and https://trac.sagemath.org/ticket/14821 -- 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.

[sage-support] Re: Error with simple integral, "CEXPT only defined for non-negative integral exponents."

2017-11-08 Thread Ralf Stephan
On Tuesday, November 7, 2017 at 6:06:05 PM UTC+1, saad khalid wrote: > > > integral(525.87*(x)^(-2.35),x,.1,1) > > This is user error because this works fine: sage: integral(52587/100*(x)^(-235/100),x,.1,1) 8331.031741769872 Never use inexact values in integral terms. Regards, -- You receive

[sage-support] Re: formal sets

2017-11-06 Thread Ralf Stephan
On another note, while there is support for sets with maps from ZZ in EnumeratedSetFromIterator. How can for example the set under a function from the positive reals be formally represented? I'm looking for an equivalent of SymPy's ImageSet. Regards, -- You received this message because you a

[sage-support] Re: formal sets

2017-11-05 Thread Ralf Stephan
Please review https://trac.sagemath.org/ticket/24162 -- 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 g

[sage-support] Re: formal sets

2017-11-05 Thread Ralf Stephan
On Sunday, November 5, 2017 at 8:56:44 PM UTC+1, Eric Gourgoulhon wrote: > > sage: R = Set(RealSet(-oo,oo)) > sage: R.an_element() > (-oo, +oo) > I see, R is a set with one element, so there is a difference to Set(ZZ) In passing, we may also note that > sage: RealSet(-oo,+oo).an_element() > ... >

[sage-support] formal sets

2017-11-05 Thread Ralf Stephan
Hello, The set of integers can be formally represented as sage: Set(ZZ) Set of elements of Integer Ring A bit more tricky are the reals: sage: Set(RealSet(-oo,oo)) Set of elements of (-oo, +oo) How could one represent the complexes? Is it a cartesian product? Regards, -- You received this mes

[sage-support] Re: [piecewise] AttributeError: ComplexField_class_with_category object has no attribute complex_field

2017-10-30 Thread Ralf Stephan
On Sunday, October 29, 2017 at 11:14:54 AM UTC+1, Marcel Partap wrote: > > Is it that piecewise functions are not yet fully fledged out, > This, unfortunately. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and s

[sage-support] Re: Polynomial factorization over modular ring

2017-08-15 Thread Ralf Stephan
On Tuesday, August 15, 2017 at 4:21:03 PM UTC+2, chandra chowdhury wrote: > > x = var('x') > factor(x^5-x, IntegerModRing(25)['x']) > Look at the output of `factor??`. A ring argument is not supported. So you have to create the ring first (var gives you only the symbolic ring). Then create the

[sage-support] Re: Hold evaluation for division

2017-07-21 Thread Ralf Stephan
You don't write what u is in the first place so I cannot give a specific answer. However, holding division is possible using the mul method, by doing a mul with the inverse: sage: x/(2*x) 1/2 sage: x.mul(1/(2*x), hold=True) x*(1/2/x) sage: _.unhold() 1/2 Regards, -- You received this message b

[sage-support] Re: Error in graphic

2017-07-11 Thread Ralf Stephan
Thanks. Now please post all commands from start of Sage until this happens. -- 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

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

2017-07-10 Thread Ralf Stephan
There are several different issues. In your first example you write ((1/(1-x1^t)).taylor(x2,1,4).taylor(x1,1,4).coefficient(1/(x1-1))). substitute(x2=1) Note that contrary to your other examples x2 is not in the expression you expand the series from. A typo? In the second example ((1/(1-x2*x1^

[sage-support] Re: Error plotting 3D

2017-07-03 Thread Ralf Stephan
The reason is the typo **299792458 You really want such a big power? -- 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.

[sage-support] Re: Error in graphic

2017-07-03 Thread Ralf Stephan
There is no way around you getting a recent Sage (or using the cloud) and posting a full session log. -- 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-suppor

[sage-support] Re: Error plotting 3D

2017-07-03 Thread Ralf Stephan
Well you are dealing with numerically exctreme values here. Let's look at the factor of (x**2+y**2) inside the lambda: sage: (exp(I*2000*(1.60217662*10**(-19))/(299792458*6.6260700*10**(-34)))-(sqrt( : I*(1.60217662*10**(-19))/(4*6.62607004*10**(-34)*299792458*2000))-1.60 : 217662*1

[sage-support] Re: Error in graphic

2017-06-30 Thread Ralf Stephan
On Friday, June 30, 2017 at 9:21:18 AM UTC+2, HG wrote: > > http://arachnoid.com/sage/differential1.html > > ValueError: Variable 't' not found > > If you look at that arachnoid webpage you'll find this: var('r c t') Without defining a variable you cannot use it, even if it's bound. Regards, --

[sage-support] Re: Converting expressions from sage to sympy

2017-06-30 Thread Ralf Stephan
On Thursday, June 29, 2017 at 8:38:36 PM UTC+2, Jacob Pelletier wrote: > > I am trying to mix sage and sympy code via Jupyter Notebooks. > Is there an easy way to overload the _sympy_() or _sage_() methods for > vars,symbols, and functions? > Not without Sage recompilation. > Also, when I try

[sage-support] Re: A possible slight addition to symbolic sum operations

2017-04-26 Thread Ralf Stephan
On Wednesday, April 26, 2017 at 8:35:30 AM UTC+2, Emmanuel Charpentier wrote: > > Sage can (awkwardly) do some simplifications of symbolic sums. For example > > sage: var("j,p", domain="integer") > (j, p) > sage: X,Y=function("X,Y") > sage: (sum(X(j),j,1,p)+sum(Y(j),j,1,p)).maxima_methods().sumc

[sage-support] Re: Problem with an integral

2017-04-09 Thread Ralf Stephan
On Sunday, April 9, 2017 at 5:37:55 AM UTC+2, Andrey Novoseltsev wrote: > > As reported, > > var('r') > assume(r>0) > integrate(r * sqrt( (2*r*cos(x)/sqrt(3))^2 + ( 2/3 + 4*r*sin(x)/3 )^2 ), > x) > > gives > > -1/12*(2*r*x - r*sin(2*x))*r > > which is indeed incorrect. Is the root cause kn

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

2017-04-07 Thread Ralf Stephan
On Friday, April 7, 2017 at 5:29:39 PM UTC+2, Chris Seberino wrote: > > I *agree* that the answer should be expanded in your example. > But when you use the factor function it should have an effect no!? > That's why I gave the link to the ticket, which you can follow or participate in. -- You

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

2017-04-07 Thread Ralf Stephan
Because in the symbolic ring 3*(2*x+1) is immediately expanded again. Try yourself: sage: 2*(1+3*x) 6*x + 2 But see also https://trac.sagemath.org/ticket/21067 Regards, On Thursday, April 6, 2017 at 5:47:28 PM UTC+2, Chris Seberino wrote: > > Why factor(6*x+3) doesn't give 3*(2*x+1) ? > > Than

[sage-support] Re: How to treat (multiple) zeta values as real symbolic constants?

2017-03-30 Thread Ralf Stephan
On Thursday, March 30, 2017 at 10:38:49 AM UTC+2, Brent Pym wrote: > > Thank you very much! By opening these tickets, you have certainly > answered my questions. Is the etiquette to mark this thread as complete > now, or wait until the tickets have been closed? > Threads in sage-devel or -supp

[sage-support] Re: How to treat (multiple) zeta values as real symbolic constants?

2017-03-30 Thread Ralf Stephan
I also opened https://trac.sagemath.org/ticket/22713 -- 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 g

[sage-support] Re: How to treat (multiple) zeta values as real symbolic constants?

2017-03-30 Thread Ralf Stephan
On Thursday, March 30, 2017 at 9:08:24 AM UTC+2, Brent Pym wrote: > Do I understand correctly that multiple polylogs and multiple zeta values are implemented in GiNaC/Pynac but not yet wrapped in SageMath? They are in GiNaC but the code in Pynac is degenerated for various reasons, eg the numeric

[sage-support] Re: How to treat (multiple) zeta values as real symbolic constants?

2017-03-28 Thread Ralf Stephan
On Tuesday, March 28, 2017 at 7:44:14 PM UTC+2, kcrisman wrote: > > On Tuesday, March 28, 2017 at 10:15:22 AM UTC-4, Brent Pym wrote: >> >> For a real number *s*, the value* zeta(s)* of the Riemann zeta function >> is real, but SageMath does not seem to recognize this fact. Here is an >> example

[sage-support] Re: Reconstructing a symbolic expression with derivative from the string representation

2017-02-22 Thread Ralf Stephan
On Wednesday, February 22, 2017 at 7:11:50 PM UTC+1, Nils Bruin wrote: > > Clearly, SR('diff(...)') operates in a scope where "diff" isn't bound to > the toplevel "diff". > Yes, there is no symbolic diff function and so it does not appear in the dictionary for translating strings to expressions.

[sage-support] Re: Squaring the sine function

2017-02-19 Thread Ralf Stephan
Or in other words, are you typesetting, or is the sin^4 part of the result of a computation? -- 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+unsubs

[sage-support] Re: Unexpected behaviour of derivatives on power series

2017-01-15 Thread Ralf Stephan
I would have expected that with Laurent series but they don't do the expected, either: sage: R.=LaurentSeriesRing(SR) sage: f = 1 + O(x^2) sage: f.derivative(1) O(x^1) sage: f.derivative(2) 0 sage: f.derivative(3) 0 -- You received this message because you are subscribed to the Google Groups "s

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

2017-01-15 Thread Ralf Stephan
We need documentation on symbolic simplification... sage: sin(x/(x^2 + x)).normalize() sin(1/(x + 1)) sage: factor(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6) (cos(x)^2 - cos(x) - 3)*(cos(x) - 2) sage: factor(sqrt(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6)) sqrt(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6) sage: from s

[sage-support] Re: apply substitution only at specific summand

2016-12-12 Thread Ralf Stephan
On Monday, December 12, 2016 at 10:55:32 AM UTC+1, Daniel Krenn wrote: > > (I can only think of very complicated and long workarounds, so what is > the best way to do this?) > As you can see from sage: a = ((z^3 - 10*z^2 + 17*z - 8)/(z^4 + z^3 + z^2 + z + 1)).integrate(z) sage: a.operator() int

Re: [sage-support] Getting Core dumped in Sage code for weil-pairing

2016-11-29 Thread Ralf Stephan
On Tuesday, November 29, 2016 at 4:25:35 PM UTC+1, slelievre wrote: > > > The segfault boils down to a problem when dividing symbolic > expressions involving finite field elements. > See also https://trac.sagemath.org/ticket/21391 This would have resulted in: TypeError: Multiplication of symbolic

Re: [sage-support] QQbar coercion question

2016-10-24 Thread Ralf Stephan
Please review https://trac.sagemath.org/ticket/21754 On Monday, October 24, 2016 at 8:44:35 AM UTC+2, vdelecroix wrote: > > On 24 October 2016 at 08:33, Ralf Stephan > > wrote: > > On Monday, October 24, 2016 at 8:03:37 AM UTC+2, vdelecroix wrote: > >> > >>

Re: [sage-support] QQbar coercion question

2016-10-23 Thread Ralf Stephan
On Monday, October 24, 2016 at 8:03:37 AM UTC+2, vdelecroix wrote: > > Something like this. But then it is not possible to do anything with > this expression (like numerical approximation)... > Since you say pow is special we can fix this for the special case exponent in QQbar. Useful? -- You

Re: [sage-support] QQbar coercion question

2016-10-23 Thread Ralf Stephan
On Sunday, October 23, 2016 at 6:33:30 PM UTC+2, vdelecroix wrote: > > But it would be better with SR(2) ^ SR(QQbar(3).sqrt() + > QQbar(2).sqrt()) working > You mean this? sage: SR(2).power(SR(QQbar(3).sqrt() + QQbar(2).sqrt()), hold=True) 2^3.146264369941973? -- You received this message b

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
On Saturday, October 22, 2016 at 6:28:58 PM UTC+2, vdelecroix wrote: > > ... The behavior of any operation in Sage is that > the parent of op(a, b) should only depend on the operator op, > parent(a) and parent(b). Powers are a bit special but not enough to > use conversion instead of coercion.

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
On Saturday, October 22, 2016 at 4:04:55 PM UTC+2, John Cremona wrote: > > So Ralf, do you want to catch the case where the exponent in QQbar is > actually rational and then do what QQbar already knows how to do > (raise to a rational power), returning an element of QQbar; and raise > an Error

Re: [sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
gt; > On 22 October 2016 at 09:37, Ralf Stephan > > wrote: > > sage: 2*(QQbar(1)) > > 2 > > sage: 2^(QQbar(1)) > > ... > > TypeError: no canonical coercion from Algebraic Field to Rational Field > > > > Why does the one work, the other not? I

[sage-support] QQbar coercion question

2016-10-22 Thread Ralf Stephan
sage: 2*(QQbar(1)) 2 sage: 2^(QQbar(1)) ... TypeError: no canonical coercion from Algebraic Field to Rational Field Why does the one work, the other not? Is it a bug? Regards, -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from

[sage-support] Re: How do I make assume conclude basic consequences?

2016-10-08 Thread Ralf Stephan
On Saturday, October 8, 2016 at 12:14:23 PM UTC+2, Rob H. wrote: > > sage: var('A,B') > sage: assume(A>1) > sage: assume(B>A) > sage: bool(2*B>A) > False > Maxima 5.37.2: (%i1) assume(a>1); (%o1) [a > 1] (%i2) assume(b>a); (%o2) [b > a]

[sage-support] Re: possible regression in piecewise plotting?

2016-10-05 Thread Ralf Stephan
On Thursday, September 29, 2016 at 7:34:37 PM UTC+2, kcrisman wrote: > > P = piecewise([((0,2),x),((2,6),2)]) > print P > plot(P) > However, previously plotting piecewise functions by default plotted the > entire thing (since they didn't go out to infinity). I understand the > consistency, but

[sage-support] Re: sage crash report

2016-09-16 Thread Ralf Stephan
Looks like C++ ABI mismatch. While gcc-4.8.4 should work you maybe want to install a newer version. What Sage version is 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

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

2016-09-12 Thread Ralf Stephan
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 > That has nothing to do with combining fractions. Also, numerics alone in the denominator can in principle not be combined becaus

[sage-support] Re: Simple Equation Substitution Fails

2016-09-07 Thread Ralf Stephan
On Wednesday, September 7, 2016 at 11:10:48 AM UTC+2, slelievre wrote: > > The problem is that subtracting `r2 - 3 * r^2` yields an expression > whose expression tree no longer contains `(x^2 + y^2 + z^2)`. > I consider it a bug and an equivalent case is substituting in the denominator, the fix of

[sage-support] Re: Conversion of incomplete gamma function to sympy not working

2016-09-03 Thread Ralf Stephan
Please review https://trac.sagemath.org/ticket/21407 -- 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

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

2016-07-20 Thread Ralf Stephan
On Tuesday, July 19, 2016 at 8:46:36 PM UTC+2, John Cremona wrote: > > On 19 July 2016 at 19:37, saad khalid > > wrote: > > 50 > > > > > > Why won't it factor it? > > Because your number is in the symbolic ring: > > sage: n = SR(50) > sage: factor(n) > 50 > Yes, and because the symbolic

[sage-support] Re: substituting into a Sage/Python function

2016-06-16 Thread Ralf Stephan
On Tuesday, June 14, 2016 at 10:07:30 PM UTC+2, john_perry_usm wrote: > > sage: f(t) = t^2 + 2 > sage: test_subs(f, 1, t) > ... > TypeError: no canonical coercion from to Callable function > ring with argument t > > I am not sure why you didn't try: sage: test_subs(f(t),1,t) 3 Of course it cann

[sage-support] Re: Substituting values for variables

2016-06-13 Thread Ralf Stephan
It's a bit unclear to me what you want, but have you tried substituting your expressions, or writing a Python function instead of a symbolic function gamma? -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread Ralf Stephan
In an SMC terminal session: ~$ sage ┌┐ │ SageMath Version 6.10, Release Date: 2015-12-18│ │ Enhanced for SageMathCloud.│ └

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

2016-06-06 Thread Ralf Stephan
On Thursday, June 2, 2016 at 10:19:21 PM UTC+2, saad khalid wrote: > > Thanks for the quick reply! Could you explain, or tell me what to search, > what exactly "SR("y%s"%i)" does? > It's SR("y%s"%i) or better SR("y%s" % i). The % is Python format string substitution, like C's sprintf. > Is SR

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-06 Thread Ralf Stephan
On Friday, June 3, 2016 at 9:45:02 AM UTC+2, Peter Luschny wrote: > > plot([tanh(exp(i*t)).real(), > (exp(exp(i*t))/cosh(exp(i*t))-1).real()],t,0,2*pi) > The two functions are identical, the plot shows different functions. > Your Sage is too old, this Pynac bug (existing for years) was fixed mo

Re: [sage-support] Re: Speed comparison to Mathematica

2016-05-03 Thread Ralf Stephan
Even with (or especially because of) my CS background I would do it step by step. On Wed, May 4, 2016, 03:57 saad khalid wrote: > 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

Re: [sage-support] Re: Speed comparison to Mathematica

2016-05-03 Thread Ralf Stephan
19:30 john_perry_usm wrote: > On Monday, May 2, 2016 at 1:56:55 PM UTC-5, Ralf Stephan wrote: >> >> That you can't trace Cython is fortunately not true. >> I do it from time to time using gdb when I trace pynac code. >> > > Can you trace Cython *in Sage*? If so, I

[sage-support] Re: Speed comparison to Mathematica

2016-05-02 Thread Ralf Stephan
That you can't trace Cython is fortunately not true. I do it from time to time using gdb when I trace pynac code. Of course it's not C/Python but its cythonization, the translated C code. The associated Cython is handily shown in comments with the translation so you won't be lost. -- You receive

[sage-support] Re: Cannot integrate expanded expression

2016-03-11 Thread Ralf Stephan
It is always advisable to try Sympy or (if installed) Fricas on integrals. sage: integrate(f,x,algorithm='fricas') arctan(log(x)) SymPy however: sage: integrate(f,x,algorithm='sympy') ... AttributeError: 'RootSum' object has no attribute '_sage_' which would need ticket #16816 implemented to wor

[sage-support] Re: Order of multiple assumptions and is_positive/is_integer methods

2016-02-27 Thread Ralf Stephan
Assumptions in Sage matter only when using Maxima functionality. The is_ functions query flags in the Pynac subsystem and only recently we added support for changing of domain using the assume function. There is however no positive integer domain in Pynac. You will find that this missing ability d

[sage-support] Re: Problem solving an ode system

2016-01-04 Thread Ralf Stephan
Cannot confirm. Please always give all Sage commands you need for the case. A cut-and-paste of your terminal session (including the sage: prompt) would be fine. Regards, -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this

[sage-support] Re: ring series sqrt

2015-12-26 Thread Ralf Stephan
I have explained it better in http://trac.sagemath.org/ticket/3354 but I'm still not sure if this is a bug, or the extend keyword behaves as expected, so please comment. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this g

[sage-support] ring series sqrt

2015-12-25 Thread Ralf Stephan
How is the extend keyword to sqrt() of ring series supposed to be used? I tried: sage: K. = PowerSeriesRing(QQ, 5) sage: two = K(2) sage: sqrt2 = two.sqrt(extend=True, name='sqrt2') sage: (t+sqrt2^2).sqrt() --- NotImple

Re: [sage-support] RealSet Problem

2015-10-22 Thread Ralf Stephan
On Wednesday, October 21, 2015 at 8:47:58 PM UTC+2, William wrote: > > sage: RLF(pi+1) < RLF(pi) > True # umh, no! As long as symbolics gets ignored by most devs such errors will persist. The above is due to sage: (pi+1).__cmp__(pi) -1 The main ticket for this is http://trac.sagemath.org/ti

[sage-support] Re: integral() bug report

2015-10-17 Thread Ralf Stephan
You should always try the other options Sage offers: sage: integral(cos(x)/(1+sin(x)), x, -pi/6, pi/6, algorithm='sympy') log(3) Regards. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails

Re: [sage-support] A problem with doing integrations on cloud.sagemath.com

2015-10-15 Thread Ralf Stephan
On Wednesday, October 14, 2015 at 6:28:16 PM UTC+2, kcrisman wrote: > > Just as a point of info, "n" is not a variable by default, but rather > numerical approximation. So you may want to do var('n') first. This is > probably the issue. > As a data point, with var('n') I get here: sage: f.int

[sage-support] Re: Is this an error in the math renderer?

2015-10-03 Thread Ralf Stephan
On Friday, October 2, 2015 at 10:54:11 AM UTC+2, Greg Sonnenfeld wrote: > > a3(a1,a0,a2)=(a2*a0^2)/(a1) + 1 > to(a1,a0,a2)=1/a0 * ( lambert_w(-1*e^(-1*a3(a1,a0,a2))) + a3(a1,a0,a2)) > show(to) > > Where as if i changed that lambert_w to a sin or a log, it rendered nice > and pretty. > Thanks, y

[sage-support] Re: Wrong indefinte integral

2015-07-18 Thread Ralf Stephan
On Friday, July 17, 2015 at 11:01:52 AM UTC+2, Johannes Lippmann wrote: > > What should I do now? > If the (default) Maxima subroutine does not satisfy, always try SymPy: sage: integrate(x/(x^2+1),(x,0,infinity),algorithm='sympy') +Infinity Maxima when started without Sage says: (%i1) integrate

[sage-support] Re: bug in == operator?

2015-07-14 Thread Ralf Stephan
On Monday, July 13, 2015 at 7:24:36 PM UTC+2, Volker Braun wrote: > > I suppose __nonzero__ should try to cast to QQbar and AA first before > trying maxima. > Fixed and needs review: http://trac.sagemath.org/ticket/18896 With this Sage would also pass one more test from Wester's paper. Regards

[sage-support] Re: a sage bug

2015-07-12 Thread Ralf Stephan
On Sunday, July 12, 2015 at 2:34:56 PM UTC+2, Stein William wrote: > -- Forwarded message -- > From: ruiming zhang > Date: Sunday, July 12, 2015 > Subject: a sage bug > To: wst...@math.washington.edu > > ... > e=x+1<=x-2 > e*(-1) > -x-1<=-x+2, This is known and has a fix. Only th

[sage-support] Re: [sage-cloud]: abs return negative value

2015-07-06 Thread Ralf Stephan
On Monday, July 6, 2015 at 8:15:54 PM UTC+2, Dima Pasechnik wrote: > > On Monday, 6 July 2015 18:05:18 UTC+1, Maurizio Parton wrote: >> >> On cloud.sagemath.com, on a brand new notebook, if I evaluate >> >> abs(-2^(1/2)) >> >> the result is >> >> -sqrt(2) >> >> Expected result: sqrt(2) or abs(-sqrt

[sage-support] Re: X and Y values of plot points generated when using implicit_plot

2015-07-03 Thread Ralf Stephan
The OP now was able to post on ask.sagemath, and the question was answered. http://ask.sagemath.org/question/27249/x-and-y-values-of-plot-points-using-implicit_plot/ -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group

[sage-support] Re: Algebraic Field or Symbolic Ring ?

2015-06-30 Thread Ralf Stephan
On Tuesday, June 30, 2015 at 1:24:23 PM UTC+2, tdumont wrote: > > Why is xxc in Symbolic Ring and not in Algebraic Field? > mxx and xxc are essentialy the same thing, no ? > > When you input sqrt(2) it is not clear which object you want, Sage traditionally decides in favor of a symbolic. If you s

[sage-support] Re: Induction method

2015-06-10 Thread Ralf Stephan
> > n = var('n',domain='integer') > res = solve([n^2 == 3],n); print "res = ",res > > returns the weird answer : > > res = [ > n == -sqrt(3), > n == sqrt(3) > ] > > But sage: assume(n,'integer') sage: solve(n^2-3,n) [] so it seems variable domains are not interpreted as assumptions. -- You re

[sage-support] Re: (Bug?) conjugate ignored by solve()

2015-05-25 Thread Ralf Stephan
On Monday, May 25, 2015 at 10:23:28 AM UTC+2, gschi...@gmail.com wrote: > > > sage: sage: var('z'); conjugate(z+i) > conjugate(z) - I > # (as expected) > > # But: > conjugate(z+i==0) > z + I == 0 > # expected: conjugate(z) - I == 0 > > Here's another example showing that the conjugate is simply d

[sage-support] Re: (Bug?) conjugate ignored by solve()

2015-05-24 Thread Ralf Stephan
Thanks for the report. I have opened http://trac.sagemath.org/ticket/18488 Regards, -- 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...@go

Re: [sage-support] Wrong symbolic integral.

2015-05-12 Thread Ralf Stephan
On Tuesday, May 12, 2015 at 10:06:56 AM UTC+2, Kristoffer Ryhl-Johansen wrote: > > Yeah, I was the one who posted that question, I don't know how maxima > works internally, but isn't it a bug that the asymptotic expansion is > missing, then? > In principle no, since there is no error or wrong o

Re: [sage-support] Wrong symbolic integral.

2015-05-10 Thread Ralf Stephan
On Monday, May 11, 2015 at 7:57:40 AM UTC+2, Kristoffer Ryhl-Johansen wrote: > > What stops Maxima from evaluating the limit? > Missing asymptotic expansion of dilog, for example. For the math see also http://math.stackexchange.com/questions/1275176/limit-with-polylog -- You received this me

Re: [sage-support] Wrong symbolic integral.

2015-05-10 Thread Ralf Stephan
On Saturday, May 9, 2015 at 1:47:46 PM UTC+2, Ruslan Abramchuk wrote: > > Ok, I see. But it is not very obvious. > Technically topic is closed? > No, technically there are two bugs triggered in Sage. First, the limit is given in the form compatible with Maxima not Sage (input the limit by hand wi

[sage-support] Re: Sym Py vs Maxima for symbolic computation

2015-04-29 Thread Ralf Stephan
The main problem facing Sympy may be performance, because they explicitly use Python for everything. It shows for example in https://github.com/sympy/sympy/issues/2635 -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this gr

  1   2   >