Matlab solve the integration in version 2008 but doesn't solve it in version 2011b

1 回表示 (過去 30 日間)
LuisTorres
LuisTorres 2012 年 5 月 8 日
This is the code:
syms rho phi z pl a real
rsubrl = [-rho,-phi,z];
e0 = 8.854e-12;
mod = dot(rsubrl,rsubrl)^0.5;
integrando = rsubrl*a*pl/(4*pi*e0*mod^3);
int(integrando,phi,0,2*pi)
Matlab 2008 solved this integral without problems, but in Matlab 2011b this error message appeared: "Warning: Explicit integral could not be found. "
Sorry for my poor English.

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 5 月 9 日
Was it R2008a that was able to find the solution? R2008a had its symbolic engine based on Maple, whereas the symbolic engine for R2011b is based on MuPAD.
  2 件のコメント
Friedrich
Friedrich 2012 年 5 月 9 日
Walter is right. The MuPAD engine is far less powerfull than the Maple engine. There is not much you can do. Downgrading to an older MATLAB version is the only way I see here.
Maybe also consider contacting MathWorks and put in an enhancement request so that the MuPAD eninge can solve this somedays.
Walter Roberson
Walter Roberson 2012 年 5 月 9 日
Note that even with the Maple engine, the constraint of "real" on the syms is important for getting a good result: otherwise a piecewise result is generated for each component. The piecewise results can be simplified afterwards under the assumption of real, but the Maple engine is not powerful enough to notice that some of the cases are never going to be true, so it gets pretty messy.

サインインしてコメントする。


Alexander
Alexander 2012 年 5 月 9 日
It seems that MuPAD gets confused by the assumptions. At the moment, int gives a huge result in piecewises. If you do the following, you get a more useful result:
syms rho phi z pl a real
rsubrl = [-rho,-phi,z];
e0 = 8.854e-12;
mod = dot(rsubrl,rsubrl)^0.5;
integrando = rsubrl*a*pl/(4*pi*e0*mod^3);
syms rho phi z pl a clear
int(integrando,phi,0,2*pi)
This does not seem right to me, but at least it gives a result.

Community Treasure Hunt

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

Start Hunting!

Translated by