Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将函数应用于Maxima中的命名参数列表_Maxima_Wxmaxima - Fatal编程技术网

将函数应用于Maxima中的命名参数列表

将函数应用于Maxima中的命名参数列表,maxima,wxmaxima,Maxima,Wxmaxima,对于拉格朗日乘子的问题,可以求解临界点。通常,你会得到一组临界点。是否有一种方法可以轻松地将原始函数映射到解决方案上,以评估/应用这些解决方案上的函数以获得函数值 下面是一些代码,最后一步是我不知道如何构造的代码: f(x, y) := y^2 - x^2 g: 1/4 * x^2 + y^2 eq1: diff(f(x,y), x) = h * diff(g, x); eq2: diff(f(x,y), y) = h * diff(g, y); eq3: g = 1; solve([eq1

对于拉格朗日乘子的问题,可以求解临界点。通常,你会得到一组临界点。是否有一种方法可以轻松地将原始函数映射到解决方案上,以评估/应用这些解决方案上的函数以获得函数值

下面是一些代码,最后一步是我不知道如何构造的代码:

f(x, y) := y^2 - x^2
g: 1/4 * x^2 + y^2

eq1: diff(f(x,y), x) = h * diff(g, x);
eq2: diff(f(x,y), y) = h * diff(g, y);
eq3: g = 1;

solve([eq1, eq2, eq3], [x, y, h]);
# Get:
# [[x=-2,y=0,h=-4],[x=2,y=0,h=-4],[x=0,y=-1,h=1],[x=0,y=1,h=1]]

# How can I get the list of values by applying the function to the
# list of solutions?
map(apply(f(x, y)), solve([eq1, eq2, eq3], [x, y, h]));

# Want (evaluated):
# [f(-2, 0), f(2, 0), f(0,-1), f(0, 1)]
# ???

一种方法是将解决方案替换为函数返回的表达式。类似这样的东西(我没有试过):


这一切照常进行,谢谢!
mysolutions: solve (...);
map (lambda ([solution1], subst (solution1, f(x, y))), mysolutions);