0
|
7703 Views
|
15 Replies
|
6 Total Likes
View groups...
Share
GROUPS:

# Error in Mathematica computation

Posted 9 years ago
 Hello, In mathematica, I tried to find Integral of ln(1 + x)/(x^2 + 1) from 0 to 1 The answer is CLEARLY ln(2)pi/8 Mathematica computes the answer to be: 1/4 ln ([Pi] + Log) Which is incorrect. Why is Mathematica computing this error??
15 Replies
Sort By:
Posted 9 years ago
 Nice! Thanks
Posted 9 years ago
 Capitalize log - should be Log.
Posted 9 years ago
 Notebook attached. Attachments:
Posted 9 years ago
 Need Log
Posted 9 years ago
 ln[x+1]/(x^2+1) Is what I enter, I cant type the code for this, but this is what I do next. Then I press the definite x integralThat gives the incorrect answer.
Posted 9 years ago
 f[x_] := Log[1+x]/(x^2+1); Integrate[ f[x], {x, 0, 1}] 
Posted 9 years ago
 Here are some posting basics I will recommend. Think of them as courtesies you might provide to the reader.(1) Input code instead of an image.(2) Check the documentation. Mathematica is case sensitive.(3) When you use a general phrase like "not working", consider the possibility that it might be working just fine.(4) Read the responses carefully in order to be sure you are replicating what they show.It is generally good practice to have a rudimentary familiarity with the software before making claims about bugs.
Posted 9 years ago
 A shame I can only give you one vote for this... I think that your "courtesy rules" should go onhttp://community.wolfram.com/groups/-/m/t/270507Cheers,Marco
Posted 9 years ago
 The correct syntax is Integrate[ Log[1+x]/(x^2+1), {x, 0, 1}]. The only problem here was that "Log" is the correct form of "ln". You may have received the incorrect answers based on some prior definitions. It is mostly a good idea to clear memory before starting fresh computations, with Clear["Global*"]or at leastClearAll[variablename] if the variable name is known.
Posted 9 years ago
 Hi,But how can this work if I want to FIRST input the function, and use the drop down integral option?
Posted 9 years ago
 It's impossible to cut and paste an image. It appears that this is your computation: Integrate[ln*(1+x)/(1+x^2), {x,0,1}] If so, you are making some erroneous assumptions. One is that "ln" and "Log" are viewed as the same entity in Mathematica. Another is that you are using correct syntax for what is, in Mathematica, Log[x+1]. Yet another is that the mistake, such as it is, is in the program and not the use thereof.A general rule in software is as follows: blame the program after rather than before checking documentation, and even then consider the possibility that you may have missed something.
Posted 9 years ago
 Hi,Its still not working, Posted 9 years ago
 ?ln 
Posted 9 years ago
 That is interesting. I typed in Integrate[Log[(1 + x)]/(x^2 + 1), {x, 0, 1}] `which gives which is as you state: CLEARLY correct. I tried a while and did not find what could make Mathematica produce the output you report.M.
Posted 9 years ago
 That is very weird. This is what I did. EDIT: natural log is the same as your log in Mathematica, then what is the issue?