MathGroup Archive 2000

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

Search the Archive

Re: Assumptions i Mathematica...

  • To: mathgroup at
  • Subject: [mg25700] Re: Assumptions i Mathematica...
  • From: Brian Higgins <bghiggins at>
  • Date: Thu, 19 Oct 2000 04:35:26 -0400 (EDT)
  • References: <8sjjc2$>
  • Sender: owner-wri-mathgroup at

Jes, One way to do this is to use the Condition function in the
definition of f(x): i.e.


The above function will only evaluate the RHS if  x>0.





 You can also add an additional definition for all other values


The down side with using this approach is that you cannot do
many symbolic operations on your function, e.g. differentiate etc.
An alternative method that gives you more flexibilitry is to use the
UnitStep function

In[89]:=f[x_] := x^3UnitStep[x]

In[91]:=D[f[x], x]

Out[91]=\!\(x\^3\ DiracDelta[x] + 3\ x\^2\ UnitStep[x]\)



In article <8sjjc2$fu3 at>,
  "Jes Hansen" <Whammer.antispam at> wrote:
> Hi, I'm quite new at this, and I havn't been able to figure out how
to tell
> Mathematica to assume that a variable, x, is positive. I have a
> f(x), where I only want to consider positive values of x. I'm using
> 3.0.
> Regards
> Jes

Sent via
Before you buy.

  • Prev by Date: Using results of "Solve"
  • Next by Date: Re: Assumptions i Mathematica...
  • Previous by thread: Re: Assumptions i Mathematica...
  • Next by thread: Re: Assumptions i Mathematica...