Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

platform (or version) dependence of int(int()) using syms Mac 10 El Cap R2015b vs. Ubuntu 15.10 R2015a

조회 수: 1 (최근 30일)
This code produces a result not containing x1p on Mac 10 El Cap R2015b (a development laptop), where x1p and x2p are just dummy variables of a double definite integral:
e = 0.5; x1 = 0; x2 = 4;
syms x1p x2p
assume(x1p,'real'); assume(x2p,'real');
R = ((x1 - x1p).^2 + (x2 - x2p).^2)^0.5;
int( ...
int( ...
8.0.*((x1 - x1p).^4)./R.^6 - 4.0.*((x1 - x1p).^2)./R.^4 - 1./R.^2, ...
x2p, ...
-e*(1 - x1p^2)^0.5, ...
e*(1 - x1p^2)^0.5 ...
), ...
x1p, ...
-1.0, ...
1.0 ...
)
But, the answer contains x1p for Ubuntu 15.10 R2015a (workhorse desktop). Am I doing something wrong? Or, should I give up because of some issue with R2015a.
I should say that because the integrals are definite, I would normally assume that x1p would be evaluated.
By the way, the results are perfect on the Mac.
Wisdom much appreciated
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 3월 10일
By the way, the exact solution is
(1/40401 * (23968 * sqrt(67) + 287296)) * arctan(7/(sqrt(67)-2)) + (1/40401 * (23968 * sqrt(67) - 287296)) * arctan(9/(sqrt(67)-2)) + (1/40401 * (23968 * sqrt(67) - 287296)) * arctan(7/(sqrt(67)+2)) + (1/40401 * (23968 * sqrt(67) + 287296)) * arctan(9/(sqrt(67)+2)) - (44/9)*pi
Eric  Bryant
Eric Bryant 2016년 3월 10일
@Walter you're a mench... Maybe I should just be getting the exact solutions on the Mac (?) I have been nervous about this because of the singularity because of 1/R-like terms. (It's actually pretty impressive this works on any platform.)

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by