argsub,subs,在maple中简化

问题描述 投票:0回答:1

我在枫树中有这行代码

即使在使用后也不给出表达方式

eval
evalm

v := Vector[column]([
    (sigma[h] + mu[h])*E[h],
    -1 + kappa*sigma[h]*E[h] + (omega[h] + mu[h])*A[h],
    -kappa*sigma[h]*E[h] + ((xi/(1 + gamma*I[h])) + sigma[1] + mu[h])*I[h],
    -xi*I[h]/(1 + gamma*I[h]) + (sigma[2] + mu[h] + alpha[h])*T[h],
    (sigma[r] + mu[r])*E[r],
    -sigma[r]*E[r] + mu[r]*I[r]
]);
V=jacobian(v,[E[h],A[h],I[h],T[h],E[r],I[r]]);
now i want to replace this value in the matrix with K
-xi/(gamma*I[h] + 1) + (xi*gamma*I[h])/(gamma*I[h] + 1)^2 = K
with this code
VV:=subs(expr=m,V);
but the output is giving
VV=V 

请我更正这段代码

your text
Simply 给出了同样的结果,而 argsubs 带来了错误 错误,(在 algsubs 中)无法计算 gamma 中模式的程度

matrix maple
1个回答
0
投票
restart;

# `I` is the default imaginary unit, so
# set that to another name if you want to
# use names like I[r], I[h], etc.
# (Or, use different names for those...)
interface(imaginaryunit=j):

v := Vector[column]([
    (sigma[h] + mu[h])*E[h],
    -1 + kappa*sigma[h]*E[h] + (omega[h] + mu[h])*A[h],
    -kappa*sigma[h]*E[h] + ((xi/(1 + gamma*I[h])) + sigma[1] + mu[h])*I[h],
    -xi*I[h]/(1 + gamma*I[h]) + (sigma[2] + mu[h] + alpha[h])*T[h],
    (sigma[r] + mu[r])*E[r],
    -sigma[r]*E[r] + mu[r]*I[r]
]);

# You forgot to actually assign the
# following to `v`. You used just `=`
# instead of `:=`
# Also, linalg[jacobian] is deprecated since
# about 20 years ago, and produces the also
# deprecated `vector` instead of `Vector`.
V := VectorCalculus:-Jacobian(v,[E[h],A[h],I[h],T[h],E[r],I[r]]);

expr := -xi/(gamma*I[h] + 1) +
 (xi*gamma*I[h])/(gamma*I[h] + 1)^2;

# `subs` will not suffice in all elements,
# since in some of them the terms above
# appear only as *part* of a larger sum
# of terms.
# So, instead, use simplify with side-relations
simplify(V,{expr=K});
© www.soinside.com 2019 - 2024. All rights reserved.