strange things about symbolic integral
1 view (last 30 days)
Show older comments
we i write this program, strange things happens:
% create symbolic function
syms w f g r q s t T v;
zb = (v*exp(-t/v))/((q^2*v^2 + 1)*(v^2*w^2 + 1));
zc = -(q^2*v*(cos(q*t)+q*v*sin(q*t)))/((q+w)*(q^2*v^2+1)*(q-w));
zd = (v*w^2*(cos(t*w)+v*w*sin(t*w)))/((q+w)*(v^2*w^2+1)*(q-w));
% symbolic int
ze = (zb+zc+zd)^2;
zf = zb*zb+zc*zc+zd*zd+2*zb*zc+2*zc*zd+2*zb*zd;
zs1 = int(ze,t,0,T);
zs2 = int(zf,t,0,T);
zs3 = int(expand(ze),t,0,T);
apprently, ze=zf, but zs1 didn't return an expected result, zs2 did
so i use expand() as a try, failed to get the right result again
the version is R2012a
IS MATLAB SO UNINTELLIGENT?
1 Comment
Roger Stafford
on 3 Mar 2015
Lou, be thankful that we humans are still more intelligent than computers. A time in the future may come when that will not be true and that will be hard on our pride.
Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!