Matlab solve the integration in version 2008 but doesn't solve it in version 2011b
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
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
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
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
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!