## 2019年11月4日月曜日

### 数学 - Python - 円の中にひそむ関数 - 三角関数 - 一般角と三角関数 - 簡単な三角方程式と三角不等式 - 正弦、余弦、角の範囲

1. $\frac{1}{6}\pi <\theta <\frac{5}{6}\pi$

2. $0\le \theta \le \frac{\pi }{4},\frac{3}{4}\pi \le \theta <2\pi$

3. $\frac{\pi }{6}\le \theta \le \frac{11}{6}\pi$

4. $0\le \theta <\frac{2}{3}\pi ,\frac{4}{3}\pi <\theta <2\pi$

コード

#!/usr/bin/env python3
from sympy import pprint, symbols, sin, cos, plot, Rational, sqrt
from sympy.solvers import solve_univariate_inequality
print('13.')

x = symbols('x')
inequalities = [sin(x) > Rational(1, 2),
sin(x) <= 1 / sqrt(2),
cos(x) <= sqrt(3) / 2,
cos(x) > - Rational(1, 2)]

for i, inequality in enumerate(inequalities, 1):
print(f'({i})')
pprint(solve_univariate_inequality(inequality, x))
print()


% ./sample13.py
13.
(1)
π           5⋅π
─ < x ∧ x < ───
6            6

(2)
⎛            π⎞   ⎛3⋅π              ⎞
⎜0 ≤ x ∧ x ≤ ─⎟ ∨ ⎜─── ≤ x ∧ x ≤ 2⋅π⎟
⎝            4⎠   ⎝ 4               ⎠

(3)
π           11⋅π
─ ≤ x ∧ x ≤ ────
6            6

(4)
⎛            2⋅π⎞   ⎛          4⋅π    ⎞
⎜0 ≤ x ∧ x < ───⎟ ∨ ⎜x ≤ 2⋅π ∧ ─── < x⎟
⎝             3 ⎠   ⎝           3     ⎠

%