Related

length-makelist-points-rk

dxdt: vx;

dvxdt: x/(x^2+y^2)^(3...

dydt: vy;

Calculate

length-sqrt-sum

r:[[1, 1.2], [2.5, 3....

N:length(r);

u:sum(r[i],i,1,N)/N;

Calculate

length-sum

x:[1000,1200,800,500,...

n:length(x);

N:sum(x[i],i,1,n);

Calculate

length-listify-makelist-permutations

Position:[-2,-1,0.5,1...

Masse:[5,10,15,20];

Reihenfolge:permutati...

Calculate

s:[2,4,6,5,7,3,11,13,...

Calculate

length-log

length(primes(1,150));

15/(50*log(50));

Calculate

length-sum

Aufgabe:"Seite 299 un...

x:[1,2,3,4,5];

y:[11,21,31,41,51];

Calculate

length

Aufgabe:"Seite 299 un...

x:[1,2,3,4,5];

y:[11,21,31,41,51];

Calculate

length-makelist-plot2d-reverse-solve

"*"/* Eine Polynomfun...

"*"/* Eingabe der Pun...

Punkt:[[-4,-5],[-1,-3...

Calculate

length(a[1]);

Calculate

length

Run Example
(%i1)kill(all);
(%o0)                                done
(%i1) Flows: [-500, 200, 250, 300, 400];
(%o1)                     [- 500, 200, 250, 300, 400]
(%i2) NPV: sum(Flows[i]/((1+0.20)^(i-1)), i, 1, length(Flows));
(%o2)                          206.7901234567902
(%i3) 
Run Example
factorC(_f,_z):=block([s,n,m,fp,j],fp:1,/* This commented code was meant to use themore robust solver to_poly_solve, but I couldn't understand how to handle multiplicitiesss:args(to_poly_solve(_f,_z)),s:create_list(ss[k][1],k,1,length(ss)),*/s:solve(_f,_z),m:multiplicities,n:length(s),for j:1 thru n do  if lhs(s[j])#0  then fp:fp*(_z-(rhs(s[j])))^m[j], fp:fp*divide(_f,fp)[1],fp);
(%o1) factorC(_f, _z) := block([s, n, m, fp, j], fp : 1, s : solve(_f, _z),
m : multiplicities, n : length(s), for j thru n
m
j
do if lhs(s ) # 0 then fp : fp (_z - rhs(s ))  , fp : fp divide(_f, fp) , fp)
j                              j                            1
(%i2) partfracC(_f,_z):=block([d,fd],d:denom(_f),fd:factorC(d,_z),partfrac(1/fd,_z));
(%o2) partfracC(_f, _z) := block([d, fd], d : denom(_f), fd : factorC(d, _z),
1
partfrac(--, _z))
fd
(%i3) O:partfracC(1/(x^5-1)^4,x);
4 %i %pi           2 %i %pi             2 %i %pi
--------           --------           - --------
5                  5                    5
(%o3) (41992 %e         + 42160 %e         + 42076 %e
4 %i %pi                  4 %i %pi         2 %i %pi            4 %i %pi            4 %i %pi
- --------                  --------         --------          - --------            --------
5                         5                5                   5                   5
+ 41824 %e           + 42328)/((625 %e         - 625 %e         + 1875 %e           - 1875) (%e         x
- 1))
4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi
--------          --------          - --------          - --------
5                 5                   5                   5
+ (1082 %e         + 1018 %e         + 1114 %e           + 1114 %e
2 %i %pi           2 %i %pi           4 %i %pi
--------         - --------         - --------
5                  5                  5
+ 1082)/((- 1250 %e         + 625 %e           + 625 %e          )
4 %i %pi
--------
5           2
(%e         x - 1) )
4 %i %pi        2 %i %pi          2 %i %pi          4 %i %pi
--------        --------        - --------        - --------
5               5                 5                 5
28 %e         + 20 %e         + 12 %e           + 20 %e           + 20
+ ----------------------------------------------------------------------
2 %i %pi         4 %i %pi     4 %i %pi
- --------         --------     --------
5                5            5           3
(625 %e           - 625 %e        ) (%e         x - 1)
4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
--------         --------         - --------         - --------
5                5                  5                  5
+ 1/((- 125 %e         - 125 %e         - 125 %e           - 125 %e
4 %i %pi                      4 %i %pi          2 %i %pi
--------                      --------          --------
5           4                 5                 5
+ 500) (%e         x - 1) ) - (- 1544 %e         - 1880 %e
2 %i %pi           4 %i %pi
- --------         - --------
5                  5
- 32 %e           - 368 %e           - 956)
4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi     2 %i %pi
--------          --------          - --------          - --------     --------
5                 5                   5                   5            5
/((- 4375 %e         - 6875 %e         + 6875 %e           + 4375 %e          ) (%e         x - 1))
4 %i %pi         2 %i %pi          2 %i %pi          4 %i %pi
--------         --------        - --------        - --------
5                5                 5                 5
+ (42 %e         + 170 %e         + 42 %e           - 54 %e           + 170)
4 %i %pi          2 %i %pi           2 %i %pi            4 %i %pi
--------          --------         - --------          - --------
5                 5                  5                   5
/((- 625 %e         + 1875 %e         - 625 %e           - 2500 %e           + 1875)
2 %i %pi
--------
5           2
(%e         x - 1) )
4 %i %pi       2 %i %pi          2 %i %pi         4 %i %pi
--------       --------        - --------       - --------
5              5                 5                5
- (4 %e         - 4 %e         - 12 %e           + 4 %e           - 12)
4 %i %pi           2 %i %pi           4 %i %pi           2 %i %pi
--------         - --------         - --------           --------
5                  5                  5                  5           3
/((625 %e         - 625 %e           + 625 %e           - 625) (%e         x - 1) )
2 %i %pi           4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
- --------           --------         --------         - --------         - --------
5                  5                5                  5                  5
+ %e          /((- 125 %e         - 125 %e         + 500 %e           - 125 %e
2 %i %pi
--------
5           4
- 125) (%e         x - 1) )
4 %i %pi           2 %i %pi             2 %i %pi
--------           --------           - --------
5                  5                    5
- (41824 %e         + 42076 %e         + 42160 %e
4 %i %pi                  4 %i %pi         2 %i %pi            4 %i %pi
- --------                  --------         --------          - --------
5                         5                5                   5
+ 41992 %e           + 42328)/((625 %e         - 625 %e         + 1875 %e           - 1875) (x
4 %i %pi
--------
5
- %e        ))
4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi
--------          --------          - --------          - --------
5                 5                   5                   5
+ (1114 %e         + 1082 %e         + 1082 %e           + 1114 %e
2 %i %pi           2 %i %pi           4 %i %pi
--------         - --------         - --------
5                  5                  5
+ 1018)/((- 1250 %e         + 625 %e           + 625 %e          )
4 %i %pi
--------
5     2
(x - %e        ) )
4 %i %pi        2 %i %pi          2 %i %pi          4 %i %pi
--------        --------        - --------        - --------
5               5                 5                 5
20 %e         + 20 %e         + 20 %e           + 12 %e           + 28
- ----------------------------------------------------------------------
2 %i %pi         4 %i %pi         4 %i %pi
- --------         --------         --------
5                5                5     3
(625 %e           - 625 %e        ) (x - %e        )
4 %i %pi           4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
- --------           --------         --------         - --------         - --------
5                  5                5                  5                  5
+ %e          /((- 125 %e         - 125 %e         - 125 %e           - 125 %e
4 %i %pi
--------
5     4
+ 500) (x - %e        ) )
4 %i %pi         2 %i %pi            2 %i %pi           4 %i %pi
--------         --------          - --------         - --------
5                5                   5                  5
- (32 %e         + 956 %e         + 1544 %e           + 368 %e
4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi
--------          --------          - --------          - --------
5                 5                   5                   5
+ 1880)/((- 4375 %e         - 6875 %e         + 6875 %e           + 4375 %e          ) (x
2 %i %pi
--------
5
- %e        ))
4 %i %pi        2 %i %pi          2 %i %pi           4 %i %pi
--------        --------        - --------         - --------
5               5                 5                  5
+ (170 %e         + 42 %e         + 42 %e           + 170 %e           - 54)
4 %i %pi          2 %i %pi           2 %i %pi            4 %i %pi
--------          --------         - --------          - --------
5                 5                  5                   5
/((- 625 %e         + 1875 %e         - 625 %e           - 2500 %e           + 1875)
2 %i %pi
--------
5     2
(x - %e        ) )
4 %i %pi        2 %i %pi         2 %i %pi         4 %i %pi
--------        --------       - --------       - --------
5               5                5                5
- (- 4 %e         + 12 %e         + 4 %e           - 4 %e           + 12)
4 %i %pi           2 %i %pi           4 %i %pi               2 %i %pi
--------         - --------         - --------               --------
5                  5                  5                      5     3
/((625 %e         - 625 %e           + 625 %e           - 625) (x - %e        ) )
4 %i %pi           4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
- --------           --------         --------         - --------         - --------
5                  5                5                  5                  5
+ %e          /((- 125 %e         - 125 %e         + 500 %e           - 125 %e
2 %i %pi
--------
5     4
- 125) (x - %e        ) )
4 %i %pi         2 %i %pi           2 %i %pi          4 %i %pi
--------         --------         - --------        - --------
5                5                  5                 5
120 %e         + 120 %e         - 132 %e           + 36 %e           + 36
- -------------------------------------------------------------------------
4 %i %pi         2 %i %pi            2 %i %pi
--------         --------          - --------
5                5                   5
(625 %e         + 625 %e         - 1250 %e          ) (x - 1)
4 %i %pi        2 %i %pi          2 %i %pi         4 %i %pi
--------        --------        - --------       - --------
5               5                 5                5
36 %e         + 36 %e         - 60 %e           + 4 %e           + 4
+ --------------------------------------------------------------------
4 %i %pi         2 %i %pi            2 %i %pi
--------         --------          - --------
5                5                   5             2
(625 %e         + 625 %e         - 1250 %e          ) (x - 1)
4 %i %pi          4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
--------          --------         --------         - --------         - --------
5                 5                5                  5                  5
- (8 %e        )/((500 %e         - 125 %e         - 125 %e           - 125 %e
4 %i %pi
--------
3         5
- 125) (x - 1) ) + %e
4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
--------         --------         - --------         - --------
5                5                  5                  5
/((500 %e         - 125 %e         - 125 %e           - 125 %e           - 125)
4
(x - 1) )
(%i4) tex(O);
$${{41992\,e^{{{4\,i\,\pi}\over{5}}}+42160\,e^{{{2\,i\,\pi}\over{5}}} +42076\,e^ {- {{2\,i\,\pi}\over{5}} }+41824\,e^ {- {{4\,i\,\pi }\over{5}} }+42328}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}-625\,e ^{{{2\,i\,\pi}\over{5}}}+1875\,e^ {- {{4\,i\,\pi}\over{5}} }-1875 \right)\,\left(e^{{{4\,i\,\pi}\over{5}}}\,x-1\right)}}+{{1082\,e^{{{ 4\,i\,\pi}\over{5}}}+1018\,e^{{{2\,i\,\pi}\over{5}}}+1114\,e^ {- {{2 \,i\,\pi}\over{5}} }+1114\,e^ {- {{4\,i\,\pi}\over{5}} }+1082}\over{ \left(-1250\,e^{{{2\,i\,\pi}\over{5}}}+625\,e^ {- {{2\,i\,\pi}\over{ 5}} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }\right)\,\left(e^{{{4\,i\, \pi}\over{5}}}\,x-1\right)^2}}+{{28\,e^{{{4\,i\,\pi}\over{5}}}+20\,e ^{{{2\,i\,\pi}\over{5}}}+12\,e^ {- {{2\,i\,\pi}\over{5}} }+20\,e ^ {- {{4\,i\,\pi}\over{5}} }+20}\over{\left(625\,e^ {- {{2\,i\,\pi }\over{5}} }-625\,e^{{{4\,i\,\pi}\over{5}}}\right)\,\left(e^{{{4\,i \,\pi}\over{5}}}\,x-1\right)^3}}+{{1}\over{\left(-125\,e^{{{4\,i\, \pi}\over{5}}}-125\,e^{{{2\,i\,\pi}\over{5}}}-125\,e^ {- {{2\,i\,\pi }\over{5}} }-125\,e^ {- {{4\,i\,\pi}\over{5}} }+500\right)\,\left(e ^{{{4\,i\,\pi}\over{5}}}\,x-1\right)^4}}-{{-1544\,e^{{{4\,i\,\pi }\over{5}}}-1880\,e^{{{2\,i\,\pi}\over{5}}}-32\,e^ {- {{2\,i\,\pi }\over{5}} }-368\,e^ {- {{4\,i\,\pi}\over{5}} }-956}\over{\left(- 4375\,e^{{{4\,i\,\pi}\over{5}}}-6875\,e^{{{2\,i\,\pi}\over{5}}}+6875 \,e^ {- {{2\,i\,\pi}\over{5}} }+4375\,e^ {- {{4\,i\,\pi}\over{5}} } \right)\,\left(e^{{{2\,i\,\pi}\over{5}}}\,x-1\right)}}+{{42\,e^{{{4 \,i\,\pi}\over{5}}}+170\,e^{{{2\,i\,\pi}\over{5}}}+42\,e^ {- {{2\,i \,\pi}\over{5}} }-54\,e^ {- {{4\,i\,\pi}\over{5}} }+170}\over{\left( -625\,e^{{{4\,i\,\pi}\over{5}}}+1875\,e^{{{2\,i\,\pi}\over{5}}}-625 \,e^ {- {{2\,i\,\pi}\over{5}} }-2500\,e^ {- {{4\,i\,\pi}\over{5}} }+ 1875\right)\,\left(e^{{{2\,i\,\pi}\over{5}}}\,x-1\right)^2}}-{{4\,e ^{{{4\,i\,\pi}\over{5}}}-4\,e^{{{2\,i\,\pi}\over{5}}}-12\,e^ {- {{2 \,i\,\pi}\over{5}} }+4\,e^ {- {{4\,i\,\pi}\over{5}} }-12}\over{ \left(625\,e^{{{4\,i\,\pi}\over{5}}}-625\,e^ {- {{2\,i\,\pi}\over{5 }} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }-625\right)\,\left(e^{{{2\,i \,\pi}\over{5}}}\,x-1\right)^3}}+{{e^ {- {{2\,i\,\pi}\over{5}} } }\over{\left(-125\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi }\over{5}}}+500\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\, \pi}\over{5}} }-125\right)\,\left(e^{{{2\,i\,\pi}\over{5}}}\,x-1 \right)^4}}-{{41824\,e^{{{4\,i\,\pi}\over{5}}}+42076\,e^{{{2\,i\,\pi }\over{5}}}+42160\,e^ {- {{2\,i\,\pi}\over{5}} }+41992\,e^ {- {{4\,i \,\pi}\over{5}} }+42328}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}- 625\,e^{{{2\,i\,\pi}\over{5}}}+1875\,e^ {- {{4\,i\,\pi}\over{5}} }- 1875\right)\,\left(x-e^{{{4\,i\,\pi}\over{5}}}\right)}}+{{1114\,e^{ {{4\,i\,\pi}\over{5}}}+1082\,e^{{{2\,i\,\pi}\over{5}}}+1082\,e^ {- {{2\,i\,\pi}\over{5}} }+1114\,e^ {- {{4\,i\,\pi}\over{5}} }+1018 }\over{\left(-1250\,e^{{{2\,i\,\pi}\over{5}}}+625\,e^ {- {{2\,i\,\pi }\over{5}} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }\right)\,\left(x-e^{ {{4\,i\,\pi}\over{5}}}\right)^2}}-{{20\,e^{{{4\,i\,\pi}\over{5}}}+20 \,e^{{{2\,i\,\pi}\over{5}}}+20\,e^ {- {{2\,i\,\pi}\over{5}} }+12\,e ^ {- {{4\,i\,\pi}\over{5}} }+28}\over{\left(625\,e^ {- {{2\,i\,\pi }\over{5}} }-625\,e^{{{4\,i\,\pi}\over{5}}}\right)\,\left(x-e^{{{4\, i\,\pi}\over{5}}}\right)^3}}+{{e^ {- {{4\,i\,\pi}\over{5}} }}\over{ \left(-125\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi}\over{5}}} -125\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\,\pi}\over{5}} }+500\right)\,\left(x-e^{{{4\,i\,\pi}\over{5}}}\right)^4}}-{{32\,e ^{{{4\,i\,\pi}\over{5}}}+956\,e^{{{2\,i\,\pi}\over{5}}}+1544\,e^ {- {{2\,i\,\pi}\over{5}} }+368\,e^ {- {{4\,i\,\pi}\over{5}} }+1880 }\over{\left(-4375\,e^{{{4\,i\,\pi}\over{5}}}-6875\,e^{{{2\,i\,\pi }\over{5}}}+6875\,e^ {- {{2\,i\,\pi}\over{5}} }+4375\,e^ {- {{4\,i\, \pi}\over{5}} }\right)\,\left(x-e^{{{2\,i\,\pi}\over{5}}}\right)}}+ {{170\,e^{{{4\,i\,\pi}\over{5}}}+42\,e^{{{2\,i\,\pi}\over{5}}}+42\,e ^ {- {{2\,i\,\pi}\over{5}} }+170\,e^ {- {{4\,i\,\pi}\over{5}} }-54 }\over{\left(-625\,e^{{{4\,i\,\pi}\over{5}}}+1875\,e^{{{2\,i\,\pi }\over{5}}}-625\,e^ {- {{2\,i\,\pi}\over{5}} }-2500\,e^ {- {{4\,i\, \pi}\over{5}} }+1875\right)\,\left(x-e^{{{2\,i\,\pi}\over{5}}} \right)^2}}-{{-4\,e^{{{4\,i\,\pi}\over{5}}}+12\,e^{{{2\,i\,\pi }\over{5}}}+4\,e^ {- {{2\,i\,\pi}\over{5}} }-4\,e^ {- {{4\,i\,\pi }\over{5}} }+12}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}-625\,e ^ {- {{2\,i\,\pi}\over{5}} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }-625 \right)\,\left(x-e^{{{2\,i\,\pi}\over{5}}}\right)^3}}+{{e^ {- {{4\,i \,\pi}\over{5}} }}\over{\left(-125\,e^{{{4\,i\,\pi}\over{5}}}-125\,e ^{{{2\,i\,\pi}\over{5}}}+500\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e ^ {- {{4\,i\,\pi}\over{5}} }-125\right)\,\left(x-e^{{{2\,i\,\pi }\over{5}}}\right)^4}}-{{120\,e^{{{4\,i\,\pi}\over{5}}}+120\,e^{{{2 \,i\,\pi}\over{5}}}-132\,e^ {- {{2\,i\,\pi}\over{5}} }+36\,e^ {- {{4 \,i\,\pi}\over{5}} }+36}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}+ 625\,e^{{{2\,i\,\pi}\over{5}}}-1250\,e^ {- {{2\,i\,\pi}\over{5}} } \right)\,\left(x-1\right)}}+{{36\,e^{{{4\,i\,\pi}\over{5}}}+36\,e^{ {{2\,i\,\pi}\over{5}}}-60\,e^ {- {{2\,i\,\pi}\over{5}} }+4\,e^ {- {{ 4\,i\,\pi}\over{5}} }+4}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}+ 625\,e^{{{2\,i\,\pi}\over{5}}}-1250\,e^ {- {{2\,i\,\pi}\over{5}} } \right)\,\left(x-1\right)^2}}-{{8\,e^{{{4\,i\,\pi}\over{5}}}}\over{ \left(500\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi}\over{5}}}- 125\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\,\pi}\over{5}} }-125\right)\,\left(x-1\right)^3}}+{{e^{{{4\,i\,\pi}\over{5}}} }\over{\left(500\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi }\over{5}}}-125\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\, \pi}\over{5}} }-125\right)\,\left(x-1\right)^4}}$$
(%o4)                                false
(%i5) 
Run Example
kill(all);
(%o0)                                done
(%i1) Punkt:[[5,12],[10,27],[20,94],[30,209],[40,426],[50,870]];
(%o1)   [[5, 12], [10, 27], [20, 94], [30, 209], [40, 426], [50, 870]]
(%i2) n:length(Punkt);
(%o2)                                  6
(%o3)                                  5
n - i
(%o4)            g(x) := x  = sum(a  x     , i, 1, Grad) + a
2        i  1                     n
(%i5) Gleichungen:map(g,Punkt);
(%o5) [12 = a  + 5 a  + 25 a  + 125 a  + 625 a  + 3125 a ,
6      5       4        3        2         1
27 = a  + 10 a  + 100 a  + 1000 a  + 10000 a  + 100000 a ,
6       5        4         3          2           1
94 = a  + 20 a  + 400 a  + 8000 a  + 160000 a  + 3200000 a ,
6       5        4         3           2            1
209 = a  + 30 a  + 900 a  + 27000 a  + 810000 a  + 24300000 a ,
6       5        4          3           2             1
426 = a  + 40 a  + 1600 a  + 64000 a  + 2560000 a  + 102400000 a ,
6       5         4          3            2              1
870 = a  + 50 a  + 2500 a  + 125000 a  + 6250000 a  + 312500000 a ]
6       5         4           3            2              1
(%i6) Unbekannte:makelist(a[i],i,1,n);
(%o6)                      [a , a , a , a , a , a ]
1   2   3   4   5   6
(%i7) l:solve(Gleichungen,Unbekannte);
29            323           103        1949         14699
(%o7) [[a  = --------, a  = -------, a  = - ----, a  = ----, a  = - -----,
1   42000000   2   1680000   3     7000   4   3360   5     4200
117
a  = ---]]
6    7
(%i8) y=Unbekannte.makelist(x^(n-i),i,1,n),l;
5          4         3         2
29 x      323 x     103 x    1949 x    14699 x   117
(%o8)      y = -------- + ------- - ------ + ------- - ------- + ---
42000000   1680000    7000     3360      4200      7
(%i9) 

Help for Length