MathGroup Archive 2001

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

Search the Archive

Re: How to define a polyfunction?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27422] Re: [mg27389] How to define a polyfunction?
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Sun, 25 Feb 2001 00:53:49 -0500 (EST)
  • References: <200102230733.CAA06963@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Regardless of the term "polyfunction",

In[1]:=
golf[t_] := t^2 - t;
In[2]:=
key[t_] := If[(golf'[x] /. x -> t) > 0, (t^4 + t*3), (t^2.5 - t)];
In[3]:=
key[2]
Out[3]=
22
In[4]:=
key[0.4]
Out[4]=
-0.298807

This will show the discontinuity at t = 0.5 induced by the definition:

In[5]:=
Plot[key[t], {t, 0, 1}]


Tomas Garza
Mexico City
----- Original Message -----
From: "liwen liwen" <gzgear at yahoo.com>
To: mathgroup at smc.vnet.net
Subject: [mg27422] [mg27389] How to define a polyfunction?


> Dear friend,
>          How are you!Now I encounter a problem that I
> can not solve for a long time .
> It can be express simplely as how to define a
> polyfunction,for example,a simple polyfunction may be
> defined as that:
>
> Key[t_]:=If[(t>0),1,0];
>
> It is easy to define.However,it will be more difficult
> when the condition turns more complicate.For instance:
> golf=t^2-t;
> Key[t_]:=If[(D[golf[t],t]>0),(t^4+t*3),(t^2.5-t)];
>
>
> Best regards,
>
>
> Liwen
> E-mail:  gzgear at yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices!
http://auctions.yahoo.com/
>



  • Prev by Date: Boundary value problem with NDSolve
  • Next by Date: Re: How to define a polyfunction?
  • Previous by thread: Re: How to define a polyfunction?
  • Next by thread: Re: How to define a polyfunction?