```python
from sympy import *

a = Symbol("a")
x1 = Symbol("x1")
x2 = Symbol("x2")
```

$$
\begin{cases}
x_1 + a x_2 = 1\\
a x_1 + x_2 = 0\\
\end{cases}
$$


```python
e = [
    x1 + a * x2 - 1,
    a * x1 + x2,
]
```


```python
r = solve(e, [x1, x2])

for n in [0.99, 0.991]:
    print(f"a={n}")
    for k in r:
        print(f"{k}: {r[k].subs(a, n)}")
    print("---")
```

    a=0.99
    x2: -49.7487437185929
    x1: 50.2512562814070
    ---
    a=0.991
    x2: -55.3044254701713
    x1: 55.8066856409397
    ---


$$
\begin{cases}
x_1 + a x_2 = 1\\
a x_1 + 4x_2 = 0\\
\end{cases}
$$


```python
e = [
    x1 + a * x2 - 1,
    a * x1 + 4 * x2,
]

r = solve(e, [x1, x2])

for n in [0.99, 0.991]:
    print(f"a={n}")
    for k in r:
        print(f"{k}: {r[k].subs(a, n)}")
    print("---")
```

    a=0.99
    x2: -0.327825424682937
    x1: 1.32454717043611
    ---
    a=0.991
    x2: -0.328371967571032
    x1: 1.32541661986289
    ---


e5a665bb6970967022ed066dc8d83f77b32ad223
ipynb
Jupyter Notebook
ex1/src/4_pathological.ipynb
cdfmlr/NumericalAnalysis
b752af60c1f3202d53cc3c76e66419a885250ed9
Apache-2.0
ex1/src/4_pathological.ipynb
cdfmlr/NumericalAnalysis
b752af60c1f3202d53cc3c76e66419a885250ed9
Apache-2.0
ex1/src/4_pathological.ipynb
cdfmlr/NumericalAnalysis
b752af60c1f3202d53cc3c76e66419a885250ed9
Apache-2.0
2021-08-15T01:34:35.000Z
2021-08-15T01:34:35.000Z
Qwen/Qwen-72B
1. YES
2. YES