Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: two
Views: 78
%var t w = var('w', latex_name='\omega');show(w)
ω\displaystyle {{\omega}}
bool(cos(pi/3) == cos(60))
False
IL3 = 13.2063-15.0197*I I3 = IL3 w = 20*10^6 L1 = 20*10^-3; XL1 = I*w*L1 L3 = 60*10^-3; XL3 = I*w*L3 C2 = (1/40)*10^-6; XC2 = 1/(I*w*C2) R1 = 40; R2 = 80
U2 = XL3*IL3 I2 = U2/(1/R2 + 1/XC2) I1 = I2 + IL3 U1 = I1*(R1 + XL1) U = U1 + U2
show('I1=', I1.n(), '\t', 'I2=', I2.n(), 'I3=', (I3).n()) show('U=', U.n(), 'U1=', U1, 'U2=', U2.n())
I1= 3.25759552425274×1073.52328964687943×107i\displaystyle 3.25759552425274 \times 10^{7} - 3.52328964687943 \times 10^{7}i I2= 3.25759420362274×1073.52328814490943×107i\displaystyle 3.25759420362274 \times 10^{7} - 3.52328814490943 \times 10^{7}i I3= 13.206300000000015.0197000000000i\displaystyle 13.2063000000000 - 15.0197000000000i
U= 1.40944796493674×1013+1.30289886287122×1013i\displaystyle 1.40944796493674 \times 10^{13} + 1.30289886287122 \times 10^{13}i U1= 1.40944616257274×1013+1.30289727811522×1013i\displaystyle 1.40944616257274 \times 10^{13} + 1.30289727811522 \times 10^{13}i U2= 1.80236400000000×107+1.58475600000000×107i\displaystyle 1.80236400000000 \times 10^{7} + 1.58475600000000 \times 10^{7}i
def euler(a): return abs(a)*exp(I*(arg(a)))
show(arg(I3).n())
0.849555720826836\displaystyle -0.849555720826836
show(U*(I1).conjugate())
9.21307759909274×1016+9.21021092692017×1020i\displaystyle 9.21307759909274 \times 10^{16} + 9.21021092692017 \times 10^{20}i
show(I3^2*1/(w*C3) )
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'C3' is not defined
show((abs((U*(I1).conjugate()).real()) - abs((I2^2*R2 + I3^2*R3)).n())) show(abs((U*(I1).conjugate()).imag()) - abs(I1^2*w*L1 + I2^2*1/(w*C2) + I3^2*1/(w*C3)).n())
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'R3' is not defined
show((U*(I1).conjugate()).n()) show(((I2^2*R2 + I3r^2*R3)).n()) show(((I1^2*w*L1 + I2^2*1/(w*C2) + I2^2*1/(w*C3))).n())
9.21307759909274×1016+9.21021092692017×1020i\displaystyle 9.21307759909274 \times 10^{16} + 9.21021092692017 \times 10^{20}i
Error in lines 2-2 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'I3r' is not defined
arg(I2)
-0.824560927207915
show('I1=', I1.n(), '\t', 'I2=', I2.n(), 'I3=', (I3).n())
I1= 3.25759552425274×1073.52328964687943×107i\displaystyle 3.25759552425274 \times 10^{7} - 3.52328964687943 \times 10^{7}i I2= 3.25759420362274×1073.52328814490943×107i\displaystyle 3.25759420362274 \times 10^{7} - 3.52328814490943 \times 10^{7}i I3= 13.206300000000015.0197000000000i\displaystyle 13.2063000000000 - 15.0197000000000i
show('U=', U.n(), 'U1=', U1, 'U2=', U2.n())
U= 1.40944796493674×1013+1.30289886287122×1013i\displaystyle 1.40944796493674 \times 10^{13} + 1.30289886287122 \times 10^{13}i U1= 1.40944616257274×1013+1.30289727811522×1013i\displaystyle 1.40944616257274 \times 10^{13} + 1.30289727811522 \times 10^{13}i U2= 1.80236400000000×107+1.58475600000000×107i\displaystyle 1.80236400000000 \times 10^{7} + 1.58475600000000 \times 10^{7}i
show(abs(U), '||||||', (arg(U)*180/pi).n())
1.91939808605079×1013\displaystyle 1.91939808605079 \times 10^{13} |||||| 42.7504069615022\displaystyle 42.7504069615022
def fui(x): show( abs(x), '||||||', (arg(x)*180/pi).n())
fui(I1)
4.79848919301057×107\displaystyle 4.79848919301057 \times 10^{7} |||||| 47.2438616772382\displaystyle -47.2438616772382
fui(I2)
4.79848719364091×107\displaystyle 4.79848719364091 \times 10^{7} |||||| 47.2438610804074\displaystyle -47.2438610804074
fui(I3)
19.9999436944207\displaystyle 19.9999436944207 |||||| 48.6759572645721\displaystyle -48.6759572645721
fui(U1)
1.91939568680121×1013\displaystyle 1.91939568680121 \times 10^{13} |||||| 42.7504087448296\displaystyle 42.7504087448296
fui(U2)
2.39999324333049×107\displaystyle 2.39999324333049 \times 10^{7} |||||| 41.3240427354279\displaystyle 41.3240427354279
fui(U)
1.91939808605079×1013\displaystyle 1.91939808605079 \times 10^{13} |||||| 42.7504069615022\displaystyle 42.7504069615022
arrow((0,0), (U2.real(),U2.imag()))
arrow((0,0), (U.real(),U.imag()))
arrow((U2.real(),U2.imag()), (U1.real() + U2.real(),U1.imag() + U2.imag()), color='red')
arrow((0,0), (U2.real(),U2.imag())) + arrow((0,0), (U.real(),U.imag())) + arrow((U2.real(),U2.imag()), (U1.real() + U2.real(),U1.imag() + U2.imag()), color='red')
arrow((0,0), (I2.real(), I2.imag())) + arrow((0,0), (I1.real(),I1.imag())) + arrow((I2.real(),I2.imag()), (I2.real() + I3.real(),I2.imag() + I3.imag()),color='red')
#СОПРОТИВЛЕНИЯ
Z1 = U/I1;show(Z1);fui(Z1)
40.0124999895925+400000.499999792i\displaystyle 40.0124999895925 + 400000.499999792i
400000.502001039\displaystyle 400000.502001039 |||||| 89.9942686387404\displaystyle 89.9942686387404
Y3 = 1/R3 + 1/XC3; Z3 = 1/Y3 Z2 = R2 + XC2 Y23 = 1/Z3 + 1/Z2; Z23 = 1/Y23 Z = XL1 + Z23;show(Z.n()); fui(Z.n())
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'R3' is not defined
z3 = R3*XC3/(R3 + XC3)
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'R3' is not defined
z3 == Z3
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'z3' is not defined
y = 1/Z2 + 1/R3 + 1/XC3;zy = 1/y show(zy.n() + XL1);fui(zy.n() + XL1)
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> NameError: name 'Z2' is not defined
A = matrix(4, 8, [1,-1,0,0,0,-1,0,0,0,1,1,0,0,0,-1,0,-1,0,0,-1,-1,0,0,0,0,0,-1,1,0,0,0,-1]) B = matrix(4, 8, [-1,0,1,1,0,-1,1,0 ,1,0,0,0,-1,1,0,0, 1,0,0,-1,0,1,0,-1 ,1,1,-1,-1,0,0,0,0]) Q = matrix(4, 8, [0,1,1,0,0,0,-1,0, 0,-1,0,-1,0,0,1,1, 1,-1,0,0,1,0,1,1, 0,0,0,0,1,1,1,1])
show(Q);show(B.transpose());show(B) b = B.transpose()
(01100010010100111100101100001111)\displaystyle \left(\begin{array}{rrrrrrrr} 0 & 1 & 1 & 0 & 0 & 0 & -1 & 0 \\ 0 & -1 & 0 & -1 & 0 & 0 & 1 & 1 \\ 1 & -1 & 0 & 0 & 1 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \end{array}\right)
(11110001100110110100111010000010)\displaystyle \left(\begin{array}{rrrr} -1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & -1 \\ 1 & 0 & -1 & -1 \\ 0 & -1 & 0 & 0 \\ -1 & 1 & 1 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & -1 & 0 \end{array}\right)
(10110110100011001001010111110000)\displaystyle \left(\begin{array}{rrrrrrrr} -1 & 0 & 1 & 1 & 0 & -1 & 1 & 0 \\ 1 & 0 & 0 & 0 & -1 & 1 & 0 & 0 \\ 1 & 0 & 0 & -1 & 0 & 1 & 0 & -1 \\ 1 & 1 & -1 & -1 & 0 & 0 & 0 & 0 \end{array}\right)
show(Q*(B.transpose()))
(0000000000000000)\displaystyle \left(\begin{array}{rrrr} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right)
Q[1].dot_product(B[3])
0
Q[2].dot_product(B[1])
0
Q[3].dot_product(B[1])
0
B[1][4] = -1
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "sage/modules/free_module_element.pyx", line 1810, in sage.modules.free_module_element.FreeModuleElement.__setitem__ (build/cythonized/sage/modules/free_module_element.c:13676) raise ValueError("vector is immutable; please change a copy instead (use copy())") ValueError: vector is immutable; please change a copy instead (use copy())