## 2019年8月10日土曜日

### 数学 - Python - 図形と数や式の関係 - 平面図形と式 - 不等式の表す領域 - 連立不等式の表す領域 - 不等式の表す領域

1. $\begin{array}{l}x>0\\ y-1>0\\ y>1\end{array}$

または

$\begin{array}{l}x<0\\ y-1<0\\ y<1\end{array}$

問題の不等式の表す領域の図示。

2. $\begin{array}{l}\left\{\begin{array}{l}x-2y\ge 0\\ 3x-y-5\le 0\end{array}\\ \left\{\begin{array}{l}y\le \frac{1}{2}x\\ y\ge 3x-5\end{array}\\ \left\{\begin{array}{l}y\ge \frac{1}{2}x\\ y\le 3x-5\end{array}\end{array}$

図示。

3. $\begin{array}{l}\left\{\begin{array}{l}x+y-1<0\\ {x}^{2}+{y}^{2}-5>0\end{array}\\ \left\{\begin{array}{l}y<-x+1\\ {x}^{2}+{y}^{2}>5\end{array}\\ \left\{\begin{array}{l}y>-x+1\\ {x}^{2}+{y}^{2}<5\end{array}\end{array}$

図示。

4. $\begin{array}{l}\left\{\begin{array}{l}xy\ge 0\\ {x}^{2}+{y}^{2}-1\ge 0\end{array}\\ \left\{\begin{array}{l}x\ge 0\\ y\ge 0\\ {x}^{2}+{y}^{2}\ge 1\end{array}\\ \left\{\begin{array}{l}x\le 0\\ y\le 0\\ {x}^{2}+{y}^{2}\ge 1\end{array}\\ \left\{\begin{array}{l}x\ge 0\\ y\le 0\\ {x}^{2}+{y}^{2}\le 1\end{array}\\ \left\{\begin{array}{l}x\le 0\\ y\ge 0\\ {x}^{2}+{y}^{2}\le 1\end{array}\end{array}$

図示。

コード

Python 3

```#!/usr/bin/env python3
from sympy import pprint, symbols, plot

print('36.')

x = symbols('x')
fs = [x / 2, 3 * x - 5]
p = plot(*fs,
(x, -10, 10),
legend=True,
show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange',
'purple', 'pink', 'gray', 'skyblue', 'yellow']

for s, color in zip(p, colors):
s.line_color = color

p.show()
p.save('sample36.png')
```

```C:\Users\...>py sample36.py
36.

C:\Users\...>
```