【问题标题】:Mathematica clear a function's derivative definitionMathematica 清除函数的导数定义
【发布时间】:2012-09-17 07:34:15
【问题描述】:

我在 Mathematica 中定义了一个函数的导数,但没有定义函数本身,即我有一个如下所示的函数定义:

y'[x_] := constant * f'[x].

我不知道如何清除它。如果我使用 Clear[y'] 或 `ClearAll[y'],我会收到一条错误消息:

ClearAll::ssym: y' 不是符号或字符串。

Clear[y]ClearAll[y] 不执行任何操作来删除 y' 的定义。

关于如何删除y' 的定义的任何想法?

【问题讨论】:

    标签: function wolfram-mathematica derivative


    【解决方案1】:

    这应该做你想做的:

    y'[x_] =.
    

    Unset。另请参阅this question 了解相关信息。

    【讨论】:

      【解决方案2】:

      您可以使用Remove[y]。对于函数名称 f' 是不寻常的语法,但它确实出现在派生文档中:http://reference.wolfram.com/mathematica/ref/Derivative.html

      派生名称形式似乎对Information (??) 提出了一些问题,它通常会显示属性信息。

      y'[x_] := constant*f'[x]
      y'[4]
      ??y
      

      常数 f'[4]

      全球`y

      Remove[y]
      ??y
      

      Information::notfound : 未找到符号 y。 >>

      y'[4]
      

      y'[4]

      但奇怪的是,(与派生名称形式无关):

      Information[y]
      

      全球`y

      这里有一些关于Remove的更深入的信息:https://mathematica.stackexchange.com/questions/4921/what-is-the-story-with-removed-symbols

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-03-12
        • 2011-11-12
        • 1970-01-01
        • 1970-01-01
        • 2023-03-09
        • 2011-11-29
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多