三角関数に対して trigsimp、trigexpand、expand 等を実行する際、半角の公式を適用するか否かを決定する変数。デフォルトは false。
(%i1) expand(sin(t/2)^2);
2 t
(%o1) sin (-)
2
(%i2) expand(sin(t/2)^2), halfangles:true;
1 cos(t)
(%o2) - - ------
2 2
(%i3) expand(1/cos(t/2)^2), halfangles:true;
2
(%o3) ----------
cos(t) + 1
上記の実行例はローカルに halfangles を true に設定しているが、もちろんグローバルに設定すれば以降の計算全てに渡って適用される。
(%i4) expand(tan(x/2));
x
(%o4) tan(-)
2
(%i5) halfangles:true;
(%o5) true
(%i6) expand(tan(x/2));
1 cos(x)
(%o6) ------ - ------
sin(x) sin(x)
ただし、
(%i7) expand(sin(x/2));
sqrt(1 - cos(x))
(%o7) ----------------
sqrt(2)
のようにプラス・マイナス(±)が付かないので、取り扱いには注意を要する。