MathGroup Archive 2003

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

Search the Archive

condition and pattern matching

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44885] condition and pattern matching
  • From: "ram" <amli at comcast.net>
  • Date: Fri, 5 Dec 2003 05:31:55 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I would like to integrate the function from {0,h}.

\!\(\((E\^\(\(-I\)\ k\ Abs[\(-h\) + z]\)\/Abs[\(-h\) + z] +
        E\^\(\(-I\)\ k\ Abs[h + z]\)\/Abs[h + z] -
        \(2\ E\^\(\(-I\)\ k\ Abs[z]\)\ Cos[h\ k]\)\/Abs[z])\)\ Csc[h\ k]\^2\
    Sin[k\ \((h - Abs[z])\)]\)

Is there any way that I can replace Abs function by its values?  I know that
the following cases for condition matching work

fac[n_ /; n > 0] := n!
m /:Greater[m,n]=True;
fac[m]
gg[m_,n_]:=m-n /; m>n
u/:Greater[u,v]=True;
gg[u,v]

But I can not find a way to apply  above ideas when expressions are
involved.  Thanks for any help.


Ram Kochhar




  • Prev by Date: Re: Scoping, named patterns, local vs global variables
  • Next by Date: Re: Scoping, named patterns, local vs global variables
  • Previous by thread: Is there a symbolic solution for this?
  • Next by thread: Re: condition and pattern matching