p!differentiate - battlecatsultimate/PackPack GitHub Wiki
Type : Constraint Command
Level : Member
DM : Allowed
diff
, dx
Formula [Required]
: Formula that will be differentiated. The formula must contain only up to one variable.
- Example :
p!dx sin(x)
,p!dx cos(a)
(a
here is variable)
-v Value [Required]
: Value that will be put after differentiation. Since bot doesn't have capability to offer differentiated formula itself to the users, you have to put the value in it. Value also must be wrapped with square brackets []
.
- Example :
p!dx sin(x) -v [pi]
,p!dx cos(a) -v [2 * pi]
-s Step <Optional>
: Size of step that bot will use when performing numerical methods. Step size must be wrapped with square brackets []
. Default step size is 10⁻⁸
if it's unspecified.
- Example :
p!dx sin(x) -v [pi] -s [10^(-8)]
-f
or -front
: Make bot use Forward Difference Method
algorithm.
-c
or -center
: Make bot use Central Difference Method
algorithm.
-b
or -back
: Make bot use Backward Difference Method
algorithm.
Bot calculating d/dx sin(x) |
If the formula and the value are provided, bot will use numerical methods to obtain differentiated formula with specified value. For example, if we define formula as Central Difference Method
as default since this gives better accuracy (
Bot has capability to perform 3 algorithm : Forward Difference Method, Backward Difference Method, Central Difference Method. It's basically considering slope between two points on the
- Forward Difference Method
FDM follows formula below
- Central Difference Method
CDM follows formula below
- Backward Difference Method
BDM follows formula below