Function argument
- To: mathgroup at smc.vnet.net
- Subject: [mg66953] Function argument
- From: "Bonny" <Banerjee at cse.ohio-state.edu>
- Date: Mon, 5 Jun 2006 03:47:57 -0400 (EDT)
- Organization: Ohio State University
- Sender: owner-wri-mathgroup at wolfram.com
I would like to define a function g that evaluates another function f at a given value. That is, g[a, f[x]] := f[a] For example, I might want the function f[x]=ax^2+bx+c to be evaluated at x=1 and get the result a+b+c. That is, g[1, ax^2+bx+c] should evaluate to a+b+c. Again, I might want the function f[x]=Sin[x] to be evaluated at x=pi and get the result 0. That is, g[pi, Sin[x]] should evaluate to 0. Is there a way to accomplish this in Mathematica? Any help would be appreciated. Thanks, Bonny.
- Follow-Ups:
- Re: Function argument
- From: "Bharat Bhole" <bbhole@gmail.com>
- Re: Function argument