MathGroup Archive 2004

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

Search the Archive

Extracting Real Parts from NN Expression

  • To: mathgroup at
  • Subject: [mg51149] Extracting Real Parts from NN Expression
  • From: carlos at (Carlos Felippa)
  • Date: Wed, 6 Oct 2004 04:34:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Thank you very much to those who replied to early posts on the subject
title and help me fix several mistakes.  Finally got a robust
extraction function that has worked on a series of problems:


I used this in expressions such as
Solve[RealPart[expr]==0,{unknowns}], in which expr is a complicated
nonnumeric complex-valued expression, to solve some stability
transition problems in C&G.  (If the real part becomes positive
stability is lost).

To see what happens with built-in Re[], a simple example is


  Print[    Solve[Re[expr]==0,x]        //InputForm];
  Solve returns unevaluated

  Print[    Solve[RealPart[expr]==0,x]  //InputForm];
  {{x -> -a}, {x -> a}}

Note: a similar imaginary part extractor 


is still iffy, but I dont need it for my application.  It could
certainly be improved.

  • Prev by Date: Re: Oddities of Plot[]
  • Next by Date: recover a value in module at the end
  • Previous by thread: Re: Reads in only part of file
  • Next by thread: Re: Extracting Real Parts from NN Expression