필터 지우기
필터 지우기

Incredible symbolic integration problems

조회 수: 2 (최근 30일)
Giuseppe Infantino
Giuseppe Infantino 2020년 1월 8일
댓글: Star Strider 2020년 1월 8일
Guys, I have incredible integration issues, see below:
I need to calculate a difficult integral and I didn't obtain good results, so I try a very simple integral in order to try to understand the problem and as you can see from the code below, Matlab provides a wrong results, beacuse the correct results is (-log(1-x)) and not (-log(x-1)), and for these reasons I'm having lots of troubles in my computations. Honestly, I have no idea about this problem, I even doubts about my capabilty of calculating such a simple integral so that I verify with WolphramAlpha that provides the correct results!
Could someone help me? Thank you very much and sorry for my english.
>> int ((-1./(1-x), x)
ans =
-log(x-1)
  댓글 수: 1
Giuseppe Infantino
Giuseppe Infantino 2020년 1월 8일
Thanks, I'm using 9.4.0.813654 R2018a version

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

채택된 답변

Star Strider
Star Strider 2020년 1월 8일
It looks correct to me.
The int call first simplifies:
-1/(1-x)
to:
1/(x-1)
and then integrates it to get:
Q1 = int (-1./(1-x), x)
producing:
Q1 =
log(x - 1)
The unary negative does not propagate when I run it in R2019b.
  댓글 수: 5
Walter Roberson
Walter Roberson 2020년 1월 8일
There is absolutely no way?
I would not say that there is absolutely no way, but I would say that it might take someone outside of Mathworks... 2 or 3 person-years at least. It would involve a fundamental change to the simplification algorithm, and there is a whole bunch of existing mathematical library code that counts on the algorithm being what it currently is, so it would take a careful review of every routine inside the Symbolic Toolbox to ensure that they did not break.
It would be a lot faster if you were willing to adapt a different syntax, such as
int( DIVIDE(-1, 1-x), x)
because that could be implemented as a new data structure that only had to be processed by a limited number of routines, with it just being expected that (for example) GAMMA() could not be called on the result
Star Strider
Star Strider 2020년 1월 8일
@Walter — Thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by