Re: restricting range?
- To: mathgroup at smc.vnet.net
- Subject: [mg57445] Re: [mg57429] restricting range?
- From: "David Park" <djmp at earthlink.net>
- Date: Sat, 28 May 2005 05:39:08 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
You could use the Assuming statement. f[t_] := Which[t < 1/4, 1, True, t^2] Assuming[t < 1/4, f[t] // Simplify] 1 In 5.1.1 the Piecewise function is probably more useful than defining with the Which statement. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Ken Turkowski [mailto:turk at worldserver.com] To: mathgroup at smc.vnet.net 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 and (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?