maple - Maple 使用 ShowSolution 函数计算不正确
问题描述
Maple 在使用 student.calculus1 包中的 ShowSolution 函数时错误地解决了以下问题。当 x 变量的幂为奇数或当我写 sin(n*x) 但当我写 x^(偶数) cos(n x) 时,它的工作正常。或者当我输入一个数字而不是 n 时,它的计算是正确的。我错过了什么吗?:|
解决方案
它看起来像一个错误(我已经提交了一个错误报告),在第一步就出错了。
作为解决方法,您可以将其作为第一步,
restart;
with(Student:-Calculus1):
ee := Int( x^2*cos(n*x), x=-Pi..Pi ):
new := rhs( Rule[parts, x^2, sin(n*x)/n]( ee ) ) assuming n::integer;
-(Int(2*sin(n*x)*x/n, x = -Pi .. Pi))
ShowSolution( new ) assuming n::integer;
在最后一步产生4*(-1)^n*Pi/n^2
。
或者在没有假设的情况下做那些步骤n
,然后simplify
在最终的结果下assuming n::integer
。
推荐阅读
- python - 将相关字段添加到序列化程序时出现问题
- jenkins - Jenkins:评论 Bitbucket 拉取请求
- c# - 异步方法似乎不等待,即使它在 C# 中包含“await”关键字
- html - 图像未从本地显示
- lodash - groupBy 和 value 作为 key
- powershell - 查询 PowerShell 优先级
- python - 从字典列表中获取多个列表
- flutter - Flutter,_shared 包是什么?
- dotnetnuke - 完成从 Dnn 9.1.1 升级到 9.3.0 后出现 HTTP 503 错误
- flutter - Flutter - 覆盖依赖项