필터 지우기
필터 지우기

Incorrect integral calculation in MuPAD

조회 수: 1 (최근 30일)
Nishant Shankhwar
Nishant Shankhwar 2015년 12월 22일
댓글: Walter Roberson 2015년 12월 23일
Integration of function x-1 wrt x using command int(x-1,x) in MuPAD gives answer as (x-1)^2/2 instead of x^2/2-x. Can anybody explain why?
Thanks in advance.
Regards Nishant

답변 (1개)

Walter Roberson
Walter Roberson 2015년 12월 22일
The difference between the two is 1/2 which is a constant and so falls into the usual "plus an arbitrary constant" category. If you diff((x-1)^2/2,x) you get x-1, so you cannot say that the result is incorrect.
  댓글 수: 2
Nishant Shankhwar
Nishant Shankhwar 2015년 12월 23일
Your argument is correct, but in sympy or maple same integral comes out to be x^2/2-x and diff(x^2/2-x,x) is x-1. Therefore x^2/2-x seems more convincing than (x-1)^2/2.
Walter Roberson
Walter Roberson 2015년 12월 23일
x^2/2 - x might be more conventional but remember that the indefinite integral is really x^2/2 - x + a constant, so any result of the form x^2/2 - x + a particular constant + an implied constant is mathematically correct
It does look unusual, but the mathematics of it is sound.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by