Matlab solve the integration in version 2008 but doesn't solve it in version 2011b
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Walter Roberson
el 9 de Mayo de 2012
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 comentarios
Friedrich
el 9 de Mayo de 2012
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
el 9 de Mayo de 2012
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
el 9 de Mayo de 2012
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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!