## 2019年11月3日日曜日

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

1. $\begin{array}{l}\theta =\frac{\pi }{3}+2n\pi \\ \theta =\frac{2}{3}\pi +2n\pi \end{array}$

2. $\begin{array}{l}\theta =\frac{\pi }{3}+2n\pi \\ \theta =\frac{5}{3}\pi +2n\pi \end{array}$

3. $\begin{array}{l}2\theta =\frac{5}{4}\pi +2n\pi \\ 2\theta =\frac{7}{4}\pi +2a\pi \\ \theta =\frac{5}{8}\pi +n\pi \\ \theta =\frac{7}{8}\pi +n\pi \end{array}$

4. $\begin{array}{l}\frac{\theta }{2}=\frac{5}{6}\pi +2n\pi \\ \frac{\theta }{2}=\frac{7}{6}\pi +2n\pi \\ \theta =\frac{5}{3}\pi +4n\pi \\ \theta =\frac{7}{3}\pi +4n\pi \end{array}$

5. $\theta =\frac{\pi }{4}+n\pi$

6. $\begin{array}{l}2\theta =\frac{\pi }{6}+n\pi \\ \theta =\frac{\pi }{12}+\frac{n}{2}\pi \end{array}$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, sin, cos, tan, plot

print('12.')

x = symbols('x')
fs = [sin(x), cos(x), sin(2 * x), cos(x / 2), tan(x), tan(2 * x)]

p = plot(*fs,
ylim=(-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.save(f'sample12.png')

p.show()


% ./sample12.py
12.
%