On Tue, Jul 8, 2008 at 8:52 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Mon, Jul 7, 2008 at 9:12 PM, Elliott Brossard
> <[EMAIL PROTECTED]> wrote:
>> Hi William,
>>
>> I am becoming more familiar with both Linux and Sage now, which makes things
>> much easier. I finished porting the Maxima and Wester integration tests to
>> Sage, though there are many that currently fail...I've attached them, if
>
> You attached only the ones that fail?   Where are the ones that succeed?
>
>> you'd like to see. The problem that many of them have results from ambiguity
>> of variables under a radical, in a denominator, or in a function with a
>> restricted domain. As an example, inputting
>
> Can you just make a new test that tests each case?
>
>> var('a')
>> integrate(log(x)/a, x, a, a+1)
>>
>> will throw an error: 'is a positive or negative?' Two assume
>> statements--assume(x+a+1>0) and assume(a-1>0)--render Sage capable of
>> responding, and it outputs
>>
>> ((a + 1)*log(a + 1) - a*log(a) - 1)/a
>>
>> My TI-89 calculator, which uses Derive, gets the same result, though without
>> using 'assume' in any form. Trouble is, I can't imagine there's a quick fix
>> for this, and since most of the failing integrals are from Maxima's own test
>
> It would likely be possible -- though difficult (maybe not too difficult) --
> to have Sage automatically give all possible answers to Maxima and
> construct a conditional integral expression that gives each possible
> answer for given conditions.

Actually, the fix is probably trivial -- is Maxima fails, you can
simply substitute things yourself, e.g.:

sage: var("a")
a
sage: e = integrate(log(x)/a, x)
sage: e
(x*log(x) - x)/a
sage: e.subs(x=a+1)-e.subs(x=a)
((a + 1)*log(a + 1) - a - 1)/a - (a*log(a) - a)/a

btw, how can I simplify the above? simplify seems to fail:

sage: simplify(e.subs(x=a+1)-e.subs(x=a))
((a + 1)*log(a + 1) - a - 1)/a - (a*log(a) - a)/a

Besides this of course:

sage: import sympy
sage: sympy.simplify( e.subs(x=a+1)-e.subs(x=a) )
1/a*(-1 + a*log(1 + a) - a*log(a) + log(1 + a))

Then there is a question of assumptions, e.g what if a < -1 etc.  So
maybe the above is not really a fix.

Anyway, if wolfram calculus guys are reading this, they are probably
laughing, but we'll get there, I am sure much sooner than in 30 years.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to