7
$\begingroup$

Fixed in Version 14.0


According to Exponent:

  • Exponent[expr, form] gives the maximum power with which form appears in the expanded form of expr.
  • Exponent[expr, form, h] applies h to the set of exponents with which form appears in expr.
  • The default taken for h is Max.

So Exponent[..., …, Max] is equivalent to Exponent[..., …]. But how to explain the following output?

In[1]:= Exponent[x, Sqrt[x]]

Out[1]= 2

In[2]:= Exponent[x, Sqrt[x], Max]

Out[2]= 1

In[3]:= Exponent[Sqrt[x], Sqrt[x], Defer]

              1
Out[3]= Defer[-]
              2

Isn't this a bug?

$\endgroup$
4
  • $\begingroup$ It seems weird, indeed. For example, you can use List as the 3rd argument to get all the exponents. But Exponent[x, Sqrt[x]] gives 2 and Exponent[x, Sqrt[x], List] gives {1}. $\endgroup$
    – Domen
    Commented Sep 12, 2023 at 7:40
  • $\begingroup$ The documentation says under Possible Issues that Exponent is purely syntactical and does no analysis. $\endgroup$
    – Roland F
    Commented Sep 12, 2023 at 8:51
  • $\begingroup$ @RolandF If so, shouldn't Exponent[x, Sqrt[x]] return 0 (instead of 2)? And shouldn't Exponent[Sqrt[x], Sqrt[x], Identity] return 1 (rather than 1/2)? $\endgroup$
    – user688486
    Commented Sep 12, 2023 at 10:21
  • $\begingroup$ By experiment, Exponent[x^a, x^b] works reasonably with numbers as exponents of symbols, but not with exponent symbols. Even specifying everything] as positive integers or expecting simplifications as in Exponent[(1-x^2)/(1+x),x] returns input. Using a non-symbol expression as variable in polynomial reduction may be termed 'abuse of powers'. $\endgroup$
    – Roland F
    Commented Sep 12, 2023 at 10:58

1 Answer 1

1
$\begingroup$

Fixed in Version 14.0, now Exponent[Sqrt[x], Sqrt[x], Defer] returns 1/2

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.