Help with symsum function?

2 次查看(过去 30 天)
Phillip Hatfield
Phillip Hatfield 2012-9-10
I'm trying to use symsum to sum an expression for a homework problem. Because it is a homework problem and I'm using the variable they plan to test the program with I assume that the summation must converge.
syms k n g;
r1 = symsum((1/n^5)*(192/pi^5)*(h/w)*tanh(n*pi*w/(2*h)),1,inf);
r2 = symsum((1/k^5)*(192/pi^5)*(h/w)*tanh(k*pi*w/(2*h)),3,inf);
r3 = symsum((1/g^5)*(192/pi^5)*(h/w)*tanh(g*pi*w/(2*h)),5,inf);
Rf = (12*u*Lc)/(h^3*w)*(1-(r1*r2*r3))^-1;
As far as I know this should give me the sums of those first functions and then the following expression give me the value I want, however this is the output I get:
Rf =
-3/(50000*((5507759538957653564026027263058221796454041*sum(tanh(pi*g)/g^5, g == 5..Inf)*sum(tanh(pi*k)/k^5, k == 3..Inf)*sum(tanh(pi*n)/n^5, n == 1..Inf))/178405961588244985132285746181186892047843328 - 1))
r1 =
(176600389502281*sum(tanh(pi*n)/n^5, n == 1..Inf))/562949953421312
r2 =
(176600389502281*sum(tanh(pi*k)/k^5, k == 3..Inf))/562949953421312
r3 =
(176600389502281*sum(tanh(pi*g)/g^5, g == 5..Inf))/562949953421312
If someone could help me fix whatever is wrong I would be very appreciative.
-Phil
  3 个评论
Phillip Hatfield
Phillip Hatfield 2012-9-11
It doesn't look like it. I used symvar and it didn't return anything, not sure how I would get matlab to use the variables
Walter Roberson
Walter Roberson 2012-9-11
You can specify the variable of summation in between the expression and the limits. For example,
symsum(1/k^2, k, 3, inf)

请先登录,再进行评论。

回答(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