Symsum returns symbolic expression instead of value

3 次查看(过去 30 天)
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.

采纳的回答

Steven Lord
Steven Lord 2021-2-26
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 个评论
Walter Roberson
Walter Roberson 2021-2-27
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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by