Hey forum
When I solve this integral:
-x * (1/2) * int(log10(x)/x^2) + (1/2)*x^3 * int(log10(x)/x^4)
I get
(3*log(5) + 4)/(9*log(10))
which is the same as the answer from my other program:
(1/3)·log10(x)+0.193
But this is wrong!
The real answer should be:
(4/9) + log10(x)/3
How can this be?
Frank

댓글 수: 1

The reason why I know:
(4/9) + log10(x)/3
Is right, is because im solving a nonhomogeneous linear ODE and when i pop it in, it gives the right answer.
When I try with the other solution, it gives me a wrong answer.

댓글을 달려면 로그인하십시오.

 채택된 답변

David Goodmanson
David Goodmanson 2017년 1월 5일
편집: David Goodmanson 2017년 1월 5일

1 개 추천

Hello Frank, This might be more of an observation than an answer, but one point not in your favor is that since log10(x) = log(x)/log(10), your entire integral is proportional to 1/log(10):
Int = (1/log(10)) * [ -x * (1/2) * int(log(x)/x^2) + (1/2)*x^3 * int(log(x)/x^4) ]
With the annoying log10 behavior out of there, the rest of the integral is
(1/3)log(x) + 4/9
and the entire answer is what your symbolic math programs are saying. However, there are a couple of indefinite integrals here and it's possible that there is an additional constant floating around having to do with the lower limit for x in the integrals (and of course things also depend on whether you are using log or log10 in the ODE).

댓글 수: 3

Frank Hansper
Frank Hansper 2017년 1월 5일
편집: Frank Hansper 2017년 1월 5일
Interesting indeed!
It seems, that my advisor is not consistent with his "log"-terms. In my exercise it is not specified that it is the naturel logarithm, which I now think he meant.
It says log, but I thought all the way, that it was the log10.
I thought it was only matlab, which uses "log" as naturel log otherwise it would be written as ln(x) or loge(x), which are not written in my exercise.
Thank you for your answer sir - I will notice my advisor about it.
Walter Roberson
Walter Roberson 2017년 1월 5일
I did some searching a couple of months ago, and I had difficulty finding a programming language which used ln() or loge() for natural log; all the ones I checked used log() for natural log.
Frank Hansper
Frank Hansper 2017년 1월 7일
편집: Frank Hansper 2017년 1월 7일
I will remember that. Matlab is my "first" encounter with programming language (pl), so my experience with others is limited. The reason I was confused is that my advisor is fond of solving integrals by hand, so I was puzzled to see log as ln (expecting him not to write in pl).
I have talked to him now and he said: "In my world log = ln", so it was a misunderstanding and my question is now all cleared out.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by