数学中国

 找回密码
 注册
搜索
热搜: 活动 交友 discuz
查看: 7346|回复: 33

椭圆周长数值积分与近似公式计算精度比较

[复制链接]
发表于 2023-3-20 19:53 | 显示全部楼层 |阅读模式
本帖最后由 Ysu2008 于 2023-3-20 19:59 编辑

项名达级数公式\(C_0=2\pi a\left[ 1-\left( \frac{1}{2}\right)^2e^2-\left( \frac{1\cdot3}{2\cdot4}\right)^2\frac{e^4}{3}-\left( \frac{1\cdot3\cdot5}{2\cdot4\cdot6}\right)^2\frac{e^6}{5}-\left( \frac{1\cdot3\cdot5\cdot7}{2\cdot4\cdot6\cdot8}\right)^2\frac{e^8}{7}-......\right]\)
取项名达级数公式前100万项截断,作为“精确值”,计为\(C_0\);

龙贝格数值积分此式 \(C_1=4\int_0^{\frac{\pi}{2}}\sqrt{a^2\sin^2t+b^2\cos^2t}dt\)

周长近似公式为 \(\begin{align}
C_2 &\approx \pi \left( {a + b} \right)\left[ {1 + \frac{{3{\lambda ^2}}}{{10 + \sqrt {4 - 3{\lambda ^2}} }} + \frac{3}{{{2^{17}}}}(1 + \frac{{5767168 - 1835041\pi }}{{33\pi }}{\lambda ^{4.88 + 11.04{\lambda ^{4.74}}}}){\lambda ^{10}}} \right]
\end{align}\)

取椭圆长半轴固定为\(a=1\),短半轴从\(0.01\to1\),步进\(0.01\),总计100个椭圆周长,比较\(\left| C_0-C_1\right|\)与\(\left| C_0-C_2\right|\)精度大小。

[数据]:

