Dear Master



Maxima has the tools for calculating these integrals, but sadly doesn't
handle these cases directly:

ex: 1/ ( (x-a)*(x-b)*sqrt(1-x^2) )
... integrate(ex,x) => nounform
   but
... integrate(partfrac(ex,x),x) => reasonable solution (with a couple of
questions)

ex: 1/ ( (x-1)*(x+1)*sqrt(1-x^2) )
... integrate(ex,x) => nounform
... integrate(radcan(ex),x) => nounform
... integrate(factor(radcan(ex)),x) => nounform
  but
... integrate(partfrac(ex,x),x) => reasonable solution
... integrate(ratsimp(ex),x) => reasonable solution




On Thu, Oct 17, 2013 at 7:00 PM, Michel Talon <talon at lpthe.jussieu.fr>wrote:

> Raymond Toy wrote:
> >>>>>> "maryam" == maryam shamssolary <shamssolary at gmail.com> writes:
> >
> >     maryam> Dear Master
> >
> >
> >     maryam> I am a young researcher in numerical linear algebra. For some
> calculations, I used your "Maxima"
> >     maryam> software. But I have some problems with some commands such
> as:
> >     maryam>  integrate(1/(r+s*x+t*x^2)*1/sqrt(1-x^2), x, -1, 1);
> >
> >
> >     maryam> give me this message:
> >     maryam> "Is  "4*r*t-s^2"  positive, negative, or zero?"
> >
> >
> >     maryam> I tried different answers but did not?! What do you suggest?
> >
> > Maxima cannot do all integrals of this form. It appears that maxima
> > can only do this if t*x^2+s*x+r has real roots. The case for complex
> > roots is not handled. This is why maxima is asking for the sign of
> > 4*r*t-s^2. The roots are real if 4*r*t-s^2 is zero or negative.
> >
> > After this maxima may ask many more questions as it breaks the
> > original integral into two new integrals. I find the questions hard to
> > answer. :-(
> >
> > You might get a feel for what is going on by using some numerical
> > values for r, s, and t.
> >
> > Sorry that maxima can't easily produce an answer for you.
> >
> > Ray
>
>
> By the way i have tried with maple and mathematica which all give very
> complicated answers. So i have tried to find something simpler by hand.
>
> Suppose you know the roots of r+s*x+t*x^2. Then you can as well replace
> that by (x-a)*(x-b).
>
> The inverse of which can be written as
> 1/(a-b)*(1/(x-a)-1/(x-b)).
>
> This reduces the problem to one that maxima easily handles:
>
> (%i3) integrate(1/(x-a)*1/sqrt(1-x^2), x, -1, 1);
> Is  a - 1  positive, negative, or zero?
>
> p;
>                                            2
>                                2 %pi sqrt(a  - 1)
> (%o3)                        - ------------------
>                                        2
>                                     2 a  - 2
> If you answer n; you have some more sign questions, for example:
>
> (%i2) integrate(1/(x-a)*1/sqrt(1-x^2), x, -1, 1);
> Is  a - 1  positive, negative, or zero?
>
> n;
> Is  a + 1  positive, negative, or zero?
>
> p;
> Principal Value
>                                  2                           2
>                 log(2) sqrt(1 - a )   log(2 - 4 a) sqrt(1 - a )
> (%o2)           ------------------- - -------------------------
>                        2                        2
>                       a  - 1                   a  - 1
>
>
> As you can see these formulas require appropriate signs for the arguments
> of the logs to be "correct" in an elementary sense. Are they true? I
> don't know. For exemple in the second case one has -1<a<1 so for
> 1/2<a<1 one has 2-4*a <0 which renders the formula highly suspect.
>
>
> --
> Michel Talon
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>