MathGroup Archive 2010

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

Search the Archive

Re: Sin*Cos + Log

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113249] Re: Sin*Cos + Log
  • From: Sam Takoy <sam.takoy at yahoo.com>
  • Date: Wed, 20 Oct 2010 04:09:41 -0400 (EDT)

Dear Bob,

Thanks.

My hope is that I can define f without mentioning the arguments, as in

f = Sin*Cos + Log

It doesn't make much difference in this case, but in my case I have something 
along the lines of

f[t_, x_, y_, z_] = g[t, x, y, z]*h[t, x, y, z] + Derivative[0, 0, 1, 0][h][t, 
x, y, z]   etc

and I'd like to say

f = g*h + Derivative[0, 0, 1, 0][h]

skipping the arguments.

Is that possible?

Thanks!

Sam



________________________________
From: Bob Hanlon <hanlonr at cox.net>
To: Sam Takoy <sam.takoy at yahoo.com>; mathgroup at smc.vnet.net
Sent: Tue, October 19, 2010 7:20:45 AM
Subject: [mg113249] Re: [mg113215] Sin*Cos + Log

f[x_?NumericQ] := Sin[x]*Cos[x] + Log[x]

f /@ {x, 2, 2.}

{f[x], Log[2] + Cos[2] Sin[2], 0.314746}

x /: NumericQ[x] = True;

f /@ {x, y}

{Log[x] + Cos[x] Sin[x], f[y]}


Bob Hanlon

---- Sam Takoy <sam.takoy at yahoo.com> wrote: 

=============
Hi,

I'm working on a project that involves manipulating lots of functions. 
It would be much easier if I could manipulate functions without 
evaluating them and then evaluate them at the end. To this end, is there 
a way to endow

f = Sin*Cos + Log

with meaning and then somehow evaluate

f[x]?

Many thanks in advance,

Sam


  • Prev by Date: NDSolve grid
  • Next by Date: Interpolation undocumented error
  • Previous by thread: Re: Sin*Cos + Log
  • Next by thread: Re: Sin*Cos + Log