RE: assumptions
- To: mathgroup at smc.vnet.net
- Subject: [mg37848] RE: [mg37836] assumptions
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 15 Nov 2002 01:34:59 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
John,
Assumptions or type checking?
For type checking...
f[A_, z_?Positive, a_?Positive][r_] := A Exp[-z r/a]
f[A, 3, 2][r]
A/E^((3*r)/2)
f[A, -3, 0][r]
f[A, -3, 0][r] (* doesn't evaluate *)
For an example of using assumptions...
Integrate[A Exp[-z r/a], {r, 0, Infinity}, Assumptions -> {a > 0, z > 0}]
(a*A)/z
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: John Densmore [mailto:john.m.densmore.3 at nd.edu]
To: mathgroup at smc.vnet.net
Hi all,
If I have a function f=A*Exp[-zr/a], is there a way to make assumptions
about the parameters A, z, and a. I want to make sure z>0 and a>0. Thanks
JMD