【问题标题】:Maxima: replace function f(x) by its definition?千里马:用它的定义替换函数 f(x)?
【发布时间】:2020-04-20 15:45:47
【问题描述】:

抱歉,我找不到任何相关信息。

如果我有带有符号函数 f(x) 的表达式,现在我想用它的显式形式替换这些表达式 f(x) 怎么办?

例如:

我有

f(x):= x^2+sin(x)

在微分中

diff (%e**sqrt(f(x)*a), x,2);

我现在想用上面的表达式替换f(x)

谢谢

卡尔

【问题讨论】:

    标签: maxima


    【解决方案1】:
    (%i1) i: integrate(f(x)*f(4*x), x, 0, 1) $
    
    (%i2) f(x):= x^2+sin(x) $
    
    (%i3) ev(i, f);
                         1
                        /
                        [             2                  2
    (%o3)               I  (sin(x) + x ) (sin(4 x) + 16 x ) dx
                        ]
                        /
                         0
    
     -- Function: ev (<expr>, <arg_1>, ..., <arg_n>)
    
         Evaluates the expression <expr> in the environment specified by the
         arguments <arg_1>, ..., <arg_n>.  The arguments are switches
         (Boolean flags), assignments, equations, and functions.  'ev'
         returns the result (another expression) of the evaluation.
    

    【讨论】:

    • 非常感谢,但对于我的问题,这不起作用。我有 f(x):=exp(-x^2) 和积分 'integrate (%f(x)*f(4*x), x, 0, 1) 我现在想替换 f(x)通过 exp(-x^ 2)。如何?非常感谢!
    • 非常抱歉,我们没有走到一起,我应该更清楚地制定,我的错..我有'integrate (%f(x)*f(4*x), x, 0 , 1),请注意撇号,并希望将 f(x) 和 f(4*x) 替换为 exp(-x^2) 和 exp(-(4*x)^ 2) 作为被积函数,不求值。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多