Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: find argument of function inside long result?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31320] Re: find argument of function inside long result?
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sun, 28 Oct 2001 03:07:00 -0500 (EST)
  • References: <9rdgub$7q5$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jose,

expr = Sqrt[A[Sqrt[ a + Sqrt[b]][C[Sqrt[c + Sqrt[c]]]]]];

Cases[expr, Sqrt[arg_]-> arg, {0,Infinity}, Heads->True]

        {b, a + Sqrt[b], c, Sqrt[c] + c,
          A[Sqrt[a + Sqrt[b]][C[Sqrt[Sqrt[c] + c]]]]}

- {0,Infinity} causes the search to be through all "levels" of expression
- Heads->True causes the seach to include "heads" of expressions; for
example, without it we would not get b, a + Sqrt[b],.

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"jose flanigan" <jflanigan at netzero.net> wrote in message
news:9rdgub$7q5$1 at smc.vnet.net...
> I have a very long symbolic result that has several sqrt functions. I
> would like to extract the arguments of each of the sqrt's.
>
> How can I do this? The expression is too complicated to try and read it
off.
>
> thanks.
>




  • Prev by Date: Re: Plotting the histogram
  • Next by Date: Re: 2D to 3D graphics?
  • Previous by thread: RE: find argument of function inside long result?
  • Next by thread: RE: find argument of function inside long result?