Incredible symbolic integration problems

7 visualizzazioni (ultimi 30 giorni)
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)

Risposta accettata

Star Strider
Star Strider il 8 Gen 2020
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 Commenti
Walter Roberson
Walter Roberson il 8 Gen 2020
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 il 8 Gen 2020
@Walter — Thank you!

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by