Difficult improper integral using mathematica

In summary: IF statement and assumptions. He needs help resolving the issue to be able to take the limit. He attempted to do the integral in Maple, but got a nice, simple formula (but involving the non-elementary "dilog" function): f:=log(x)/(1+x); ln(x)/(1+x) J:=int(f,x);
  • #1
Drezzan
7
0

Homework Statement


evaluate $$\int_0^1\frac{Ln(x)}{1+x}\,dx$$


Homework Equations


I know the way to solve most improper integrals; replacing 0 or the bound causing the issue with a variable and have the limit of the integral as the variable goes to infinity. My question is using mathematica how do I get a reasonable result?


The Attempt at a Solution


I had started just looking for the indefinite integral first, just to keep an eye on the method mathematica was using and making sure I agreed. I had not tried this by hand yet. $$\int\frac{Ln(x)}{1+x}\,dx$$
This however spat out an crazy result about a screen length wrong with an IF statement and an assumptions (it is far to long to type here). I need help at this juncture. What caused the issue and how do I resolve it to allow me to take the limit of the integral?
 
Physics news on Phys.org
  • #2
By Ln(x) do you mean the natural log of x ( usually written ln(x) )? If so, Mathematica gives me a simple result:

Integrate[Log[x]/(1 + x), {x, 0, 1}] = - (pi^2 / 12)
 
  • #3
Drezzan said:

Homework Statement


evaluate $$\int_0^1\frac{Ln(x)}{1+x}\,dx$$


Homework Equations


I know the way to solve most improper integrals; replacing 0 or the bound causing the issue with a variable and have the limit of the integral as the variable goes to infinity. My question is using mathematica how do I get a reasonable result?


The Attempt at a Solution


I had started just looking for the indefinite integral first, just to keep an eye on the method mathematica was using and making sure I agreed. I had not tried this by hand yet. $$\int\frac{Ln(x)}{1+x}\,dx$$
This however spat out an crazy result about a screen length wrong with an IF statement and an assumptions (it is far to long to type here). I need help at this juncture. What caused the issue and how do I resolve it to allow me to take the limit of the integral?

Maple gets a nice, simple formula (but involving the non-elementary "dilog" function):
f:=log(x)/(1+x);

ln(x)/(1+x)

J:=int(f,x);

J := dilog(1 + x) + ln(x) ln(1 + x)

We can evaluate the definite integral from this:

J1:=limit(J,x=1,left);

-Pi^2 /12

J0:=limit(J,x=0,right);

J0 := 0

Therefore, the definite integral is - π2/12. We also get this right away if we ask Maple to do the definite integral.

I do not have access to Mathematica, so cannot help you with that aspect of your problem.

RGV
 
  • #4
I am still unsure of what I did wrong but after retyping it today I got the same answer. So I don't have to do any other operations even though it is in improper form? I just want to make sure that there wouldn't be a different result if preformed a different way.
 
  • #5
Drezzan said:
I am still unsure of what I did wrong but after retyping it today I got the same answer. So I don't have to do any other operations even though it is in improper form? I just want to make sure that there wouldn't be a different result if preformed a different way.

As I said already, I get -pi^2/12 when I do it in Maple. I do not have access to Mathematica, but when I try it on Wolfram Alpha I get a numerical answer which is, in fact, the numerical value of -pi^2/12. I am assuming that Mathematica is the computational engine behind Wolfram Alpha, so Mathematica knows how to do the integral and gets the right answer. The only conclusion I can draw is that something is wrong with your input. But, not being a Mathematica user, I cannot tell what your problem may be. Why don't you post the detailed instruction here, so others can look at it?

RGV
 

1. How do I use Mathematica to solve a difficult improper integral?

To solve a difficult improper integral using Mathematica, you can use the built-in function NIntegrate. This function allows you to numerically approximate the integral, taking into account any convergence issues. You can also specify the integration limits and any other necessary parameters.

2. What are some common errors when using Mathematica to solve improper integrals?

Some common errors when using Mathematica to solve improper integrals include not properly specifying the integration limits, incorrect syntax in the input, and not taking into account potential convergence issues. It is important to carefully check your input and make sure all necessary parameters are included.

3. How does Mathematica handle singularities in improper integrals?

Mathematica has built-in algorithms that can handle many types of singularities, such as infinite or oscillatory ones. However, in some cases, it may not be able to handle them automatically and you may need to specify a different integration method or use a different software program.

4. Can Mathematica handle multi-dimensional improper integrals?

Yes, Mathematica can handle multi-dimensional improper integrals using the NIntegrate function. You can specify the integration limits for each variable and any other necessary parameters. However, keep in mind that solving multi-dimensional integrals can be computationally intensive and may require more advanced techniques.

5. Is there a limit to the complexity of improper integrals that Mathematica can handle?

Mathematica can handle a wide range of improper integrals, including those with singularities and multi-dimensional integrals. However, as the complexity of the integral increases, the computation time and memory usage may also increase. In some cases, it may be necessary to use specialized software or techniques to solve extremely complex improper integrals.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
923
  • Calculus and Beyond Homework Help
Replies
13
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
985
  • Calculus and Beyond Homework Help
Replies
2
Views
121
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Back
Top