Help with symsum function?
2 views (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 11 Sep 2012
You can specify the variable of summation in between the expression and the limits. For example,
symsum(1/k^2, k, 3, inf)
Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!