wolfram-mathematica - 如何修复 'Equations may not give solutions for all "解决“变量”错误

标签 wolfram-mathematica

我正在尝试一个可以用MUC(未定系数法)解决的问题。

但是,当我使用 Solve 函数时,出现错误。

y[x_] := a x^3 + b x^2 + c x + d
Solve[{y''[x] + 2 y'[x] + y[x] == x^3}, {a, b, c, d}]

[ERROR]:
Solve::svars: Equations may not give solutions for all "solve" variables.

这不应该解决集合中的所有变量吗?

感谢您的帮助:)

最佳答案

看起来像some extra methodology为此需要。

正如您所说,具有 x^3 的有限导数族的函数是

y[x_] := a x^3 + b x^2 + c x + d

使系数相等

sol = Solve[Thread[CoefficientList[
     y''[x] + 2 y'[x] + y[x], x] == CoefficientList[x^3, x]]]
{{a -> 1, b -> -6, c -> 18, d -> -24}}

检查结果

FullSimplify[y''[x] + 2 y'[x] + y[x] == x^3 /. sol]
{True}

关于wolfram-mathematica - 如何修复 'Equations may not give solutions for all "解决“变量”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55990153/

相关文章:

performance - 使用 copula 分布的总和分位数太慢

python - Python 中 NumPy 或 SciPy 中 Wolfram Mathematica 的模拟函数

wolfram-mathematica - 使用 Solve 解决线性系统问题

wolfram-mathematica - Mathematica "AppendTo"函数问题

function - 计算 Mathematica 列表中的出现次数(使用代码,但未完全正常工作)

wolfram-mathematica - 在 Mathematica 中取正平方根

wolfram-mathematica - Mathematica 中的连接点

matlab - 从 Mathematica 调用 Matlab 的非 Windows 方式

wolfram-mathematica - 制作简化的 MakeBox

wolfram-mathematica - listPlot 的多个指令