Forgot password
 Register account
View 775|Reply 0

获取多元多项式的次数

[Copy link]

461

Threads

958

Posts

4

Reputation

Show all posts

青青子衿 posted 2019-6-18 15:24 |Read mode
Last edited by 青青子衿 2019-6-18 15:32
  1. coefs = CoefficientList[
  2.    x^3*y + x^2*z^2 + 2*x*y^3*z + y*z^5, {x, y, z}];
  3. Max[Total /@ (Position[coefs, x_ /; x != 0] - 1)]
Copy the Code
...
目前(2019年),直接使用Exponent命令,只能获取一元多项式的最高次数。
\[ x^3y + x^2z^2 + 2xy^3z + yz^5 \]
所以将其他变量全部用x替换,则使用Exponent命令,便可获取多元多项式的最高次数。
...
  1. x^3*y + x^2*z^2 + 2*x*y^3*z + y*z^5 /. y | z -> x // Exponent[#, x] &
Copy the Code
...
forum.php?mod=viewthread&tid=5506

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-23 10:05 GMT+8

Powered by Discuz!

Processed in 0.011556 seconds, 23 queries