首页 > 解决方案 > Maple 使用 ShowSolution 函数计算不正确

问题描述

Maple 在使用 student.calculus1 包中的 ShowSolution 函数时错误地解决了以下问题。当 x 变量的幂为奇数或当我写 sin(n*x) 但当我写 x^(偶数) cos(n x) 时,它的工作正常。或者当我输入一个数字而不是 n 时,它的计算是正确的。我错过了什么吗?:| 这是一个屏幕截图:

当假设(n::integer)。 Maple 说答案是 0,这也是不正确的

标签: maple

解决方案


它看起来像一个错误(我已经提交了一个错误报告),在第一步就出错了。

作为解决方法,您可以将其作为第一步,

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


推荐阅读