Incredible symbolic integration problems

2 次查看(过去 30 天)
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)

采纳的回答

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

请先登录,再进行评论。

更多回答(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