{"title":"计算第一类完整椭圆积分的数值算法的开源实现","authors":"Hong-Yan Zhang, Wen-Juan Jiang","doi":"10.1016/j.rinam.2024.100479","DOIUrl":null,"url":null,"abstract":"<div><p>The complete elliptic integral of the first kind (CEI-1) plays a significant role in mathematics, physics and engineering. There is no simple formula for its computation, thus numerical algorithms are essential for coping with the practical problems involved. The commercial implementations for the numerical solutions, such as the functions <span>ellipticK</span> and <span>EllipticK</span> provided by MATLAB and Mathematica respectively, are based on <span><math><mrow><msub><mrow><mi>K</mi></mrow><mrow><mi>cs</mi></mrow></msub><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow></math></span> instead of the usual form <span><math><mrow><mi>K</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> such that <span><math><mrow><msub><mrow><mi>K</mi></mrow><mrow><mi>cs</mi></mrow></msub><mrow><mo>(</mo><msup><mrow><mi>k</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mo>=</mo><mi>K</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> and <span><math><mrow><mi>m</mi><mo>=</mo><msup><mrow><mi>k</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></math></span>. It is necessary to develop open source implementations for the computation of the CEI-1 in order to avoid potential risks of using commercial software and possible limitations due to the unknown factors. In this paper, the infinite series method, arithmetic-geometric mean (AGM) method, Gauss–Chebyshev method and Gauss–Legendre methods are discussed in details with a top-down strategy. The four key algorithms for computing the CEI-1 are designed, verified, validated and tested, which can be utilized in R& D and be reused properly. Numerical results show that our open source implementations based on <span><math><mrow><mi>K</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> are equivalent to the commercial implementation based on <span><math><mrow><msub><mrow><mi>K</mi></mrow><mrow><mi>cs</mi></mrow></msub><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow></math></span>. The general algorithms for computing orthogonal polynomials developed are valuable for the STEM education and scientific computation.</p></div>","PeriodicalId":36918,"journal":{"name":"Results in Applied Mathematics","volume":"23 ","pages":"Article 100479"},"PeriodicalIF":1.4000,"publicationDate":"2024-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2590037424000499/pdfft?md5=627b9a01d19618ef936715d938552af0&pid=1-s2.0-S2590037424000499-main.pdf","citationCount":"0","resultStr":"{\"title\":\"Open source implementations of numerical algorithms for computing the complete elliptic integral of the first kind\",\"authors\":\"Hong-Yan Zhang, Wen-Juan Jiang\",\"doi\":\"10.1016/j.rinam.2024.100479\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>The complete elliptic integral of the first kind (CEI-1) plays a significant role in mathematics, physics and engineering. There is no simple formula for its computation, thus numerical algorithms are essential for coping with the practical problems involved. The commercial implementations for the numerical solutions, such as the functions <span>ellipticK</span> and <span>EllipticK</span> provided by MATLAB and Mathematica respectively, are based on <span><math><mrow><msub><mrow><mi>K</mi></mrow><mrow><mi>cs</mi></mrow></msub><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow></math></span> instead of the usual form <span><math><mrow><mi>K</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> such that <span><math><mrow><msub><mrow><mi>K</mi></mrow><mrow><mi>cs</mi></mrow></msub><mrow><mo>(</mo><msup><mrow><mi>k</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mo>=</mo><mi>K</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> and <span><math><mrow><mi>m</mi><mo>=</mo><msup><mrow><mi>k</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></math></span>. It is necessary to develop open source implementations for the computation of the CEI-1 in order to avoid potential risks of using commercial software and possible limitations due to the unknown factors. In this paper, the infinite series method, arithmetic-geometric mean (AGM) method, Gauss–Chebyshev method and Gauss–Legendre methods are discussed in details with a top-down strategy. The four key algorithms for computing the CEI-1 are designed, verified, validated and tested, which can be utilized in R& D and be reused properly. Numerical results show that our open source implementations based on <span><math><mrow><mi>K</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></math></span> are equivalent to the commercial implementation based on <span><math><mrow><msub><mrow><mi>K</mi></mrow><mrow><mi>cs</mi></mrow></msub><mrow><mo>(</mo><mi>m</mi><mo>)</mo></mrow></mrow></math></span>. The general algorithms for computing orthogonal polynomials developed are valuable for the STEM education and scientific computation.</p></div>\",\"PeriodicalId\":36918,\"journal\":{\"name\":\"Results in Applied Mathematics\",\"volume\":\"23 \",\"pages\":\"Article 100479\"},\"PeriodicalIF\":1.4000,\"publicationDate\":\"2024-08-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://www.sciencedirect.com/science/article/pii/S2590037424000499/pdfft?md5=627b9a01d19618ef936715d938552af0&pid=1-s2.0-S2590037424000499-main.pdf\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Results in Applied Mathematics\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S2590037424000499\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q2\",\"JCRName\":\"MATHEMATICS, APPLIED\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Results in Applied Mathematics","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2590037424000499","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"MATHEMATICS, APPLIED","Score":null,"Total":0}
Open source implementations of numerical algorithms for computing the complete elliptic integral of the first kind
The complete elliptic integral of the first kind (CEI-1) plays a significant role in mathematics, physics and engineering. There is no simple formula for its computation, thus numerical algorithms are essential for coping with the practical problems involved. The commercial implementations for the numerical solutions, such as the functions ellipticK and EllipticK provided by MATLAB and Mathematica respectively, are based on instead of the usual form such that and . It is necessary to develop open source implementations for the computation of the CEI-1 in order to avoid potential risks of using commercial software and possible limitations due to the unknown factors. In this paper, the infinite series method, arithmetic-geometric mean (AGM) method, Gauss–Chebyshev method and Gauss–Legendre methods are discussed in details with a top-down strategy. The four key algorithms for computing the CEI-1 are designed, verified, validated and tested, which can be utilized in R& D and be reused properly. Numerical results show that our open source implementations based on are equivalent to the commercial implementation based on . The general algorithms for computing orthogonal polynomials developed are valuable for the STEM education and scientific computation.