I have a following expression and need an exponent of n

 Exponent[Exp[Sqrt[n]]*n^2, n]
 (* 2 *)

 Exponent[Exp[Sqrt[n]]*n, n]
 (* 1 *)

All versions 7,8,9,10 up to 11.0 gives (correctly)

 Exponent[Exp[Sqrt[n]], n]
 (* 0 *)

But versions 11.3 and 12.0 returns unevaluated

 Exponent[Exp[Sqrt[n]], n]
 (* Exponent[E^Sqrt[n], n] *)

Why this incompatibility ? This expression was a part of my long program and I wasted today lot of time to find why my program not works under higher version of Mathematica. The compatibility is a good thing.


closed as off-topic by m_goldberg, Carl Lange, MarcoB, Alex Trounev, bbgodfrey May 11 at 4:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – m_goldberg, Carl Lange, MarcoB, Alex Trounev, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ 0 is not correct because n^0 usually equals 1. $\endgroup$ – Henrik Schumacher May 6 at 18:01
  • $\begingroup$ Exponent[n^0,n] is equal to zero. Also Exponent[1, n] is 0. $\endgroup$ – Vaclav Kotesovec May 6 at 18:12
  • $\begingroup$ Yeah, but asking for the exponent of n in Exponent[Exp[Sqrt[n]], n] does not make sense. Thus, keeping the expression unevaluated is more correct than returning 0. $\endgroup$ – Henrik Schumacher May 6 at 18:43
  • $\begingroup$ Maybe yes, but question is why was this changed. $\endgroup$ – Vaclav Kotesovec May 6 at 20:51
  • 1
    $\begingroup$ My guess is: Because it is more consistent this way. $\endgroup$ – Henrik Schumacher May 6 at 20:55