Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: restricting range?

  • To: mathgroup at
  • Subject: [mg57445] Re: [mg57429] restricting range?
  • From: "David Park" <djmp at>
  • Date: Sat, 28 May 2005 05:39:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

You could use the Assuming statement.

f[t_] := Which[t < 1/4, 1, True, t^2]

Assuming[t < 1/4, f[t] // Simplify]

In 5.1.1 the Piecewise function is probably more useful than defining with
the Which statement.

David Park
djmp at

From: Ken Turkowski [mailto:turk at]
To: mathgroup at

I have a function that has multiple branches (using Which), but I would
like to restrict its evaluation to one branch for purposes of feeding
into Solve.

I tried
   f[t] /; t<1/4
   (t < 1/4) && f[t]
but neither works. I know I've seen something like this for square roots
in the Mathematica book,
   Sqrt[x^2] restricted to (Im[x] == 0) && (x >= 0)
but I can't find it. Can you help me?

  • Prev by Date: Re: Printing - mathematica cropping the right hand side... :(
  • Next by Date: FindRoot:: Failed to converge to the requested accuracy
  • Previous by thread: Re: restricting range?
  • Next by thread: 2 stage solution with FindRoot