HP Forums

Full Version: An integral for the Prime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following integral is from the 2005 Putnam competition:
$$\int_0^1 \dfrac{\ln(1+x)}{1+x^2} dx =\dfrac{\pi}{8} \ln 2.$$
In CAS, the input integrate(ln(1+x)/(1+x^2),x,0,1)} returns itself, while approx(integrate(ln(1+x)/(1+x^2),x,0,1)) returns 0.272198261288.

In WolframAlpha, the input (log is ln) integrate(log(1+x)/(1+x^2),x,0,1)} returns 0.272198261288 first and quickly changes to the exact value \((\pi/8)\log 2.\) Mathematica returns the exact value directly.

It would be nice if the Prime would return exact values for these logarithmic integrals. Maybe a "Dictionary or Real Numbers" (like the book of J and P Borwein) could be included in it (as part of the units) and used as a look-up table for finding the exact value.
(06-26-2014 04:14 PM)Alberto Candel Wrote: [ -> ]The following integral is from the 2005 Putnam competition:
$$\int_0^1 \dfrac{\ln(1+x)}{1+x^2} dx =\dfrac{\pi}{8} \ln 2.$$
In CAS, the input integrate(ln(1+x)/(1+x^2),x,0,1)} returns itself, while approx(integrate(ln(1+x)/(1+x^2),x,0,1)) returns 0.272198261288.

In WolframAlpha, the input (log is ln) integrate(log(1+x)/(1+x^2),x,0,1)} returns 0.272198261288 first and quickly changes to the exact value \((\pi/8)\log 2.\) Mathematica returns the exact value directly.

It would be nice if the Prime would return exact values for these logarithmic integrals. Maybe a "Dictionary or Real Numbers" (like the book of J and P Borwein) could be included in it (as part of the units) and used as a look-up table for finding the exact value.
Similar issue on maxima for android.
This is not an issue! It's just that giac and maxima don't do table lookup, instead they solve class of integrals. If you have a parametric closed formula that applies to this integral say for a specific value of some parameters, or a way to solve it using a method like the residue theorem, then I might be interested to add that in giac.
(06-27-2014 05:31 AM)parisse Wrote: [ -> ]This is not an issue! It's just that giac and maxima don't do table lookup, instead they solve class of integrals. If you have a parametric closed formula that applies to this integral say for a specific value of some parameters, or a way to solve it using a method like the residue theorem, then I might be interested to add that in giac.

Yes, I know it is not a giac issue. On the other hand, the Prime CAS returns the exact value of the following integral:
$$ \int_0^\infty \dfrac{\log x}{(1+x^2)^2} \, dx= -\dfrac{\pi}{4}.$$
But the Prime does not recognize Catalan's Constant:
$$\mathbf{G} = \int_1^\infty \dfrac{\log x}{1+x^2} \, dx.$$
(06-27-2014 04:35 PM)Alberto Candel Wrote: [ -> ]Yes, I know it is not a giac issue. On the other hand, the Prime CAS returns the exact value of the following integral:
$$ \int_0^\infty \dfrac{\log x}{(1+x^2)^2} \, dx= -\dfrac{\pi}{4}.$$
This one can be solved by the residue formula after change of var x->exp(x), it's of type 4 (line 636 in intgab.cc in giac source). No table lookup...
I have not been able to look into the giac source. I did look into the problem of evaluating some of these integrals of the form \(\int_0^1 R(x) (\log x)^m \, dx\), where \(R(x)\) is a power series in \(x\) satisfying certain conditions at \(x=1\). It does not seem to me that you need the residue formula, but only the value of integrals \(\int_0^1 x^n (\log x)^m \, dx = (- m)!/(n+1)^{m+1}\), which is easily obtained by parts. Integrals \(\int_1^\infty\) can be transformed to \(\int_0^1\) via the change \(x\to 1/x\), and integrals \(\int_0^\infty\) may be split like \(\int_0^1 + \int_1^\infty\). Many examples are given in Article 1071 of Edwards' Integral Calculus: the answer will depend on the series coefficients of \(R(x)\) and in many cases involves the Riemann and Dirichlet zeta functions (thus powers of \(\pi\) or Catalan's constant).

It doesn't seem to me that the Prime is using this approach for evaluation of those integrals above, as it can evaluate \(\int_0^\infty\) of some \(R(x) (\log x)^m\) but not \(\int_0^1\) of the same.
I don't think it's useful if you get a series, I believe most of the time it's better to replace a series by an integral (and you could get infinite recursions in giac, since some series are solved by replacing them by integrals). Of course there are some exceptions where you could replace your integral by a series where the sum is known.
Here you could do that:
Code:

normal(subst(int(ln(x)/(1+x^2),x,1,inf),x=1/t)
assume(m>=0);
am:=int(x^(2*m)*ln(x),x,0,1);
S:=sum((-1)^m*am,m,0,inf);
Then giac does not find a closed formula for S, perhaps there is some trick to do that?
Reference URL's