SharedUebungen_Mathe1_WS17 / LGS_keine_Lsg.sagewsOpen in CoCalc
Author: Darius Mottaghy
# 2. Beispiel: nicht lösbares System A = matrix([[1,1],[1,1]]) show(A)
(1111)\displaystyle \left(\begin{array}{rr} 1 & 1 \\ 1 & 1 \end{array}\right)
# rechte Seite des Systems b = vector([1, -2]) show(b)
(1,2)\displaystyle \left(1,\,-2\right)
# Lösung des LGS x=A.solve_right(b) # Hier kommt eine Fehlermeldung, das LGS ist nicht lösbar. show(x)
*** WARNING: Code contains non-ascii characters *** 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/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) X = self._solve_right_general(C, check=check) 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) raise ValueError("matrix equation has no solutions") ValueError: matrix equation has no solutions
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)
x