编号长半轴短半轴离心率e项名达周长数值积分周长近似公式周长数值积分误差近似公式误差
110.010.99994.001098334.001098334.0011449161.17E-124.66E-05
210.020.99984.003839164.003839164.0038663616.13E-132.72E-05
310.030.99954.007909454.007909454.0079213971.22E-131.19E-05
410.040.99924.0131433134.0131433134.0131471322.02E-133.82E-06
510.050.99874.0194256194.0194256194.0194258511.30E-132.31E-07
610.060.99824.0266682334.0266682334.0266672564.99E-139.78E-07
710.070.99754.0347999334.0347999334.034798845.05E-131.09E-06
810.080.99684.0437611274.0437611274.0437603351.10E-137.92E-07
910.090.99594.0535007344.0535007344.0535003362.55E-133.98E-07
1010.10.99504.063974184.063974184.0639741294.62E-145.13E-08
1110.110.99394.0751420244.0751420244.0751422291.01E-132.04E-07
1210.120.99284.0869689894.0869689894.0869693564.44E-153.67E-07
1310.130.99154.099423244.099423244.0994236912.22E-144.52E-07
1410.140.99024.1124758334.1124758334.1124763111.49E-134.78E-07
1510.150.98874.1261002944.1261002944.1261007592.14E-134.65E-07
1610.160.98714.1402722764.1402722764.1402727032.33E-134.27E-07
1710.170.98544.1549692854.1549692854.1549696621.03E-133.77E-07
1810.180.98374.1701704594.1701704594.1701707812.54E-133.22E-07
1910.190.98184.1858563784.1858563784.1858566451.21E-132.67E-07
2010.20.97984.2020089084.2020089084.2020091242.61E-132.16E-07
2110.210.97774.218611074.218611074.2186112414.99E-131.71E-07
2210.220.97554.2356469244.2356469244.2356470572.31E-141.33E-07
2310.230.97324.2531014754.2531014754.2531015757.82E-141.01E-07
2410.240.97084.2709605814.2709605814.2709606561.31E-137.45E-08
2510.250.96824.2892108884.2892108884.2892109415.42E-145.37E-08
2610.260.96564.3078397544.3078397544.3078397915.33E-143.76E-08
2710.270.96294.32683524.32683524.3268352253.53E-132.52E-08
2810.280.96004.3461858544.3461858544.346185876.84E-141.60E-08
2910.290.95704.3658809064.3658809064.3658809162.18E-139.36E-09
3010.30.95394.385910074.385910074.3859100743.92E-134.64E-09
3110.310.95074.4062635394.4062635394.4062635417.82E-141.42E-09
3210.320.94744.4269319634.4269319634.4269319622.72E-136.71E-10
3310.330.94404.4479064074.4479064074.4479064056.22E-141.94E-09
3410.340.94044.4691783344.4691783344.4691783323.38E-132.63E-09
3510.350.93674.4907395734.4907395734.490739573.55E-142.91E-09
3610.360.93304.5125822984.5125822984.5125822954.00E-142.93E-09
3710.370.92904.5346990084.5346990084.5346990053.97E-132.77E-09
3810.380.92504.5570825094.5570825094.5570825068.88E-162.52E-09
3910.390.92084.5797258914.5797258914.5797258892.49E-142.23E-09
4010.40.91654.6026225194.6026225194.6026225172.06E-131.93E-09
4110.410.91214.6257660124.6257660124.6257660113.55E-131.63E-09
4210.420.90754.6491502324.6491502324.6491502313.55E-131.36E-09
4310.430.90284.6727692714.6727692714.672769277.99E-151.12E-09
4410.440.89804.6966174374.6966174374.6966174362.02E-139.08E-10
4510.450.89304.7206892444.7206892444.7206892439.24E-147.29E-10
4610.460.88794.7449794044.7449794044.7449794047.99E-155.79E-10
4710.470.88274.7694828144.7694828144.7694828137.02E-144.56E-10
4810.480.87734.7941945464.7941945464.7941945461.59E-133.55E-10
4910.490.87174.8191098444.8191098444.8191098442.40E-132.75E-10
5010.50.86604.844224114.844224114.844224112.66E-142.11E-10
5110.510.86024.8695329014.8695329014.86953294.49E-131.60E-10
5210.520.85424.8950319174.8950319174.8950319173.85E-131.21E-10
5310.530.84804.9207170024.9207170024.9207170019.15E-149.04E-11
5410.540.84174.9465841284.9465841284.9465841282.53E-136.71E-11
5510.550.83524.97262944.97262944.97262943.41E-134.94E-11
5610.560.82854.9988490424.9988490424.9988490421.69E-143.61E-11
5710.570.82165.0252393935.0252393935.0252393932.50E-132.62E-11
5810.580.81465.0517969095.0517969095.0517969092.40E-131.88E-11
5910.590.80745.0785181475.0785181475.0785181471.24E-131.34E-11
6010.60.80005.1053997735.1053997735.1053997732.66E-139.51E-12
6110.610.79245.1324385465.1324385465.1324385463.72E-136.67E-12
6210.620.78465.1596313255.1596313255.1596313253.02E-144.63E-12
6310.630.77665.1869750565.1869750565.1869750562.86E-133.19E-12
6410.640.76845.2144667755.2144667755.2144667753.23E-132.18E-12
6510.650.75995.24210365.24210365.24210362.65E-131.47E-12
6610.660.75135.2698827315.2698827315.2698827312.19E-139.80E-13
6710.670.74245.2978014465.2978014465.2978014464.17E-146.48E-13
6810.680.73325.3258570985.3258570985.3258570982.66E-134.24E-13
6910.690.72385.3540471125.3540471125.3540471121.81E-132.74E-13
7010.70.71415.3823689815.3823689815.3823689813.11E-141.74E-13
7110.710.70425.4108202695.4108202695.4108202698.88E-151.10E-13
7210.720.69405.43939865.43939865.43939865.32E-136.93E-14
7310.730.68345.4681016645.4681016645.4681016642.66E-134.09E-14
7410.740.67265.4969272085.4969272085.4969272082.49E-142.58E-14
7510.750.66145.525873045.525873045.525873043.36E-131.51E-14
7610.760.64995.5549370235.5549370235.5549370232.03E-137.99E-15
7710.770.63805.5841170735.5841170735.5841170731.06E-135.33E-15
7810.780.62585.6134111615.6134111615.6134111612.74E-131.78E-15
7910.790.61315.6428173065.6428173065.6428173069.59E-141.78E-15
8010.80.60005.6723335785.6723335785.6723335783.73E-148.88E-16
8110.810.58645.7019580925.7019580925.7019580924.99E-138.88E-16
8210.820.57245.7316890125.7316890125.7316890121.27E-138.88E-16
8310.830.55785.7615245435.7615245435.7615245431.04E-130.00E+00
8410.840.54265.7914629355.7914629355.7914629353.02E-148.88E-16
8510.850.52685.821502485.821502485.821502482.93E-130.00E+00
8610.860.51035.8516415095.8516415095.8516415098.97E-148.88E-16
8710.870.49315.8818783925.8818783925.8818783924.10E-138.88E-16
8810.880.47505.9122115385.9122115385.9122115382.63E-138.88E-16
8910.890.45605.9426393915.9426393915.9426393911.35E-130.00E+00
9010.90.43595.9731604335.9731604335.9731604332.34E-130.00E+00
9110.910.41466.0037731776.0037731776.0037731772.70E-138.88E-16
9210.920.39196.0344761736.0344761736.0344761734.72E-138.88E-16
9310.930.36766.0652680016.0652680016.0652680011.60E-138.88E-16
9410.940.34126.0961472756.0961472756.0961472755.34E-130.00E+00
9510.950.31226.1271126376.1271126376.1271126373.71E-131.78E-15
9610.960.28006.1581627596.1581627596.1581627592.18E-130.00E+00
9710.970.24316.1892963446.1892963446.1892963441.71E-130.00E+00
9810.980.19906.2205121216.2205121216.2205121214.41E-138.88E-16
9910.990.14116.2518088486.2518088486.2518088481.03E-128.88E-16
100110.00006.2831853076.2831853076.2831853078.88E-160.00E+00


