[sage-support] Re: about inverse_erf

2013-12-29 Thread JamesHDavenport
domain, where I was only thinking of the real numbers. Can I not do something to the effect of assume(x, 'real') ? On Saturday, December 28, 2013 10:07:41 AM UTC-8, JamesHDavenport wrote: erf, as a function C-C, is not 1:1 (see 7.13(i) of DLMF), so this simplification would be incorrect

[sage-support] Re: about inverse_erf

2013-12-28 Thread JamesHDavenport
erf, as a function C-C, is not 1:1 (see 7.13(i) of DLMF), so this simplification would be incorrect. I do not know how to tell Sage that you want real-valued functions/variables, when of course it would be correct to do the simplification. On Friday, 27 December 2013 22:40:40 UTC, Buck

[sage-support] Re: about inverse_erf

2013-12-28 Thread JamesHDavenport
Furthermore, DLMF 7.17 only defines the inverse error function on the real line (in fact (-1,1)) I do not recall ever seeing a discussion of the complex inverse error function. Strecok (1968) shows that it satisfies y''=2yy'y', but this is nonlinear, so the methodology of the paper below doesn't

[sage-support] Re: Spurious numerical solutions of polynomial equation

2013-12-14 Thread JamesHDavenport
Curious. The polynomial does not seem particularly ill-conditioned, in the sense that its discriminat is roughly what one might expect (unlike, say, Wilkinson's). Maple gives 50 roots with |f(x)|10^{-12}, and one with f(x)=, i.e. much larger. On Thursday, 12 December 2013 15:35:53 UTC, AWWQUB

[sage-support] Re: Spurious numerical solutions of polynomial equation

2013-12-14 Thread JamesHDavenport
UTC, JamesHDavenport wrote: Curious. The polynomial does not seem particularly ill-conditioned, in the sense that its discriminant is roughly what one might expect (unlike, say, Wilkinson's). Maple gives 50 roots with |f(x)|10^{-12}, and one with f(x)=, i.e. much larger. On Thursday, 12

[sage-support] Re: Documentation and Learning Material for Basic Structures and the CategoryObject class

2013-12-01 Thread JamesHDavenport
Although not SAGE-specific, some of the issues are discussed in our Davenport,J.H. Trager,B.M., Scratchpad's View of Algebra I: Basic Commutative Algebra. Proc. DISCO '90 (Springer Lecture Notes in Computer Science Vol. 429, ed. A. Miola) pp. 40-54. http://opus.bath.ac.uk/32336/. Davenport,J.H.,

[sage-support] Re: Definite integral disagrees with Maple and mathworld

2013-08-27 Thread JamesHDavenport
You may be right - my University Maple 16 gets the right answer, but my 17beta does not. I've reported this as a Maple beta bug. On Tuesday, 27 August 2013 06:34:07 UTC+1, Georgi Guninski wrote: Thank you for the note. You claim: For \int_{1/3}^1 fra(1/x) dx Maple returns ln 3 - 1/3. I

[sage-support] Re: Definite integral disagrees with Maple and mathworld

2013-08-24 Thread JamesHDavenport
Well, the derivative of the fractional part is indeed 1 where it is defined, as lim((fra(x+eps)-fra(x))/eps)=lim(eps/eps)=1 unless adding eps crosses a boundary, which it won't do for eps small enough. Maxima (5.29) returns (4 pi log 2 + i log(-1) +pi)/(4 pi). Depending on the value of log(-1),

[sage-support] Re: Left and right limits (is default of 'dir' None?)

2013-08-20 Thread JamesHDavenport
Maxima, from memory supplemented with an experiment with 5.27, has a) infinity, which is the infinity of the (one-point compactification of the) complex plane b) inf, which is the positive one of the two-point compactification of the reals (plus infinity) c) minf, which is the negative one of

[sage-support] Re: Disturbing Equality (from askSAGE)

