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.
댓글 수: 0
채택된 답변
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
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 Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
