Error in series summation

1 visualizzazione (ultimi 30 giorni)
Giorgos Papakonstantinou
Giorgos Papakonstantinou il 26 Gen 2013
Commentato: REEMA MOHANTY il 14 Nov 2020
I am trying to do a summation of a series as shown below:
syms x n S lf Wf jmpp Rb Wb
Iline=4*jmpp*S*lf/Wf;
I1=(n-1)*Iline*Wf+Iline*x;
I2=n*Iline*Wf;
dR=Rb/Wb;
P1=int(I1^2*dR,0,Wf);
P2=I2^2*dR*S;
Pt=P1+P2;
pb=symsum(Pt,n,1,4);
The summation works fine if I do it for:
pb=symsum(Pt,n,1,6);
or
pb=symsum(Pt,n,1,10);
but for some reason not for 4 and 5!! Do you know why is that?
  2 Commenti
Matt J
Matt J il 26 Gen 2013
Elaborate on "nor for 4 and 5". What do you see and what do you think you should see?
Giorgos Papakonstantinou
Giorgos Papakonstantinou il 26 Gen 2013
Matt I have elaborated it. Can you see the results? It is strange...

Accedi per commentare.

Risposte (2)

Giorgos Papakonstantinou
Giorgos Papakonstantinou il 26 Gen 2013
If I do it for
pb=symsum(Pt,n,1,n);
I get the result:
pb=(8*(2*Rb*S^3*jmpp^2*lf^2*n^3 + 3*Rb*S^3*jmpp^2*lf^2*n^2 + Rb*S^3*jmpp^2*lf^2*n + 2*Rb*Wf*S^2*jmpp^2*lf^2*n^3))/(3*Wb);
I set:
n=4;
I get:
pb =
(1440*Rb*S^3*jmpp^2*lf^2 + 1024*Rb*Wf*S^2*jmpp^2*lf^2)/(3*Wb)
Then I would like to confirm the result by doing the calculations for n=1 until n=4 as shown below:
Pa1=int((Iline*x)^2*dR,0,Wf);
Pa2=(Iline*Wf)^2*dR*S;
Pb1=int((Iline*Wf+Iline*x)^2*dR,0,Wf);
Pb2=(2*Iline*Wf)^2*dR*S;
Pc1=int((2*Iline*Wf+Iline*x)^2*dR,0,Wf);
Pc2=(3*Iline*Wf)^2*dR*S;
Pd1=int((3*Iline*Wf+Iline*x)^2*dR,0,Wf);
Pd2=(4*Iline*Wf)^2*dR*S;
Pt=Pa1+Pa2+Pb1+Pb2+Pc1+Pc2+Pd1+Pd2;
Then I take the fraction
pb/Pt
and I get 1. In this way review that the series is working fine.
But for some reason when I am asking from matlab to do the summation from 1 until 4. I get the following error.
Error using mupadmex
Error in MuPAD command: The number of arguments is incorrect. [has]
Evaluating: sum
Error in sym/symsum (line 65)
rSym = mupadmex('symobj::map',f.s,'symobj::symsum',x.s,a.s,b.s);
Error in sumseries (line 17)
pb=symsum(Pt,n,1,4);

Giorgos Papakonstantinou
Giorgos Papakonstantinou il 27 Gen 2013
I have tried the matlab script above in other pc's without a problem. I cannot understand why is this happening.
  1 Commento
REEMA MOHANTY
REEMA MOHANTY il 14 Nov 2020
Even I am getting the same result .
Could anyone suggest something?

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by