2013-07-31 Thread JamesHDavenport
, 2013 1:40:29 PM UTC-4, JamesHDavenport wrote: On Tuesday, 30 July 2013 15:29:43 UTC+1, rickhg12hs wrote: sage: var('a b') (a, b) sage: assume(a, 'real') sage: assume(b, 'real') sage: bool( sqrt((a+b)^2) == sqrt(a^2) + sqrt(b^2) ) True sage:bool( (sqrt((a+b)^2) == sqrt(a^2) + sqrt(b^2

[sage-support] Re: Disturbing Equality (from askSAGE)

2013-07-30 Thread JamesHDavenport
On Tuesday, 30 July 2013 15:29:43 UTC+1, rickhg12hs wrote: sage: var('a b') (a, b) sage: assume(a, 'real') sage: assume(b, 'real') sage: bool( sqrt((a+b)^2) == sqrt(a^2) + sqrt(b^2) ) True sage:bool( (sqrt((a+b)^2) == sqrt(a^2) + sqrt(b^2)).subs(a=1,b=-1) ) False sage: Why the

[sage-support] Re: Simplifying expression, 'x' vs. 'y'

2012-12-12 Thread JamesHDavenport
On Wednesday, 12 December 2012 02:28:19 UTC, kcrisman wrote: On Tuesday, December 11, 2012 6:52:53 PM UTC-5, JamesHDavenport wrote: Pedantic Note. Jacques Carette's paper: Understanding Expression Simplification. Proc. ISSAC 2004 (ed. J. Gutierrez), ACM Press, New York, 2004, pp. 72-79

[sage-support] Re: Simplifying expression, 'x' vs. 'y'

2012-12-11 Thread JamesHDavenport
On Tuesday, 11 December 2012 13:15:09 UTC, kcrisman wrote: I wouldn't worry about it, since in general there is no way to define simpler expression that is fully useful at all times, and for more complicated expressions more detail work would be needed anyway. Pedantic Note. Jacques

[sage-support] Re: Keeping rational functions simple throughout gaussian elimination

2012-08-22 Thread JamesHDavenport
I have no idea whether SAGE supports this, but basically what you need is fraction-free Gaussian elimination: See section 3.2.3 of http:/staff.bath.ac.uk/masjhd/JHD-CA.pdf On Wednesday, 22 August 2012 13:04:08 UTC+1, Erik Aas wrote: I'm trying to solve a system of linear equations over the

[sage-support] Re: Multiplicity of roots nummerical

2012-06-30 Thread JamesHDavenport
But this is a rather fragile concept: see http://whww.sagenb.org/home/pub/4840 http://www.sagenb.org/home/pub/4840 If you can't, expand f below as x^2-2*x+1 then try perturbing the +1 term, e.g. +1+10^(-20). What you really need in the approximate square-free decomposition of f: see, e.g.

[sage-support] Re: Integration issue

2012-05-14 Thread JamesHDavenport
It may be branch cut strangeness, but if so it is very strange. The integrand is clearly well-behaved, and the integral, while in terms of the incomplete gamma function, seems to be off the usual branch cut (negative real axis). On Monday, 14 May 2012 15:35:01 UTC+1, Robert Dodier wrote: On

[sage-support] Re: Determining if a ring has any non-trivial idempotents

2012-04-18 Thread JamesHDavenport
I would doubt it very much. I imagine the same techniques as Fr\ohlich,A. Shepherdson,J.C., Effective Procedures in Field Theory. Phil, Trans. Roy. Soc. Ser. A 248(1955-6) pp. 407-432, can be used to construct a ring which has nontrivial idempotents iss we can determine membership in a

[sage-support] Re: Simplification Issue Implicates Canonical Form

2012-02-22 Thread JamesHDavenport
. James On Feb 22, 5:18 pm, Mark Rahner rah...@alum.mit.edu wrote: On Feb 22, 2:37 am, JamesHDavenport j.h.davenp...@bath.ac.uk wrote: Canonical form and simplify aren't the same thing (necessarily). See Carette,J., Understanding Expression Simplification.  Proc. ISSAC 2004 (ed. J. Gutierrez), ACM

[sage-support] Re: Simplification Issue Implicates Canonical Form

2012-02-21 Thread JamesHDavenport
On Feb 21, 9:36 pm, Mark Rahner rah...@alum.mit.edu wrote: So once it comes back to Sage, its internal representation goes back to the Ginac one. My initial problem was the severe obfuscation that resulted when extra factors added by the canonical form refused to cancel and then replicated

[sage-support] Re: Simplifying log expressions

2012-01-14 Thread JamesHDavenport
...@orlitzky.com wrote: 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

[sage-support] Re: Simplifying log expressions

2012-01-13 Thread JamesHDavenport
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) Unfortunately, when t=-1, we have the sum of the logarithms of two negative numbers, and therefore the imaginary part is 2i pi, not 0 On Jan 12,

[sage-support] Re: Error: Converting from p-adics to rationals.

2011-06-16 Thread JamesHDavenport
As I said previously, you are only going to reconstruct RATIONALs with num,den less than sqrt((1/2)*p^k), i.e. 92 in this case. It is true that the integers are a subset of the rationals, but the convert to integer problem is not a sub-problem of the convert to rational problem. On Jun 16, 3:22 

[sage-support] Re: Error: Converting from p-adics to rationals.

2011-05-27 Thread JamesHDavenport
I know very little about SAGE, but surely the point is that this is not well-defined: what rational were you expecting? You can only guarantee to get a number with (num,den) sqrt(p^k/2), and there isn't one, as 1 itself doesn't work. Did you wnat to convert to integer? On May 26, 1:53 am, Mel

[sage-support] Re: Bug in genus of an ideal

2010-11-21 Thread JamesHDavenport
The fact that the number of singularities quoted is precisely 2^32-1 makes me suspect a faulty return fo -1 from somewhere. On Nov 21, 5:22 am, VictorMiller victorsmil...@gmail.com wrote: sage: T.t1,t2,u1,u2 = QQ[] sage: TJ = Ideal([t1^2 + u1^2 - 1,t2^2 + u2^2 - 1, (t1-t2)^2 + (u1- u2)^2 -1])

[sage-support] Re: Bug (?) in full_simplify()

2010-11-20 Thread JamesHDavenport
Disclaimer: I do not know the SAGE code here, just general theory. As BFJ pointed out, there is no 'canonical' form for such expressions, where 'canonical' means (see 2.3.1, p.79 of Davenport, Siret Tournier) that there is a unique representation for every expression. But there may well be a

[sage-support] Re: problem with integral (Maxima)

2010-11-08 Thread JamesHDavenport
My maxima (5.19.2) also generates an error here. On Nov 8, 8:24 am, pong wypon...@gmail.com wrote: I have encountered a problem in using integral integral(x * sqrt((-2*cos(x))^2 + (2*sin(x))^2), x, 0, pi) correctly gives pi^2 but integral(sin(x) * sqrt((-2*cos(x))^2 + (2*sin(x))^2), x,

[sage-support] Re: Implication

2010-09-03 Thread JamesHDavenport
On Sep 3, 6:56 pm, Jason Bandlow jband...@gmail.com wrote: For polynomial equations, the following should work in general. sage: R.x,y = CC['x','y'] sage: f = x-y sage: g = x^2 - y^2 sage: I = R.ideal([f]).radical() sage: g in I True In general, to see if the equation g == 0 is implied

[sage-support] Re: sage.numerical.optimize.minimize() returns without returning a value

2010-07-17 Thread JamesHDavenport
On Jul 16, 11:14 pm, Daniel Friedan dfrie...@gmail.com wrote: an update: minimize() is much improved using Harald Schilly's suggestion to provide an explicit gradient function defined with fast_float(). succeeded:       minimizing a quartic polynomial in 100 variables containing 1,100,411

[sage-support] Re: rational function arithmetic

2010-05-06 Thread JamesHDavenport
On May 5, 10:09 am, Mike Hansen mhan...@gmail.com wrote: Hello, On Wed, May 5, 2010 at 5:03 AM, Matt Bainbridge bainbridge.m...@gmail.com wrote: I wrote a sage program which does a lot of arithmetic in the field of rational functions Frac(Q[x,y,z]).  The problem is that sage doesn't

[sage-support] Consider a demo at PLMMS 2010

2010-04-01 Thread JamesHDavenport
I am a co-organizer of Programming Languages for Mechanized Mathematics Systems (PLMMS 2010): have you considered mounting a demonstration of SAGE at the conference, which is part of CICM 2010 in Paris in early July? There may well be sme SAGE peple at CICM, but I can't find out easily. The