{"id":34774087,"url":"https://github.com/maples7/newtonmethod","last_synced_at":"2026-05-21T13:36:14.022Z","repository":{"id":30226613,"uuid":"33777708","full_name":"Maples7/newtonMethod","owner":"Maples7","description":"牛顿法求解复数域上x^4-1=0收敛域的程序 using Python","archived":false,"fork":false,"pushed_at":"2015-04-23T13:33:00.000Z","size":730,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T20:22:12.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maples7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-11T13:58:43.000Z","updated_at":"2018-07-13T11:07:33.000Z","dependencies_parsed_at":"2022-08-30T03:20:59.952Z","dependency_job_id":null,"html_url":"https://github.com/Maples7/newtonMethod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maples7/newtonMethod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maples7%2FnewtonMethod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maples7%2FnewtonMethod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maples7%2FnewtonMethod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maples7%2FnewtonMethod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maples7","download_url":"https://codeload.github.com/Maples7/newtonMethod/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maples7%2FnewtonMethod/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28024335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-25T08:11:24.863Z","updated_at":"2025-12-25T08:11:27.324Z","avatar_url":"https://github.com/Maples7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# newtonMethod\n牛顿法求解复数域上x^4-1=0收敛域的程序 using Python\n\n[总体分析]  \n1、牛顿法本质上是关于迭代求解非线性方程解的方法，而迭代是为了不断逼近精确解。牛顿法迭代的关键在于对非线性函数（方程）的线性化。它是一种近似求解的方法，关于其原理不再赘述。  \n2、求解收敛域，程序的关键在于如何判断对于给定的初值，是收敛的还是发散的。如果收敛，收敛于哪个解。  \n3、经过综合考量程序性能和解的正确性，同时根据牛顿法在收敛域内能以平方量级快速收敛的特点，确定程序中牛顿法退出迭代的限制条件为：①最大迭代次数限制（判定为发散）；②迭代值之间距离精度限制（收敛）；③函数值精度限制（收敛）。  \n4、通过枚举一定范围内的点，来绘制出收敛域。  \n5、同时需要注意一些特殊情况，比如在运用迭代时，分母为0的情况。  \n\n[编程语言与环境]\n* C/C++/C#/Java等编译型语言：由于编译型语言对变量类型限制严格（在编译之前必需确定变量类型），容易让程序员花费过多精力纠结于程序实现细节而忽略问题本身的分析，为了提高效率，不采用；\n* MALTAB：解释型语言，不支持面向对象，抽象程序高，函数库强大。但同时正式因为其极高的抽象程度，致使程序运行速度偏低，可能增高程序调试成本；且网络上有关于此题的MATLAB版本，挑战不大。\n* Python：解释型语言，支持面向对象，抽象程序略低于MATLAB（但一般认为比C++/Java高，理论上比MATLAB运行速度快），并且有类似于MATLAB的支持图形绘制的成熟函数库（matplotlib），是一个均衡的不错的选择。\nIDE：VS 2013\nPython Version：Python 2.7.6（需要安装matplotlib库）\n\n程序的关键部分便是newtonMethod函数部分，主体部分通过一个二重循环枚举一定范围内的每一个点，并且通过对其施用牛顿法后的返回值来确定其是收敛还是发散。如果是收敛，同时返回其收敛于的值。\n其他函数和代码块程序中均有详细注解。\n\n[总结与感悟]\n* 通过在复平面上画出收敛域，发现其收敛域在着色之后是一个不断细分自相似的神奇图案，它并没有确切的边界（边界处是不断细分的自相似）。如果提高精度一定可以看到更加精细的结果。\n通过这个程序做出来的图案，可以深切的体会的自然和宇宙的奇妙和伟大。简单中蕴含着复杂，而往往自然又能轻易的化繁为简。\n宇宙和原子结构的相似性似乎是这种自相似性最好的佐证。\n\n* _近似随机的结果可以在无随机的确定性系统中产生_  \n上述这句话似乎冥冥中昭示着宇宙的真理。从量子力学的发展，测不准原理、薛定谔的猫、蝴蝶效应等等有意思的发现都可以窥见一二。世界是概率的，每一件事情发生都有其概率性，而事物的相互作用会改变其发生的概率。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaples7%2Fnewtonmethod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaples7%2Fnewtonmethod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaples7%2Fnewtonmethod/lists"}