Previous Up Next

6.23.19 Rewriting sin, cos, tan in terms of tan(x/2): halftan

The halftan command rewrites the trigonometric functions in terms of tan(x/2) using the identities:

     
  sin(x)
= 
2tan ⎛
⎜
⎜
⎝
x
2
⎞
⎟
⎟
⎠
tan2⎛
⎜
⎜
⎝
x
2
⎞
⎟
⎟
⎠
+1
         
cos(x)
= 
1−tan2⎛
⎜
⎜
⎝
x
2
⎞
⎟
⎟
⎠
tan2⎛
⎜
⎜
⎝
x
2
⎞
⎟
⎟
⎠
+1
         
tan(x)
= 
2tan⎛
⎜
⎜
⎝
x
2
⎞
⎟
⎟
⎠
1−tan2⎛
⎜
⎜
⎝
x
2
⎞
⎟
⎟
⎠
         


Examples.


Previous Up Next