Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
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 Commenti
Walter Roberson
Walter Roberson il 10 Mar 2016
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 il 10 Mar 2016
@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.)

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by