Javascript 和 php-求解具有一个未知变量的方程组
我正在寻找一种 javascript 或 php 脚本,能够求解具有一个未知变量 x 的方程组。该方程可以是任何类型,即线性、二次、三次等。 例如 10-2*x = 25*x 或 12*sin(x³) = ln(x²) 或 e^x² = x^5
我希望我已经向您解释了我正在寻找的内容。您认为这样的脚本存在吗?或者是否有其他可能性来计算这样的方程?
提前致谢。
干杯,
安
I'm looking for a javascript or php-script that is able to solve a system of equations with one unknown variable x. The equation can be of any kind, i.e. linear, quadratic, cubic etc.
e.g. 10-2*x = 25*x or 12*sin(x³) = ln(x²) or e^x² = x^5
I hope I've explained you well enough what I'm looking for. Do you think that such scripts exist or are there maybe other possibilities to calculate such equations?
Thanks in advance.
Cheers,
enne
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有办法自动求解任何方程。即使您只需要获得数值解。
当然,有几种众所周知的方法来获得近似结果。但它们每个都对方程施加了一些限制。
这里是一个实现 牛顿法。
There is no way to solve any equation automatically. Even if you need to get only numerical solution.
Of course, there are several well known methods to get approximate results. But each of them imposes some restrictions to the equation.
Here is a simple script that implements Newtons method.