Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Defining a function using common notation for absolute value (not Abs[x])

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112738] Re: Defining a function using common notation for absolute value (not Abs[x])
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Wed, 29 Sep 2010 04:11:51 -0400 (EDT)

The form |x| is simply not built-in, special input form that stands for 
Abs[x].  Probably it should be, along with the existing special input 
forms for square-root, etc.

You could use the Notation package to make it work, but that's getting 
into advanced and somewhat dangerous territory.

On 9/28/2010 6:06 AM, Gianni wrote:
> Please refer to:
>
> http://www.accardi.com/tutor/AbsoluteValueNotationSnapShot.bmp
>
> Thanks in advance for any help here.
>
>
> In ASCII:
>
> The given function to work with:  f(x) = (3^-|x|)
>
> Define it in Mathematica:
>
> f[x_]:=3^-Abs[x]
>
> f[x_]:=3^-|x|
>
> Syntax::tsntxi: "|x|" is incomplete; more input is needed.
>
> Syntax::sntxi: Incomplete expression; more input is needed.
>
> I am trying to display the absolute value exponent in the second
> function definition above in the way students will see it in a
> standard math text (with the vertical bars, not Abs, like in the first
> text line).  The first definition above is without error (exponent
> shown as -Abs[x]).  The second is what I am trying to define without
> error.  I am trying to find the button (hopefully on the classroom
> assistant palette) that will produce the desired results.  The button
> in the Typesetting section of the Classroom Assistant won't be
> implemented as an error free function definition as you see in the
> error messages.
>
> --------------------------------------------
>
>
>
>
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Test for dialog existence
  • Next by Date: Re: How do I test for existence of a list element?
  • Previous by thread: Re: Defining a function using common notation for absolute value (not Abs[x])
  • Next by thread: Re: Defining a function using common notation for absolute value (not Abs[x])