手算反正切:分区间近似与误差控制
自动控制做 Bode 图、相角裕度时经常要心算 arctanx。直接展开泰勒级数收敛慢,背值表又记不全。实用做法是按 x 的大小分四个区间,每个区间用最合适的近似公式,整体可控制在 1∘ 以内。
一、按 x 大小选公式(误差 ≤1∘)
| 区间 | 推荐公式 | 类型 |
|---|
| 0<x≤0.3 | arctanx≈x⋅57.3∘ | 小角近似 |
| 0.3<x≤0.5 | arctanx≈(x−3x3)⋅57.3∘ | 三阶泰勒 |
| 0.5<x≤2 | arctanx=45∘+arctanx+1x−1 | 折半公式 |
| x>2 | arctanx=90∘−arctanx1 | 余角公式 |
四个公式的核心思想是把任意 x 折到 [0,0.5] 这个泰勒收敛快的小区间里,再做近似。
二、四条公式的来源
1. 小角近似(x 很小)
弧度制下当 x→0 有 arctanx≈x,转成度数
arctanx≈x⋅π180∘≈x⋅57.3∘
只有一阶项,x≤0.3 时误差就在 1∘ 量级。
2. 三阶泰勒(x 稍大)
反正切的麦克劳林级数为
arctanx=n=0∑∞(−1)n2n+1x2n+1=x−3x3+5x5−7x7+⋯
收敛半径 ∣x∣≤1,x 越小收敛越快。0.3<x≤0.5 时取到三次项即可:
arctanx≈(x−3x3)⋅57.3∘
3. 折半公式(x 接近 1)
由 tan(A−B)=1+tanAtanBtanA−tanB,取 B=45∘:
arctanx−45∘=arctanx+1x−1
即
arctanx=45∘+arctanx+1x−1
当 0.5<x≤2 时 x+1x−1∈[−31,31],再走小角或三阶泰勒就够精度。
4. 余角公式(x 很大)
arctanx+arctanx1=2π=90∘,x>0
所以
arctanx=90∘−arctanx1
x>2 时 x1<0.5,又落回前两条公式的领地。
三、复数 / 向量角度要看象限
atan2 在手算中常被忽略:只算 arctan(b/a) 永远落在 (−90∘,90∘),没法区分二、三象限。设复数 a+bj:
| a 的符号 | 实际角度 |
|---|
| a>0 | arctanab |
| a<0, b≥0 | arctanab+180∘ |
| a<0, b<0 | arctanab−180∘ |
| a=0 | ±90∘(看 b 正负) |
做 Nyquist 相角、传函相位时尤其要小心——分母实部一旦变负,整张图的相角会差 180∘。
四、速查口诀
- x 很小 → 泰勒(小角 / 三阶)
- x 接近 1 → 折半公式
- x 很大 → 余角公式
- 特殊值 → 背表(arctan1=45∘、arctan3=60∘ 等)
- 复数 / 向量 → 看象限
一条主线:任何 x 都先想办法折到 [0,0.5],再走泰勒——这是手算 arctan 的基本套路。
Discussion
Comments
Share questions, corrections, or extra notes about this post.