MathGroup Archive 1999

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

Search the Archive

Re: extracting lhs or rhs of equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16887] Re: extracting lhs or rhs of equations
  • From: Jens-Peer Kuska <v-jkuska>
  • Date: Mon, 5 Apr 1999 02:24:24 -0400
  • Organization: Wolfram Research, Inc.
  • References: <7e1bmf$ba2@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi David,

three or more:

LHS1[Equal[a_,_]]:= a

LHS2[expr_]:= expr /. a_==_ :> a

LHS3[eqn_Equal]:=eqn[[1]]

Hope that helps
  Jens 

"David P. Johnson" wrote:
> 
> Let's say I have an expression like:
> 
>   In[1]:= eq1= Sin[x] == x;
> 
> Is there a way to get just the left-hand side or right-hand side of the
> equation? Something like:
> 
>   In[2]:= LHS[eq1]
>   Out[2]:= Sin[x]
> 
> TIA.
> 
> --
> David
> ->(Signature continues here)


  • Prev by Date: Re: extracting lhs or rhs of equations
  • Next by Date: Problem Display Format
  • Previous by thread: Re: extracting lhs or rhs of equations
  • Next by thread: Re: extracting lhs or rhs of equations