### Related

rowx:[1,x,x^2,x^3];

x:1101.0;

mc:matrix(ev(rowx));

Calculate

numer:true;

ln(x):=log(x)/log(%e);

redondeo(num,decimale...

Calculate

f(n):=block([l],l:mat...

M:f(20);

Calculate

eq1:x=lambda+alfa+beta;

eq2:y=lambda-alfa+3*b...

eq3:z=lambda+2*alfa;

Calculate

f(n):=block([l],l:mat...

M:f(20);

Calculate

for n:1 thru 3 do(kil...

Calculate

f(n):=block([l],l:mat...

M:f(10);

Calculate

P(pts) := block([M],M...

pts : [[-6,7],[-3,-5]...

P(pts);

Calculate

m:matrix([1,2,-1],[1,...

determinant(m);

m.m;

Calculate

A:matrix([1,2,3,4],[1...

l1:matrix([1,2,3,4]);

l2:matrix([1,1,2,2]);

Calculate

Run Example
```(%i1)numer:true;
(%o1)                                true
(%i2) ln(x):=log(x)/log(%e);
log(x)
(%o2)                          ln(x) := -------
log(%e)
(%i3) redondeo(num,decimales):=block(       [a:0],   a:round(num*10^decimales)*10^-decimales,    return(a));
(%o3) redondeo(num, decimales) := block([a : 0],
decimales    - decimales
a : 'round(num 10         ) 10           , return(a))
(%i4) biseccion(a,b,expo,N):=block(       [indice:0,bool:true,fa,fp,fb,fafp,TOL,p,er,tabla:matrix(['N,'a,'b,'p,'f('a),'f('b),'f('p),'f('a)*'f('p),'error])],      fa:f(a),   fa:redondeo(fa,expo+2),   TOL:(10)^(-expo),   for i:1 step 1 while (i<
=N and bool=true) do   (      indice:i,      p:((a+b)/2),         p:redondeo(p,expo+2),      fp:f(p),         fp:redondeo(fp,expo+2),      fb:f(b),         fb:redondeo(fb,expo+2),      er:((b-a)/2),         er:redondeo(er,expo+2),      fafp:redondeo(fa*fp,expo+2),            if ( (fa<
0 and fb<
0) or (fa>
0 and fb>
0) ) then      (	           print("No hay cambio de signo"),	 bool:false      ),      tabla:addrow(tabla,[i,a,b,p,fa,fb,fp,fafp,er]),            if ((fp=0) or (er <
TOL)) then      (         print("tolerancia cumplida"),	 bool:false      )      elseif (fafp>
0) then      (         a:p,         fa:fp      )      else      (         b:p      )   ),      if (indice=N) then    (      print(concat("Parametro N=",N," se cumplio. Hay cambios de signo f(a) f(b)")),      print("en las iteraciones hechas.")   ),   display(indice,N),   return(tabla));
(%o4) biseccion(a, b, expo, N) := block([indice : 0, bool : true, fa, fp, fb,
fafp, TOL, p, er, tabla : matrix(['N, 'a, 'b, 'p, 'f('a), 'f('b), 'f('p),
'f('a) 'f('p), 'error])], fa : f(a), fa : redondeo(fa, expo + 2),
- expo
TOL : 10      , for i while (i <= N) and (bool = true)
a + b
do (indice : i, p : -----, p : redondeo(p, expo + 2), fp : f(p),
2
fp : redondeo(fp, expo + 2), fb : f(b), fb : redondeo(fb, expo + 2),
b - a
er : -----, er : redondeo(er, expo + 2), fafp : redondeo(fa fp, expo + 2),
2
if ((fa < 0) and (fb < 0)) or ((fa > 0) and (fb > 0))
then (print("No hay cambio de signo"), bool : false),
tabla : addrow(tabla, [i, a, b, p, fa, fb, fp, fafp, er]),
if (fp = 0) or (er < TOL) then (print("tolerancia cumplida"), bool : false)
elseif fafp > 0 then (a : p, fa : fp) else b : p),
if indice = N then (print(concat("Parametro N=", N,
" se cumplio. Hay cambios de signo f(a) f(b)")),
print("en las iteraciones hechas.")), display(indice, N), return(tabla))
(%i5) f(x):=x-2^-x;
- x
(%o5)                          f(x) := x - 2
(%i6) biseccion(0,1,3,3);
Parametro N=3 se cumplio. Hay cambios de signo f(a) f(b)
en las iteraciones hechas.
indice = 3

N = 3

[ N   a    b      p      f(a)      f(b)     f(p)     f(a) f(p)  error ]
[                                                                     ]
[ 1   0    1     0.5     - 1.0     0.5    - 0.20711   0.20711    0.5  ]
(%o6) [                                                                     ]
[ 2  0.5   1    0.75   - 0.20711   0.5     0.1554    - 0.03218  0.25  ]
[                                                                     ]
[ 3  0.5  0.75  0.625  - 0.20711  0.1554  - 0.02342   0.00485   0.125 ]
(%i7) ```
Run Example
```f(x):=log(x);
(%o1)                           f(x) := log(x)
(%i2) a:1;
(%o2)                                  1
(%i3) b:2;
(%o3)                                  2
(%i4) n:4;
(%o4)                                  4
(%i5) h:(b-a)/n;
1
(%o5)                                  -
4
(%i6) Inte:0;
(%o6)                                  0
(%i7) m:matrix(["a","f(a)","h","aproximacion a f'(a)","f'(a)","error","Simpson"]);
(%o7)     [ a  f(a)  h  aproximacion a f'(a)  f'(a)  error  Simpson ]
(%o8)                                done
(%i9) Inte,numer;
(%o9)                          0.38369950940944
(%i10) ```
Run Example
```load(lsquares);
(%o1)         /usr/share/maxima/5.21.1/share/contrib/lsquares.mac
(%i2) D: matrix(  [3.2, 12, 60],  [3.2, 4, 89],  [3.2, -4, 115],  [3.2, -8, 126],  [3.2, 0, 102],  [3.2, 8, 75],  [3.2, 12, 60],  [2, -16, 99],  [2, -12, 93],  [2, -8, 86],  [2, -4, 78.5],  [2, 0, 71],  [2, 4, 63],  [2, 8, 55],  [2, 12, 46],  [1, -16, 59],  [1, -12, 56],  [1, -8, 54],  [1, -4, 50],  [1, 0, 46],  [1, 4, 42],  [1, 8, 39],  [1, 12, 34]);
[ 3.2   12    60  ]
[                 ]
[ 3.2   4     89  ]
[                 ]
[ 3.2  - 4   115  ]
[                 ]
[ 3.2  - 8   126  ]
[                 ]
[ 3.2   0    102  ]
[                 ]
[ 3.2   8     75  ]
[                 ]
[ 3.2   12    60  ]
[                 ]
[  2   - 16   99  ]
[                 ]
[  2   - 12   93  ]
[                 ]
[  2   - 8    86  ]
[                 ]
[  2   - 4   78.5 ]
[                 ]
(%o2)                         [  2    0     71  ]
[                 ]
[  2    4     63  ]
[                 ]
[  2    8     55  ]
[                 ]
[  2    12    46  ]
[                 ]
[  1   - 16   59  ]
[                 ]
[  1   - 12   56  ]
[                 ]
[  1   - 8    54  ]
[                 ]
[  1   - 4    50  ]
[                 ]
[  1    0     46  ]
[                 ]
[  1    4     42  ]
[                 ]
[  1    8     39  ]
[                 ]
[  1    12    34  ]
(%i3) E:matrix(  [0.4, -16, 42],  [0.4, -12, 41],  [0.4, -8, 39],  [0.4, -4, 37],  [0.4, 0, 35],  [0.4, 4, 33],  [0.4, 8, 31],  [0.4, 12, 29]);
[ 0.4  - 16  42 ]
[               ]
[ 0.4  - 12  41 ]
[               ]
[ 0.4  - 8   39 ]
[               ]
[ 0.4  - 4   37 ]
(%o3)                          [               ]
[ 0.4   0    35 ]
[               ]
[ 0.4   4    33 ]
[               ]
[ 0.4   8    31 ]
[               ]
[ 0.4   12   29 ]
[ 3.2   12    60  ]
[                 ]
[ 3.2   4     89  ]
[                 ]
[ 3.2  - 4   115  ]
[                 ]
[ 3.2  - 8   126  ]
[                 ]
[ 3.2   0    102  ]
[                 ]
[ 3.2   8     75  ]
[                 ]
[ 3.2   12    60  ]
[                 ]
[  2   - 16   99  ]
[                 ]
[  2   - 12   93  ]
[                 ]
[  2   - 8    86  ]
[                 ]
[  2   - 4   78.5 ]
[                 ]
[  2    0     71  ]
[                 ]
[  2    4     63  ]
[                 ]
[  2    8     55  ]
[                 ]
[  2    12    46  ]
[                 ]
(%o4)                         [  1   - 16   59  ]
[                 ]
[  1   - 12   56  ]
[                 ]
[  1   - 8    54  ]
[                 ]
[  1   - 4    50  ]
[                 ]
[  1    0     46  ]
[                 ]
[  1    4     42  ]
[                 ]
[  1    8     39  ]
[                 ]
[  1    12    34  ]
[                 ]
[ 0.4  - 16   42  ]
[                 ]
[ 0.4  - 12   41  ]
[                 ]
[ 0.4  - 8    39  ]
[                 ]
[ 0.4  - 4    37  ]
[                 ]
[ 0.4   0     35  ]
[                 ]
[ 0.4   4     33  ]
[                 ]
[ 0.4   8     31  ]
[                 ]
[ 0.4   12    29  ]
(%i5) ti:22;
(%o5)                                 22
(%i6) tamin:-30;
(%o6)                                - 30
(%i7) r:lsquares_estimates(D, [m, ta, tvl], tvl = ti+(m*b^c)*(((ti-ta)/(ti-tamin))^(a)), [a, b,c]);
*************************************************
N=    3   NUMBER OF CORRECTIONS=25
INITIAL VALUES
F=  2.101931255964879D+03   GNORM=  9.218838988104815D+01
*************************************************

I  NFN     FUNC                    GNORM                   STEPLENGTH

1    7     1.116228467499764D+03   5.181482092741437D+02   3.792158188175497D-02
2   11     1.115139217279903D+03   4.517933553619771D+02   6.156039739677396D-03
3   15     3.772201212301974D+02   1.464357581324870D+03   1.279783986132719D+01
4   17     7.783971751722766D+01   1.150713443659835D+03   2.039382076736760D-01
5   19     5.003402304305900D+00   5.919845697246858D+01   1.995821879972414D-01
6   20     4.211639387760370D+00   5.820407389162347D+01   1.000000000000000D+00
7   21     4.088456788513105D+00   5.277714141954149D+00   1.000000000000000D+00
8   22     4.087286836630353D+00   2.094011852767751D-02   1.000000000000000D+00
9   23     4.087286523816272D+00   3.178623521461571D-05   1.000000000000000D+00

THE MINIMIZATION TERMINATED WITHOUT DETECTING ERRORS.
IFLAG = 0
(%o7) [[a = 0.87205051345354, b = 3.011617383235275, c = 3.585922792420821]]
(%i8) a: rhs(r[1][1]);
(%o8)                          0.87205051345354
(%i9) b: rhs(r[1][2]);
(%o9)                          3.011617383235275
(%i10) c: rhs(r[1][3]);
(%o10)                         3.585922792420821
(%i11) error(D) := (ti+(col(D, 1)*b)*((ti-col(D, 2))/(ti-tamin))^^(1/a+c*col(D, 1))) - col(D,3);
ti - col(D, 2) <1/a + c col(D, 1)>
(%o11) error(D) := ti + (col(D, 1) b) (--------------)
ti - tamin
- col(D, 3)
(%i12) e(m, ta, tvl) := ti+(m*b^c)*((ti-ta)/(ti-tamin))^(a) - tvl;
c    ti - ta   a
(%o12)         e(m, ta, tvl) := ti + (m b ) (----------)  - tvl
ti - tamin
(%i13) for i:1 while i <
= length(first(transpose(D))) do disp (  e(D[i][1], D[i][2], D[i][3]));
1.600256016752056

- 0.88370438260647

- 1.887971702076186

- 0.77810475937126

- 1.239608130221058

0.10421852552332

1.600256016752056

2.282729637294366

0.95392240560348

0.51368452539296

0.44501768620238

0.22524491861184

0.32268476087096

0.19013657845207

0.75016001047003

2.641364818647183

1.976961202801739

0.25684226269648

0.47250884310119

0.61262245930592

0.66134238043548

- 0.40493171077397

0.37508000523501

- 4.143454072541125

- 4.609215518879303

- 4.097263094921409

- 3.610996462759523

- 3.154951016277632

- 2.73546304782581

- 2.361972684309585

- 2.049967997905995

(%o13)                               done
(%i14) ```