삼각함수의 정리
- 작성자
- 고친과정
2008년 어느날 : 처음씀
1.1. 개요
참고 영상 |
![]() [GIF image (523.48 KB)] |
참고 영상 |

[PNG image (31.25 KB)]
sinθ | y / r |
cosθ | x / r |
tanθ | y / x |
"r² = x² + y²" 조건 (r, x, y 가 직각 삼각형의 변이라는 것) |
1.2. 호도법과 60분법
각도 θ는 호도법(radian)과 60분법(degree)으로 각각 표시할 수 있으며 둘 간의 관계는 다음과 같습니다.
π rad = 180˚
π rad = 180˚
60분법 | 0˚ | 30˚ | 45˚ | 60˚ | 90˚ | 180˚ | 270˚ | 360˚ |
호도법 | 0 | π / 6 | π / 4 | π / 3 | π / 2 | π | 3π / 2 | 2π |
1.3. 덧셈정리
sin(x + y) = sin(x) * cos(y) + cos(x) * sin(y) sin(x - y) = sin(x) * cos(y) - cos(x) * sin(y) cos(x + y) = cos(x) * cos(y) - sin(x) * sin(y) cos(x - y) = cos(x) * cos(y) + sin(x) * sin(y) tan(x + y) = (tan(x) + tan(y)) / (1 - tan(x) * tan(y)) tan(x - y) = (tan(x) - tan(y)) / (1 + tan(x) * tan(y))
1.4. 배각정리
sin(2 * x) = 2 * sin(x) * cos(x) cos(2 * x) = cos²(x) - sin²(x) = 2 * cos²(x) - 1 = 1 - 2 * sin²(x) tan(2 * x) = (2 * tan(x)) / (1 - tan²(x))
1.5. 반각의 정리
sin²(x / 2) = (1 - cos(x)) / 2 cos²(x / 2) = (1 + cos(x)) / 2 tan²(x / 2) = (1 - cos(x)) / (1 + cos(x))
1.6. 삼각함수 공식 총괄정리
sin(-θ)=-sinθ, cos(-θ)=cosθ, tan(-θ)=-tanθ sin²θ+cos²θ=1, sec²θ-tan²θ=1, csc²θ-cot²θ=1 sin(π/2-θ)=cosθ, sin(π/2+θ)=cosθ, sin(θ±π/2)=±cosθ cos(π/2-θ)=sinθ, cos(π/2+θ)=-sinθ, cos(θ±π/2)=Ŧsinθ sin(π-θ)=sinθ, sin(π+θ)=-sinθ, sin(θ±π)=-sinθ cos(π-θ)=-cosθ, cos(π+θ)=-cosθ, cos(θ±π)=-cosθ sin(α±β)=sinαcosβ±cosαsinβ, cos(α±β)=cosαcosβŦsinαsinβ tan(α+β)=tanα+tanβ/1-tanαtanβ, tan(α-β)=tanα-tanβ/1+tanαtanβ sin2θ=2sinθcosθ cos2θ=cos²θ-sin²θ=2cos²θ-1=1-2sin²θ, tan2θ=2tanθ/1-tan²θ sin²θ/2=1-cosθ/2, cos²θ/2=1+cosθ/2, tan²θ/2=1-cosθ/1+cosθ sinαcosβ=1/2{sin(α+β)+sin(α-β)} cosαcosβ=1/2{cos(α+β)+cos(α-β)} sinαsinβ=-1/2{cos(α+β)-cos(α-β)} sinα+sinβ=2sin(α+β/2)cos(α-β/2) sinα-sinβ=2cos(α+β/2)sin(α-β/2) cosα+cosβ=2cos(α+β/2)cos(α-β/2) cosα-cosβ=-2sin(α+β/2)sin(α-β/2)
1.7. 삼각함수의 구현
- 아래 python 구현으로 sin, cos, tan 를 각각 하나의 좌표 평면에 그래프로 표현
import numpy as np import matplotlib.pyplot as plt s_x = np.arange(-4, 4, 0.1) s_y1 = np.sin(s_x) s_y2 = np.cos(s_x) s_y3 = np.tan(s_x) plt.figure(figsize=(16, 10)) plt.plot(s_x, s_y1, 'r-', label='sin') plt.plot(s_x, s_y2, 'b-', label='cos') plt.plot(s_x, s_y3, 'm--', label='tan') # 여기서 tan 는 'mo' 속성으로 그리는게 더 좋을수도... plt.xlabel('x') plt.ylabel('y') plt.ylim(-2.0, 2.0) plt.axvline(x=0, color='k') plt.axhline(y=0, color='k') plt.title('sin/cos/tan function') plt.legend() plt.show()
[PNG image (55.73 KB)] - 아래 python 구현으로 sin과 cos을 혼합하여 x, y, z축 3차원 그래프 표현
import numpy as np import matplotlib.pyplot as plt x = np.arange(-20, 20, 0.1) y = np.sin(x) z = np.cos(x) fig = plt.figure(figsize=(16, 10)) ax = fig.add_subplot(111, projection='3d') ax.set_title("Helix test", size = 20) ax.set_xlabel("x", size = 14) ax.set_ylabel("y", size = 14) ax.set_zlabel("z", size = 14) ax.plot(x, y, z)
[PNG image (155.08 KB)] - C 로 구현한 sin 함수
- C source 보기