****-- The Calculator v3.00.2 --****
****-- The new version --****
--------------------------------
Three things A.1 A.2 A.3
--------------------------------
--------------------------------------------------------------------
A.1. Define a matrix as a direct operation of 2 matrices
---------------------------------------------------------------------
matA= -1.2*[1,2,3; 4,5,6; 7,8,9]
matB= [1,2,3; 4,5,6; 7,8,9]*[3; 6; 9]
matC= [1,2,3; 4,5,6; 7,8,9]-[-9,8,7; -4,0,6; 1,3,2]
Example 1
Solving a system of 5 linear equations:
1 X1 -2 X2 +3 X3 -1 X4 + 0 X5 = 123
0 X1 +3 X2 -2 X3 +5 X4 + 7 X5 = 15
3 X1 -4 X2 +0 X3 -2 X4 + 3 X5 = 9
-2 X1 -2 X2 +5 X3 +0 X4 + 0 X5 = -12
1 X1 +0 X2 -1 X3 +3 X4 + 9 X5 = 35
matC=[123; 15; 9; -12; 35]
matA=[1,-2,3,-1,0; 0,3,-2,5,7; 3,-4,0,-2,3; -2,-2,5,0,0; 1,0,-1,3,9]
matA1=matA^-1;
=[ 0.5230125523012552, 0.2761506276150627, 0.0711297071129707,
-0.2510460251046025,-0.2384937238493723; 0.6903765690376569,
-0.7154811715481171,-0.8661087866108786,-0.5313807531380753,
0.8451882845188284; 0.4853556485355648,-0.1757322175732217,
-0.3179916317991631,-0.11297071129707113, 0.2426778242677824;
-0.401673640167364, 1.1799163179916318, 0.8493723849372384,
0.4728033472803347,-1.200836820083682; 0.1297071129707113,
-0.4435146443514644,-0.3263598326359832,-0.1422594142259414,
0.5648535564853556];
multiplying by [123; 15; 9; -12; 35]
= [ 63.778242677824266; 102.347280334728032; 64.050209205020915;
-71.765690376569036; 27.841004184100418];
X1= 63.778242677824266
X2= 102.347280334728032
X3= 64.050209205020915
X4= -71.765690376569036
X5= 27.841004184100418
first equation:
63.778242677824266 -2* 102.347280334728032 + 3* 64.050209205020915
+71.765690376569036 = 122.999999999999983
--------------------
A.2 find function
--------------------
Now we have the scan function and the find function
to study one function.
The scan function uses integer points and is useful to
study any polynomial.
The find function try to get an interval (x0,x1) where
the function changes the sign. So it may be a discontinuity
or it may be a zero (it shows the f(x) values)
Example 2
f(x)=(x+1)/(x^2-x-1)
find(x=-10, x=10)
One zero was found
x= -1.0
f(x)= 0
Example 3
f(x)=(log(x-1)-x)/(x-5)
find(x=1, x=20)
The function change the sign in this interval
(x0,x1)=[ 4.9999 , 5.0 ]
f(x0)= 43978.50866169812
f(x1)= -INFINITY
Example 4
f(x)=x-log(1/(x-1))
find(x=1, x=5)
The function change the sign in this interval
(x0,x1)=[ 1.0826 , 1.0827 ]
f(x0)= -0.0004199526796177
f(x1)= 0.0002055095525466
Example 5
f(x)=(x-log(1/(x-1)))/(x^2-1)
find(x=1, x=10)
The function change the sign in this interval
(x0,x1)=[ 1.0826 , 1.0827 ]
f(x0)= -0.0004199526796177
f(x1)= 0.0002055095525466
Example 6
f(x)=x^3-log(x^2+x)+x-1
find(x=0,x=1)
The function change the sign in this interval
(x0,x1)=[ 0.1177 , 0.1178 ]
f(x0)= 0.0002288184583431
f(x1)= -0.000074703978969
scan(x=-2,x=2)
x= -2 , f(x)=-11.3010299956639812 ; x= -1 , f(x)=+INFINITY ;
x= 0 , f(x)=+INFINITY ; x= 1 , f(x)= 0.6989700043360188 ;
x= 2 , f(x)= 8.2218487496163564 ;
---------------------------------------------------------------------------
A.3 The limits of the root/find function may be real expressions
---------------------------------------------------------------------------
f(x)=x^3-x
root(x=log(2), x=log(3))
find(x=-log(3), x=log(3))
Good luck !
Rui Loureiro