MathGroup Archive 2002

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

Search the Archive

RE: How do I pick out the expression under a radical?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36257] RE: [mg36225] How do I pick out the expression under a radical?
  • From: "DrBob" <drbob at bigfoot.com>
  • Date: Wed, 28 Aug 2002 04:16:18 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

FullForm[expr]
Plus[Times[a,b,Power[x,2]],Times[5,Power[x,3]],
  Times[5,Power[Plus[4,Times[-1,Power[x,2]]],Rational[1,2]]]]

What you want is the third argument of Plus, the second argument of
Times, and the first argument of Power.

expr = a b x^2 + 5 x^3 + 5 Sqrt[4 - x^2];
expr[[3]]
expr[[3, 2]]
expr[[3, 2, 1]]

5*Sqrt[4 - x^2]
Sqrt[4 - x^2]
4 - x^2

Bobby Treat

-----Original Message-----
From: Steve Beach [mailto:asb4 at psu.edu] 
To: mathgroup at smc.vnet.net
Subject: [mg36257] [mg36225] How do I pick out the expression under a radical?

I'm a poor physicist trying to figure out how to sort out the
"physical" from the "non-physical" solutions to a problem.  To do
that, I need to be able to look at an expression and pick out a
subexpression, the part under the radical.

For example, say I've got the expression 

a b x^2 + 5 x^3 + 5 Sqrt[4 - x^2]

I'd like to pick out "4 - x^2", which would then tell me that x is
between +/- 2.  I know there has got to be an easy way to do it, but I
can't find it.  Any help would be appreciated.

Thanks,

Steve Beach
asb4 at psu.edu
http://www.thebeachfamily.org





  • Prev by Date: RE: How do I pick out the expression under a radical?
  • Next by Date: Re: MathLink for Excel (Windows 2000, Office 2000 and Mathematica 4.2
  • Previous by thread: RE: How do I pick out the expression under a radical?
  • Next by thread: RE: How do I pick out the expression under a radical?