### Related

nterms(M(x,y));

Calculate

##### nterms

nterms((not M(x,y)));

Calculate

? nterms;

Calculate

##### nterms-part

nterms(part(not M(x,y...

Calculate

nterms(M(x,y));

Calculate

##### nterms

nterms((not M(x,y)));

Calculate

? nterms;

Calculate

##### nterms-part

nterms(part(not M(x,y...

Calculate

### nterms

Run Example
```(%i1)ans:(ev(Iout,linsolve([1/R1+1/R2+1/RL+s*CL+0.9*gmd*v2-1/R1*v3-1/R2*v4+Iout=0, (1/RA+s*CA)*v2-s*CC*v3-gmA*v4=0, -1/R1+0.1*gmd*v2+(1/R1+s*CFB)*v3-s*CFB*v4=0, -1/R2-s*CFB*v3+(1/R2+s*CFB)*v4=0],[v2,v3,v4,Iout])));

rat: replaced 0.9 by 9/10 = 0.9

rat: replaced 0.1 by 1/10 = 0.1
2                            3
(%o1) - ((R1 (CL (s  (gmd CC RA + 10 CFB) + 10 s  CA CFB RA)
2
+ 10 gmd s CFB gmA RA + 10 gmd s  CC CFB RA)
2                   3
+ R2 (CL R1 (gmd s  CFB gmA RA + gmd s  CC CFB RA)
3                 2
+ CL (10 s  CA CFB RA + 10 s  CFB) + 10 gmd s CFB gmA RA
2                      2
+ 10 gmd s  CC CFB RA) + CL (10 s  CA RA + 10 s) + 10 gmd gmA RA
2
+ 10 gmd s CC RA) RL + R2 (R1 (gmd s CFB gmA RA + gmd s  CC CFB RA)
2                                                          2
+ 10 s  CA CFB RA + 10 s CFB) + R1 (s (gmd CC RA + 10 CFB) + 10 s  CA CFB RA)
2                  2                                                          2
+ 10 s CA RA + 10)/((R2 (R1 (gmd s CFB gmA RA + gmd s  CC CFB RA) + 10 s  CA CFB RA + 10 s CFB) + R1 (s (gmd CC RA + 10 CFB) + 10 s  CA CFB RA) + 10 s CA RA + 10)
RL)
(%i2) valueList:[gmA=10e-3,gmd=100e-3,R1=25,R2=100e3,CFB=1e-12,RL=1e3,RA=10e3,CC=1e-12,CL=1e-9,CA=1e-12];
(%o2) [gmA = 0.01, gmd = 0.1, R1 = 25, R2 = 100000.0,
CFB = 9.9999999999999998E-13, RL = 1000.0, RA = 10000.0,
CC = 9.9999999999999998E-13, CL = 1.0000000000000001E-9,
CA = 9.9999999999999998E-13]
(%i3) trunkTh:0.1;
(%o3)                                 0.1
(%i4) eq:expand(num(ans));
2                               3
(%o4) - gmd s  CFB CL gmA R1 R2 RA RL - gmd s  CC CFB CL R1 R2 RA RL
3
- 10 gmd s CFB gmA R2 RA RL - 10 s  CA CFB CL R2 RA RL
2
- 10 gmd s  CC CFB R2 RA RL - 10 gmd s CFB gmA R1 RA RL
3                           2                          2
- 10 s  CA CFB CL R1 RA RL - gmd s  CC CL R1 RA RL - 10 gmd s  CC CFB R1 RA RL
2
- 10 gmd gmA RA RL - 10 s  CA CL RA RL - 10 gmd s CC RA RL
2                    2
- 10 s  CFB CL R2 RL - 10 s  CFB CL R1 RL - 10 s CL RL
2                       2
- gmd s CFB gmA R1 R2 RA - gmd s  CC CFB R1 R2 RA - 10 s  CA CFB R2 RA
2
- 10 s  CA CFB R1 RA - gmd s CC R1 RA - 10 s CA RA - 10 s CFB R2 - 10 s CFB R1
- 10
(%i5) eq2:0;
(%o5)                                  0
(%i6) order_of_s:hipow(eq, s);
(%o6)                                  3
(%i7) for j:0 while (j <
= order_of_s) do (  subeq:expand(coeff(eq, s, j)),  subeqValue:ev(subeq, valueList),  numberOfTerms:nterms(subeq),  for i:1 while (i <
= numberOfTerms) do (    subsubeq:part(subeq, i),    if ev(subsubeq, valueList) >
trunkTh * subEqValue then eq2:eq2 + subsubeq*s^j,    if ev(subsubeq, valueList) >
(trunkTh * subEqValue) then print(subsubeq) else print(subsubeq)    )  );
(%o7)                                done
(%i8) print(eq2);
0
(%o8)                                  0
(%i9) ```
Run Example
```gout:(ev(Iout,linsolve([1/R1+1/R2+1/RL+s*CL+0.9*gmd*v2-1/R1*v3-1/R2*v4+Iout=0, (1/RA+s*CA)*v2-s*CC*v3-gmA*v4=0, -1/R1+0.1*gmd*v2+(1/R1+s*CFB)*v3-s*CFB*v4=0, -1/R2-s*CFB*v3+(1/R2+s*CFB)*v4=0],[v2,v3,v4,Iout])));

rat: replaced 0.9 by 9/10 = 0.9

rat: replaced 0.1 by 1/10 = 0.1
2                            3
(%o1) - ((R1 (CL (s  (gmd CC RA + 10 CFB) + 10 s  CA CFB RA)
2
+ 10 gmd s CFB gmA RA + 10 gmd s  CC CFB RA)
2                   3
+ R2 (CL R1 (gmd s  CFB gmA RA + gmd s  CC CFB RA)
3                 2
+ CL (10 s  CA CFB RA + 10 s  CFB) + 10 gmd s CFB gmA RA
2                      2
+ 10 gmd s  CC CFB RA) + CL (10 s  CA RA + 10 s) + 10 gmd gmA RA
2
+ 10 gmd s CC RA) RL + R2 (R1 (gmd s CFB gmA RA + gmd s  CC CFB RA)
2                                                          2
+ 10 s  CA CFB RA + 10 s CFB) + R1 (s (gmd CC RA + 10 CFB) + 10 s  CA CFB RA)
2                  2                                                          2
+ 10 s CA RA + 10)/((R2 (R1 (gmd s CFB gmA RA + gmd s  CC CFB RA) + 10 s  CA CFB RA + 10 s CFB) + R1 (s (gmd CC RA + 10 CFB) + 10 s  CA CFB RA) + 10 s CA RA + 10)
RL)
(%i2) valueList:[gmA=10e-3,gmd=100e-3,R1=25,R2=100e3,CFB=1e-12,RL=1e3,RA=10e3,CC=1e-12,CL=1e-9,CA=1e-12];
(%o2) [gmA = 0.01, gmd = 0.1, R1 = 25, R2 = 100000.0,
CFB = 9.9999999999999998E-13, RL = 1000.0, RA = 10000.0,
CC = 9.9999999999999998E-13, CL = 1.0000000000000001E-9,
CA = 9.9999999999999998E-13]
(%i3) ev(gma*gmd,valueList);
(%o3)                               0.1 gma
(%i4) numerator:expand(denom(gout));
2
(%o4) gmd s CFB gmA R1 R2 RA RL + gmd s  CC CFB R1 R2 RA RL
2                       2
+ 10 s  CA CFB R2 RA RL + 10 s  CA CFB R1 RA RL + gmd s CC R1 RA RL
+ 10 s CA RA RL + 10 s CFB R2 RL + 10 s CFB R1 RL + 10 RL
(%i5) expand(coeff(numerator,s));
(%o5) gmd CFB gmA R1 R2 RA RL + gmd CC R1 RA RL + 10 CA RA RL + 10 CFB R2 RL
+ 10 CFB R1 RL
(%i6) ev(numerator,s=0);
(%o6)                                10 RL
(%i7) part(expand(coeff(numerator,s)),1);
(%o7)                       gmd CFB gmA R1 R2 RA RL
(%i8) nterms(expand(coeff(numerator,s)));
(%o8)                                  5
(%i9) for i:1 while(i<
nterms(expand(coeff(numerator,s)))) do print(part(expand(coeff(numerator,s)),i));
gmd CFB gmA R1 R2 RA RL
gmd CC R1 RA RL
10 CA RA RL
10 CFB R2 RL
(%o9)                                done
(%i10) for i:1 while(i<
nterms(expand(coeff(numerator,s)))) do (a:part(expand(coeff(numerator,s)),i), print(ev(a,valueList)));
0.025
2.5000000000000001E-5
9.9999999999999991E-5
0.001
(%o10)                               done
(%i11) ```
Run Example
```ans:(ev(Iout,linsolve([1/R1+1/R2+1/RL+s*CL+0.9*gmd*v2-1/R1*v3-1/R2*v4+Iout=0, (1/RA+s*CA)*v2-s*CC*v3-gmA*v4=0, -1/R1+0.1*gmd*v2+(1/R1+s*CFB)*v3-s*CFB*v4=0, -1/R2-s*CFB*v3+(1/R2+s*CFB)*v4=0],[v2,v3,v4,Iout])));

rat: replaced 0.9 by 9/10 = 0.9

rat: replaced 0.1 by 1/10 = 0.1
2                            3
(%o1) - ((R1 (CL (s  (gmd CC RA + 10 CFB) + 10 s  CA CFB RA)
2
+ 10 gmd s CFB gmA RA + 10 gmd s  CC CFB RA)
2                   3
+ R2 (CL R1 (gmd s  CFB gmA RA + gmd s  CC CFB RA)
3                 2
+ CL (10 s  CA CFB RA + 10 s  CFB) + 10 gmd s CFB gmA RA
2                      2
+ 10 gmd s  CC CFB RA) + CL (10 s  CA RA + 10 s) + 10 gmd gmA RA
2
+ 10 gmd s CC RA) RL + R2 (R1 (gmd s CFB gmA RA + gmd s  CC CFB RA)
2                                                          2
+ 10 s  CA CFB RA + 10 s CFB) + R1 (s (gmd CC RA + 10 CFB) + 10 s  CA CFB RA)
2                  2                                                          2
+ 10 s CA RA + 10)/((R2 (R1 (gmd s CFB gmA RA + gmd s  CC CFB RA) + 10 s  CA CFB RA + 10 s CFB) + R1 (s (gmd CC RA + 10 CFB) + 10 s  CA CFB RA) + 10 s CA RA + 10)
RL)
(%i2) valueList:[gmA=10e-3,gmd=100e-3,R1=25,R2=100e3,CFB=1e-12,RL=1e3,RA=10e3,CC=1e-12,CL=1e-9,CA=1e-12];
(%o2) [gmA = 0.01, gmd = 0.1, R1 = 25, R2 = 100000.0,
CFB = 9.9999999999999998E-13, RL = 1000.0, RA = 10000.0,
CC = 9.9999999999999998E-13, CL = 1.0000000000000001E-9,
CA = 9.9999999999999998E-13]
(%i3) trunkTh:0.1;
(%o3)                                 0.1
(%i4) eq:expand(num(ans));
2                               3
(%o4) - gmd s  CFB CL gmA R1 R2 RA RL - gmd s  CC CFB CL R1 R2 RA RL
3
- 10 gmd s CFB gmA R2 RA RL - 10 s  CA CFB CL R2 RA RL
2
- 10 gmd s  CC CFB R2 RA RL - 10 gmd s CFB gmA R1 RA RL
3                           2                          2
- 10 s  CA CFB CL R1 RA RL - gmd s  CC CL R1 RA RL - 10 gmd s  CC CFB R1 RA RL
2
- 10 gmd gmA RA RL - 10 s  CA CL RA RL - 10 gmd s CC RA RL
2                    2
- 10 s  CFB CL R2 RL - 10 s  CFB CL R1 RL - 10 s CL RL
2                       2
- gmd s CFB gmA R1 R2 RA - gmd s  CC CFB R1 R2 RA - 10 s  CA CFB R2 RA
2
- 10 s  CA CFB R1 RA - gmd s CC R1 RA - 10 s CA RA - 10 s CFB R2 - 10 s CFB R1
- 10
(%i5) eq2:0;
(%o5)                                  0
(%i6) order_of_s:hipow(eq, s);
(%o6)                                  3
(%i7) for j:0 while (j <
= order_of_s) do (  subeq:expand(coeff(eq, s, j)),  subeqValue:ev(subeq, valueList),  numberOfTerms:nterms(subeq),  for i:1 while (i <
= numberOfTerms) do print(part(subeq, i))  );
- 10 gmd gmA RA RL
- 10
- 10 gmd CFB gmA R2 RA RL
- 10 gmd CFB gmA R1 RA RL
- 10 gmd CC RA RL
- 10 CL RL
- gmd CFB gmA R1 R2 RA
- gmd CC R1 RA
- 10 CA RA
- 10 CFB R2
- 10 CFB R1
- gmd CFB CL gmA R1 R2 RA RL
- 10 gmd CC CFB R2 RA RL
- gmd CC CL R1 RA RL
- 10 gmd CC CFB R1 RA RL
- 10 CA CL RA RL
- 10 CFB CL R2 RL
- 10 CFB CL R1 RL
- gmd CC CFB R1 R2 RA
- 10 CA CFB R2 RA
- 10 CA CFB R1 RA
- gmd CC CFB CL R1 R2 RA RL
- 10 CA CFB CL R2 RA RL
- 10 CA CFB CL R1 RA RL
(%o7)                                done
(%i8) print(eq2);
0
(%o8)                                  0
(%i9) ```

Help for Nterms