Maple 使用 ShowSolution 函数计算不正确
Maple incorrect calculation with ShowSolution function
Maple 在使用student.calculus1 包中的ShowSolution 函数时错误地解决了以下问题。当 x 变量的幂为奇数或当我写 sin(n*x) 但当我写 x^(even number)cos(nx) 时,它工作正常,它计算不正确。或者当我输入数字而不是 n 时,它计算正确。我想念什么吗? :|
好像是个bug(我已经提交了bug报告),第一步就出错了。
作为解决方法,您可以先执行此操作,
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
下的最终结果。
Maple 在使用student.calculus1 包中的ShowSolution 函数时错误地解决了以下问题。当 x 变量的幂为奇数或当我写 sin(n*x) 但当我写 x^(even number)cos(nx) 时,它工作正常,它计算不正确。或者当我输入数字而不是 n 时,它计算正确。我想念什么吗? :|
好像是个bug(我已经提交了bug报告),第一步就出错了。
作为解决方法,您可以先执行此操作,
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
下的最终结果。