SDD 2010

4054 days ago by calcpage123

f(x)=-4*x g(x)=3*x/4+19/8 show(f(x)) show(g(x)) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-4 \, x
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{3}{4} \, x + \frac{19}{8}
\newcommand{\Bold}[1]{\mathbf{#1}}-4 \, x
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{3}{4} \, x + \frac{19}{8}
plot((f(x),g(x)),-4,4,aspect_ratio=1) 
       
solve(f(x)==g(x),x) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = \left(-\frac{1}{2}\right)\right]
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = \left(-\frac{1}{2}\right)\right]
f(-.5) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}2.00000000000000
\newcommand{\Bold}[1]{\mathbf{#1}}2.00000000000000
g(-.5) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}2.00000000000000
\newcommand{\Bold}[1]{\mathbf{#1}}2.00000000000000
var('y') solve((4*x+y==0,6*x-8*y==-19),x,y) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left[\left[x = \left(-\frac{1}{2}\right), y = 2\right]\right]
\newcommand{\Bold}[1]{\mathbf{#1}}\left[\left[x = \left(-\frac{1}{2}\right), y = 2\right]\right]
2+7 
       
\newcommand{\Bold}[1]{\mathbf{#1}}9
\newcommand{\Bold}[1]{\mathbf{#1}}9
2-7 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-5
\newcommand{\Bold}[1]{\mathbf{#1}}-5
2*7 
       
\newcommand{\Bold}[1]{\mathbf{#1}}14
\newcommand{\Bold}[1]{\mathbf{#1}}14
n(2/7,digits=500) 
       
0.2857142857142857142857142857142857142857142857142857142857142857142857\
142857142857142857142857142857142857142857142857142857142857142857142857\
142857142857142857142857142857142857142857142857142857142857142857142857\
142857142857142857142857142857142857142857142857142857142857142857142857\
142857142857142857142857142857142857142857142857142857142857142857142857\
142857142857142857142857142857142857142857142857142857142857142857142857\
1428571428571428571428571428571428571428571428571428571428571428571429
0.28571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571429
2//7 
       
0
0
2%7 
       
2
2
7//2 
       
3
3
7%2 
       
1
1
len(str(2**777000)) 
       
233901
233901
2**2-1 
       
\newcommand{\Bold}[1]{\mathbf{#1}}3
\newcommand{\Bold}[1]{\mathbf{#1}}3
2**3-1 
       
\newcommand{\Bold}[1]{\mathbf{#1}}7
\newcommand{\Bold}[1]{\mathbf{#1}}7
2**5-1 
       
\newcommand{\Bold}[1]{\mathbf{#1}}31
\newcommand{\Bold}[1]{\mathbf{#1}}31
2**7-1 
       
\newcommand{\Bold}[1]{\mathbf{#1}}127
\newcommand{\Bold}[1]{\mathbf{#1}}127
for i in range(2,1000): m=2**i-1 if m.is_prime(): print(m) 
       
3
7
31
127
8191
131071
524287
2147483647
2305843009213693951
618970019642690137449562111
162259276829213363391578010288127
170141183460469231731687303715884105727
686479766013060971498190079908139321726943530014330540939446345918554318\
339765605212255964066145455497729631139148085803712198799971664381257402\
8291115057151
531137992816767098689588206552468627329593117727031923199444138200403559\
860852242739162502265229285668889329486246501015346579337652707239409519\
978766587351943831270835393219031728127
3
7
31
127
8191
131071
524287
2147483647
2305843009213693951
618970019642690137449562111
162259276829213363391578010288127
170141183460469231731687303715884105727
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151
531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502265229285668889329486246501015346579337652707239409519978766587351943831270835393219031728127
n(-7/2) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-3.50000000000000
\newcommand{\Bold}[1]{\mathbf{#1}}-3.50000000000000
-13//3 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-5
\newcommand{\Bold}[1]{\mathbf{#1}}-5
-13%3 
       
\newcommand{\Bold}[1]{\mathbf{#1}}2
\newcommand{\Bold}[1]{\mathbf{#1}}2
n(7/2) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}3.50000000000000
\newcommand{\Bold}[1]{\mathbf{#1}}3.50000000000000
7//2 
       
\newcommand{\Bold}[1]{\mathbf{#1}}3
\newcommand{\Bold}[1]{\mathbf{#1}}3
7%2 
       
\newcommand{\Bold}[1]{\mathbf{#1}}1
\newcommand{\Bold}[1]{\mathbf{#1}}1
factor(6*x**2+11*x+3) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(2 \, x + 3\right)} {\left(3 \, x + 1\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(2 \, x + 3\right)} {\left(3 \, x + 1\right)}
factor(x**3-1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(x - 1\right)} {\left(x^{2} + x + 1\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(x - 1\right)} {\left(x^{2} + x + 1\right)}
factor(x**3+1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(x + 1\right)} {\left(x^{2} - x + 1\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(x + 1\right)} {\left(x^{2} - x + 1\right)}
factor(8*x**3-1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(2 \, x - 1\right)} {\left(4 \, x^{2} + 2 \, x + 1\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(2 \, x - 1\right)} {\left(4 \, x^{2} + 2 \, x + 1\right)}
factor(8*x**3+1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(2 \, x + 1\right)} {\left(4 \, x^{2} - 2 \, x + 1\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}{\left(2 \, x + 1\right)} {\left(4 \, x^{2} - 2 \, x + 1\right)}
factor(125*y**3-27*x**3) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-{\left(3 \, x - 5 \, y\right)} {\left(9 \, x^{2} + 15 \, x y + 25 \, y^{2}\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}-{\left(3 \, x - 5 \, y\right)} {\left(9 \, x^{2} + 15 \, x y + 25 \, y^{2}\right)}
factor(125*y**333-27*x**333) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-{\left(3 \, x^{111} - 5 \, y^{111}\right)} {\left(9 \, x^{222} + 15 \, x^{111} y^{111} + 25 \, y^{222}\right)}
\newcommand{\Bold}[1]{\mathbf{#1}}-{\left(3 \, x^{111} - 5 \, y^{111}\right)} {\left(9 \, x^{222} + 15 \, x^{111} y^{111} + 25 \, y^{222}\right)}
factor(x**2+2*x+2) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}x^{2} + 2 \, x + 2
\newcommand{\Bold}[1]{\mathbf{#1}}x^{2} + 2 \, x + 2
solve(x**2+2*x+2==0,x) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = \left(-i - 1\right), x = \left(i - 1\right)\right]
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = \left(-i - 1\right), x = \left(i - 1\right)\right]
expand((x+1)**4) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}x^{4} + 4 \, x^{3} + 6 \, x^{2} + 4 \, x + 1
\newcommand{\Bold}[1]{\mathbf{#1}}x^{4} + 4 \, x^{3} + 6 \, x^{2} + 4 \, x + 1
for i in range(0,9): print(expand((x+1)**i)) 
       
1
x + 1
x^2 + 2*x + 1
x^3 + 3*x^2 + 3*x + 1
x^4 + 4*x^3 + 6*x^2 + 4*x + 1
x^5 + 5*x^4 + 10*x^3 + 10*x^2 + 5*x + 1
x^6 + 6*x^5 + 15*x^4 + 20*x^3 + 15*x^2 + 6*x + 1
x^7 + 7*x^6 + 21*x^5 + 35*x^4 + 35*x^3 + 21*x^2 + 7*x + 1
x^8 + 8*x^7 + 28*x^6 + 56*x^5 + 70*x^4 + 56*x^3 + 28*x^2 + 8*x + 1
1
x + 1
x^2 + 2*x + 1
x^3 + 3*x^2 + 3*x + 1
x^4 + 4*x^3 + 6*x^2 + 4*x + 1
x^5 + 5*x^4 + 10*x^3 + 10*x^2 + 5*x + 1
x^6 + 6*x^5 + 15*x^4 + 20*x^3 + 15*x^2 + 6*x + 1
x^7 + 7*x^6 + 21*x^5 + 35*x^4 + 35*x^3 + 21*x^2 + 7*x + 1
x^8 + 8*x^7 + 28*x^6 + 56*x^5 + 70*x^4 + 56*x^3 + 28*x^2 + 8*x + 1
a=vector([1,2,3]) a 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1,2,3\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(1,2,3\right)
b=vector([-1,0,5]) b 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-1,0,5\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-1,0,5\right)
c=a+b d=a-b show(c) show(d) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(0,2,8\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2,2,-2\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(0,2,8\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(2,2,-2\right)
p=a.plot(rgbcolor='red')+b.plot(rgbcolor='blue')+c.plot(rgbcolor='green')+d.plot(rgbcolor='brown') p.show() 
       
e=a.dot_product(b) e 
       
\newcommand{\Bold}[1]{\mathbf{#1}}14
\newcommand{\Bold}[1]{\mathbf{#1}}14
f=a.cross_product(b) f 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(10,-8,2\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(10,-8,2\right)
p=a.plot(rgbcolor='red')+b.plot(rgbcolor='blue')+f.plot(rgbcolor='green',aspect_ratio=1) p.show() 
       
a=matrix(2,2,(1,5,-1,2)) a 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
1 & 5 \\
-1 & 2
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
1 & 5 \\
-1 & 2
\end{array}\right)
b=matrix(2,2,(-2,1,1,1)) b 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
-2 & 1 \\
1 & 1
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
-2 & 1 \\
1 & 1
\end{array}\right)
c=a+b c 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
-1 & 6 \\
0 & 3
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
-1 & 6 \\
0 & 3
\end{array}\right)
d=a-b d 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
3 & 4 \\
-2 & 1
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
3 & 4 \\
-2 & 1
\end{array}\right)
e=b*a show(a) show(b) show(e) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 1 & 5 \\ -1 & 2 \end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -2 & 1 \\ 1 & 1 \end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -3 & -8 \\ 0 & 7 \end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 1 & 5 \\ -1 & 2 \end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -2 & 1 \\ 1 & 1 \end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} -3 & -8 \\ 0 & 7 \end{array}\right)
a=matrix(2,2,(4,1,6,-8)) a 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
4 & 1 \\
6 & -8
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
4 & 1 \\
6 & -8
\end{array}\right)
b=matrix(2,1,(0,-19)) b 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{r}
0 \\
-19
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{r}
0 \\
-19
\end{array}\right)
a**(-1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
\frac{4}{19} & \frac{1}{38} \\
\frac{3}{19} & -\frac{2}{19}
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr}
\frac{4}{19} & \frac{1}{38} \\
\frac{3}{19} & -\frac{2}{19}
\end{array}\right)
a**(-1)*b 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{r}
-\frac{1}{2} \\
2
\end{array}\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{r}
-\frac{1}{2} \\
2
\end{array}\right)
a=matrix(3,3,(1,-1,0,2,0,-3,0,2,1)) a 
       
[ 1 -1  0]
[ 2  0 -3]
[ 0  2  1]
[ 1 -1  0]
[ 2  0 -3]
[ 0  2  1]
b=matrix(3,1,(6,16,4)) b 
       
[ 6]
[16]
[ 4]
[ 6]
[16]
[ 4]
a**(-1)*b 
       
[8]
[2]
[0]
[8]
[2]
[0]
a=matrix(2,2,(3,-2,5,-4)) det(a) 
       
-2
-2
b=matrix(2,2,(4,-2,0,-4)) det(b) 
       
-16
-16
det(b)/det(a) 
       
8
8
c=matrix(2,2,(3,4,5,0)) det(c) 
       
-20
-20
det(c)/det(a) 
       
10
10
a=matrix(3,3,(1,1,-1,3,-2,1,1,3,-2)) det(a) 
       
-3
-3
b=matrix(3,3,(6,1,-1,-5,-2,1,14,3,-2)) det(b) 
       
-3
-3
c=matrix(3,3,(1,6,-1,3,-5,1,1,14,-2)) det(c) 
       
-9
-9
d=matrix(3,3,(1,1,6,3,-2,-5,1,3,14)) det(d) 
       
6
6
print("x = ",(det(b)/det(a))) print("y = ",(det(c)/det(a))) print("z = ",(det(d)/det(a))) 
       
('x = ', 1)
('y = ', 3)
('z = ', -2)
('x = ', 1)
('y = ', 3)
('z = ', -2)
f(x)=-2*x+100 g(x)=-x+75 plot((f(x),g(x)),-30,75,ymin=0,ymax=100,fill='max') 
       
solve(f(x)==g(x),x) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = 25\right]
\newcommand{\Bold}[1]{\mathbf{#1}}\left[x = 25\right]
f(25) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}50
\newcommand{\Bold}[1]{\mathbf{#1}}50
h(x,y)=10*x+7*y show(h(75,0)) show(h(25,50)) show(h(0,100)) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}750
\newcommand{\Bold}[1]{\mathbf{#1}}600
\newcommand{\Bold}[1]{\mathbf{#1}}700
\newcommand{\Bold}[1]{\mathbf{#1}}750
\newcommand{\Bold}[1]{\mathbf{#1}}600
\newcommand{\Bold}[1]{\mathbf{#1}}700