Symsum returns symbolic expression instead of value
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Grant Lee
am 26 Feb. 2021
Kommentiert: Grant Lee
am 1 Mär. 2021
I would like to solve the equation shown in the picture.
Try to run the code:
syms m
assume(m,{'positive','integer'})
x=2
y=2
%W=0.4 L=0.3
r=symsum(((1-cos(m*pi))/(m*pi))*sinh((m*pi*(0.4-y)/0.3))/(sinh((m*pi*0.4/0.3)))*sin(m*pi*x/0.3),m,1,inf)
and it returns to:
val =
symsum((sin((20*pi*m)/3)*sinh((16*pi*m)/3)*(cos(pi*m) - 1))/(m*sinh((4*pi*m)/3)), m, 1, Inf)/pi
It would not returns to the exact value, as I tried eval()/vpa().
Not sure what else I can do to solve it.
Thank you for your time and help.
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 26 Feb. 2021
What makes you believe that this summation converges?
syms m
f = sinh(16*pi*m/3)./sinh(4*pi*m/3);
fplot(f, [0 10])
This term takes off like a rocket by the time you reach m = 6 or m = 7.
The fact that you're working with trig functions whose arguments are integer multiples of pi makes me suspect there's a lot of multiplication and division by zero (or would be if pi were exactly πor if you used sinpi and cospi.)
4 Kommentare
Walter Roberson
am 27 Feb. 2021
With 0.0096 it does appear to converge.
Even m the result is 0 because 1-cos(pi*m) -> 1-1
So you can remap to m = 2*M+1, M=1..infinity .
The number of terms to use depends upon your desired accuracy. It looks to me as if M=160 should get you accuracy to +/- 1e-16
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!