A not so basic question :)



Commercial Macsyma says
"principal value %pi*x"

This is one of the areas in which the company did a lot of work.

RJF


Nikolaos I. Ioakimidis wrote:
> Dear Madhusudan,
> 
> Many thanks for your message below.
> 
> Yes, this is not a so basic question. My brief comments and
> some suggestions:
> 
> My own computations have as follows:
> 
> (C1) display2d : false$
> (C2) assume(x<1)$
> (C3) assume(x>-1)$
> (C4) integrate(sqrt(1-s^2)/(x-s),s,-1,1);
> Is  x  zero or nonzero?
> n;
> Principal Value
> (D4) SQRT(1-x^2)*LOG(-1/(2*x-1))+%PI*x
> 
> and agree with yours. My conclusions are:
> 
> 1. Yes, Maxima does not compute the above Cauchy-type principal 
> value integral correctly. I think this can be called a bug. This is my
> own opinion. I would like to hear further from colleagues, since I
> may be wrong.
> 
> 2. Practically speaking, if I would be interested to compute the 
> above Cauchy-type principal value integral with Maxima and 
> correctly, I would simply use the command
> 
> (C5) integrate(sqrt(1-s^2)/(z-s),s,-1,1);
> Is  z-1  positive, negative, or zero?
> p;
> (D5) %PI*z-%PI*SQRT(z^2-1)
> 
> (yes, positive, but valid for complex values of z too) leaving the
> variable z outside the critical interval [-1, 1]. This result is 
> correct. Next, for the computation of the Cauchy-type
> principal value integral, I would add (preferably by hand) the
> values in (D5) for z = x+0 and z = x-0, getting the average,
> i.e. %PI*x taking into account that for these values of z
> (i.e. z = x+0 and z = x-0 with -1 < x < 1) the square root
> sqrt(z^2-1) takes opposite imaginary values, i.e. %i*sqrt(1-x^2)
> and -%i*sqrt(1-x^2) with a sum zero. Therefore, the 
> contribution is just (1/2)*(%PI*x+%PI*x) = %PI*x. This
> is the correct result. This comment takes into account the
> second Plemelj formula for Cauchy-type principal value
> integrals. (Another way of computation could be a change 
> of variable.)
> 
> When using Maxima, I would prefer the above approach on
> the basis of the second Plemelj formula. (D5) is essentially
> the correct result, the square root ignored there as I explained 
> above. A third way would be the epsilon definition of a
> Cauchy-type principal value integral. This could succeed too.
> (The direct subtraction of the singularity seems impossible.)
> 
> In any case, I repeat I believe this is a bug under the assumption
> that Maxima is programmed to compute Cauchy-type principal
> value integrals, but I doubt if this programming task has been
> done in a systematic way. 
> 
> I am looking forward to hear from the colleagues with much 
> more experience in Maxima than me. (I am a novice in 
> Maxima.)
> 
> This is the situation according to my opinion. The advice is:
> avoid principal value integrals in Maxima and just use the
> second Plemelj formula on the related ordinary integrals
> instead. I would be glad to hear on a better advice.
> 
> Incidentally, I can add that I have recently suggested the
> extension of the special functions Maxima package of 
> Barton with second kind functions corresponding to the 
> classical orthogonal polynomials. In such a case, perhaps
> Maxima could be instructed on the second kind functions
> corresponding to the Chebyshev polynomials of the second
> kind that these are related to the Chebyshev polynomials
> of the first kind as is your correct result %pi*x. (1 means
> U[0](x) and x means T[1](x).) Perhaps, you do not like
> this approach, but I like it very much.
> 
> As far as I am concerned, I am unable to suggest something
> more practical for your computation. I do not have more
> experience with Maxima so far.
> 
> Best regards from Patras, 
> 
> Nikos
> 
> ----- Original Message ----- 
> From: "Madhusudan Singh" <chhabra at eecs>
> To: <Maxima@www.ma.utexas.edu>
> Sent: Sunday, April 13, 2003 4:19 PM
> Subject: A not so basic question :)
> 
> 
> 
>>Hi
>>    Thanks to everyone who has been helping me with my basic questions. 
>>However, I have a question that is not so basic, or at least so it seems 
>>to me.
>>
>>    Consider the following use of integrate (the integrand is singular 
>>in the domain) :
>>
>>assume(x<1);
>>assume(x>-1);
>>f(x):=integrate(sqrt(1-s^2)/(x-s),s,-1,1);
>>f(x);
>>
>>Maxima returns the Principal Value as :
>>
>>Principal Value$$\isqrt{1-x^{2}}\*\log 
>>\left(-\ifracd{1}{2\*x-1}\right)+\pi\*x$$
>>
>>(what's with the non-tex \ifracd and \isqrt anyway ?)
>>
>>The correct answer (confirmed with a hand calculation and Mathematica) 
>>is simply \pi*x.
>>
>>Is this a bug ?
>>
>>Thanks,
>>MS.
> 
> 
> 
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima