Symbolic Toolbox Issue with symbolic integration

조회 수: 2 (최근 30일)
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 2월 19일
댓글: Walter Roberson 2021년 2월 20일
There is an error problem in Symbolic toolbox while evaluating a symbolic integration formulation. Here is an example:
>> syms a b t; F = t/(a-b*t^2); int(F, t) % log() represents ln()
ans =
-log(b*t^2 - a)/(2*b)
% The correct answer is:
-(1/(2*b))*ln(a-b*t^2)
% Or a precisely accurate asnwer is:
-(1/(2*b))*ln(abs(a-b*t^2))
The QUESTION is how to make Symbolic MATH work accurately in such cases?
Thanks MUCH for any contributions and discussion in this regard.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 2월 19일
The toolbox is correct.
The position of the division is obviously not an issue due to commutivity. P/R = 1/R * P
Switching the sign of the expression inside the log() is justifiably disconcerting and looks like a mistake at first. However:
log(A*B) = log(A) + log(B). Therefore log(-1*B) = log(-1) + log(B). Therefore log(-x) = log(x) + a constant that is log(-1)
So there is a difference of a constant between what you expect and what you got.
But notice that you did an indefinite integral. And indefinite integrals are always "plus a constant". log(-1) = 2*π*i just becomes part of the constant.
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 2월 20일
Why would it be included there? The description of int() is not the place to describe the theory of calculus and the theory of logarithms! It probably is not the place to list all of the integration algorithms it uses or to go through and discuss their implications and the ways they might surprise people!
"I do know how to interpret the math side of the problem."
Well you do now that I have explained it to you, but you called the results an "error" when it is a correct result that had a different form than you were expecting.

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

카테고리

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