MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Exponent function question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94397] Re: [mg94362] Exponent function question
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 11 Dec 2008 07:29:10 -0500 (EST)
  • Reply-to: hanlonr at cox.net

expr = Sqrt[Log[x^4] + Exp[x^2] - x + 1];

Max[Cases[expr, x^n_ :> n, Infinity]]

4


Bob Hanlon

---- Tuesday Shopping <tuesdayshopping at yahoo.com> wrote: 

=============
Reposting the question (previous post did not make it for some reason)

Consider a simple example: "Exponent[Sqrt[x^2+1], x]". This gives "0" as output.

I am trying to determine the maximum exponent of a given variable in an expression. Is there any way to do this? I would like to get "2" as output for the above example.

Note that the input expression could be quite complex involving many functions, such as trigonametric, logarithms and other functions. However, the exponent itself (2 in the above example) is always going to be an integer.

Thanks



      



--

Bob Hanlon



  • Prev by Date: Re: Difficulty in importing dates and times with functions like
  • Next by Date: Re: Exponent function question
  • Previous by thread: Re: Exponent function question
  • Next by thread: Re: Exponent function question