计算功能极限的最佳方法是什么? [英] What is the best approach to calculating function limits?

查看:49
本文介绍了计算功能极限的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算开发一个可以计算用户给定的表达式(函数)的限制的应用程序.

I am planning to develop an application that can calculate the limit of an expression (function) given by the user.

我已经有一个功能表达式计算器,它肯定会派上用场.我的想法是这样计算的:我给参数一些值,这些值越来越接近该点,但没有达到该点.最后,我看两个连续结果之间的差值是否从0变小或变大或变小.如果它变小或变小,则变小了.这意味着限制是有限的,否则无限.之后,可以很容易地估算出结果.

I already have a functional expression evaluator, which will definitely come in handy. My idea is to calculate it like this: I give the parameter a few values that get closer and closer to the point, but doesn't reach the point. At the end, I see if the difference between two consecutive results gets smaller or bigger closer or further from 0. If it gets smaller closer, this means that the limit is finite, infinite otherwise. After that, it's easy to approximate a result.

是否有更好的方法?还是我应该选择这个?

Is there a better approach to this? Or should I go with this one?

应用程序将接受包含以下数学运算符的函数: +,-,*,/,%,^ ,函数(例如下限,对数,三角函数)和3个条件函数(abs,最小,最大).因此,例如,不接受具有特定于整数值的函数和具有非整数值的另一个函数的函数.

The application will accept functions that contain these mathematical operators: +,-,*,/,%,^, functions (like floor, logarithms, trigonometry), and 3 condition functions (abs, min, max). So, for example a function which has a specific value for integer values, and another value for non-integer values is not accepted.

推荐答案

在数学上,您可以使用微分演算.这样,您只需执行差异规则,而不必使用蛮力

mathematically you could use the Differential calculus. Like that you just have to implement the differential rules and you dont have to use brute force

但是您对wolframalpha的评论很棒:示例:您需要

but the comment you got with wolframalpha is great: example: thats exactly what you need

这篇关于计算功能极限的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