[结论]

椭圆离心率越大(越接近1),近似公式误差越大。大约在\(e\approx0.75\)时,近似公式与龙贝格积分持平,越接近0精度越高。

数值积分的优势在于各种离心率下表现都比较稳定,而且可以计算指定区域的椭圆弧长。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2023-3-20 20:16 | 显示全部楼层
本帖最后由 uk702 于 2023-3-28 12:56 编辑

xxxxxxxxxxxxxxxxxxxxx
回复 支持 反对

使用道具 举报

发表于 2023-3-20 21:22 | 显示全部楼层
本帖最后由 uk702 于 2023-3-28 12:56 编辑

xxxxxxxxxxxxxxxxxx

点评

好  发表于 2023-3-20 21:58
回复 支持 反对

使用道具 举报

发表于 2023-3-20 23:10 | 显示全部楼层
主贴的结果非常漂亮, 谢谢 Ysu2008 !

从这些数值计算结果可以轻易弄出一个优于简单而已有结果的近似公式来。关于这点,各位有什么怀疑吗?

点评

愿闻其详。  发表于 2023-3-21 14:36
回复 支持 反对

使用道具 举报

发表于 2023-3-21 00:37 | 显示全部楼层
永远 发表于 2023-3-20 08:21
各位帮我看看e老师这个拉马努金公式补尝拟合函数族是怎么构造出来的,谁会???

这个函数族(u,v 视为参量)是我提出来的。但我没有说过这是拉氏拟合的补偿拟合。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-3-21 09:33 | 显示全部楼层
uk702 发表于 2023-3-20 21:22
若楼主有时间,望楼主帮忙检查核对一下,下面的“简单”公式,最大误差不超过 5.54*10^-6 。

\(a=1{,}b=0.0034\)
项名达公式100万截断周长\(C_0\ =4.000151905348548\)
你的公式算得周长 \(C_2=4.0001574446194175\)
误差\(\left| C_0-C_2\right|=5.539270869547863E-6\)

点评

多谢。  发表于 2023-3-21 09:39
回复 支持 反对

使用道具 举报

发表于 2023-3-21 09:57 | 显示全部楼层
本帖最后由 uk702 于 2023-3-28 12:56 编辑

xxxxxxxxxxxxxxxxxxx

回复 支持 反对

使用道具 举报

发表于 2023-3-21 15:00 | 显示全部楼层
zhichi支持!
非常漂亮!
赞美
回复 支持 反对

使用道具 举报

发表于 2023-3-23 09:48 | 显示全部楼层
我们所考虑过的补偿拟合的误差,差不多在 \(10^{-5}\) 的数量级. 这是有原因的。
椭圆周长的多项式拟合的极致就是超几何级数。使用了无穷多个自由度(级数系数)
这就解释了寥寥几个参变量是不足以突破 \(10^{-5}\) 这个坎的。要突破,考虑以
下简单方案:
给定\(k\),取最小\(m\)使\(\;r_m\small=\displaystyle\sum_{n = m+1}^\infty\binom{1/2}{n}^2\le 10^{-k},\)令\(\small G(x)=\displaystyle\sum_{n=0}^m\binom{1/2}{n}^2x^{2n}\)
考虑 \(\small\dfrac{{\scriptsize\displaystyle\sum_{n = m+1}^\infty\binom{1/2}{n}^2}x^{2n}}{\binom{1/2}{m+1}^2 x^{2m+2}}\) 的形如 \(\small 1+\big(\dfrac{4}{\pi}-r_m\big)\varphi(x)\) 的拟合,其中\(\small0\le\varphi\le 1.\)

注意以下椭圆周长的高精度极速算法。数值积分望尘莫及
F(x)=my(t=x^2/4,s=1+t,k=1);if(x==1,return(4/Pi));while((t=t*x^2*((2*k-1)/(2*(k+1)))^2)&&(t> 10^(-100))&&(s=s+t),k=k+1);return(s);

点评

厉害厉害,嘿嘿。  发表于 2023-3-23 15:39
回复 支持 反对

使用道具 举报

发表于 2023-3-23 17:12 | 显示全部楼层
\(\small C=\pi(a+b)\big(1+\dfrac{3\lambda^2}{10+\sqrt{4-3\lambda^2}}+\dfrac{3}{2^{17}}\lambda^{10}\big(1+\dfrac{\mu\lambda}{(1+(1-\lambda^u)^v)^w}\big)\big)\)
\(\lambda={\large\frac{a-b}{a+b}},\;\epsilon=\small\dfrac{2\sqrt{\lambda}}{1+\lambda},\;\lambda=\dfrac{2-\epsilon^2+2\sqrt{1-\epsilon^2}}{\epsilon^2}\)
\(\mu=21.381505539,\;u=2.02777,\;v=0.823239,\;w=4.84343\)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|数学中国 ( 京ICP备05040119号 )

GMT+8, 2024-6-15 06:12 , Processed in 0.078125 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表