︠801068a5-dbae-4b5f-b30a-9f1c3e4b7837s︠
# 2. Beispiel: nicht lösbares System
A = matrix([[1,1],[1,1]])
show(A)
︡b818bf82-7ddc-4199-b5ac-2742b431fe43︡{"html":"
$\\displaystyle \\left(\\begin{array}{rr}\n1 & 1 \\\\\n1 & 1\n\\end{array}\\right)$
"}︡{"done":true}︡
︠5a631993-b9e1-4715-8711-a0780fd49b38s︠
# rechte Seite des Systems
b = vector([1, -2])
show(b)
︡31863881-9196-44d3-b8dc-c00afc77cd97︡{"html":"$\\displaystyle \\left(1,\\,-2\\right)$
"}︡{"done":true}︡
︠fe630e5c-f52c-46b1-b458-b8d65a13ee51s︠
# Lösung des LGS
x=A.solve_right(b) # Hier kommt eine Fehlermeldung, das LGS ist nicht lösbar.
show(x)
︡a009a94d-d58f-464f-ab12-c20e4168bdbe︡{"stderr":"\n\n*** WARNING: Code contains non-ascii characters ***\n\n\nError in lines 1-1\nTraceback (most recent call last):\n File \"/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py\", line 1013, in execute\n exec compile(block+'\\n', '', 'single') in namespace, locals\n File \"\", line 1, in \n File \"sage/matrix/matrix2.pyx\", line 418, in sage.matrix.matrix2.Matrix.solve_right (/ext/sage/sage-8.0/src/build/cythonized/sage/matrix/matrix2.c:7477)\n X = self._solve_right_general(C, check=check)\n File \"sage/matrix/matrix2.pyx\", line 535, in sage.matrix.matrix2.Matrix._solve_right_general (/ext/sage/sage-8.0/src/build/cythonized/sage/matrix/matrix2.c:8776)\n raise ValueError(\"matrix equation has no solutions\")\nValueError: matrix equation has no solutions\n"}︡{"done":true}︡
︠b911d226-aecc-47b7-ad69-63df30cd1252s︠
var('x')
y1=-x+1
y2=-x-2
p1=plot(y1, (x, -2, 2), gridlines=True, axes_labels=['$x$','$y$'], fontsize=14, color='blue')
p2=plot(y2, (x, -2, 2), gridlines=True, axes_labels=['$x$','$y$'], fontsize=14, color='red')
show(p1+p2)
︡ba51fe6a-19fa-4021-9bc6-58f7aaebcbf2︡{"stdout":"x\n"}︡{"file":{"filename":"/projects/672fbf26-026b-40a3-93aa-953fe2a6fc8d/.sage/temp/compute2-us/4774/tmp_GOyexH.svg","show":true,"text":null,"uuid":"54cf4d57-dd76-4bec-9c86-835b4d3fcf62"},"once":false}︡{"done":true}︡
︠a228fc59-0a7c-4f9a-9a5a-e8f2938fc8e1︠