Symsum returns symbolic expression instead of value
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Steven Lord
le 26 Fév 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 commentaires
Walter Roberson
le 27 Fév 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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!