MathGroup Archive 2003

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

Search the Archive

Re: Disappearing Function Definition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45021] Re: [mg45006] Disappearing Function Definition
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 13 Dec 2003 06:06:08 -0500 (EST)
  • References: <A4628A7C27BF0D48847FD4AB8536731D3DAC65@blinky.mobile-mind.com>
  • Sender: owner-wri-mathgroup at wolfram.com

On 12 Dec 2003, at 20:55, Scott Guthery wrote:

> Andrzej
>
> Thanks for the feedback.  I didn't want an answer, I wanted
> and expected to get a function of x.  This seems like
> a resonable expectation.  Maybe I should use HOLD somehow?
>
> Cheers, Scott


No this has nothing to do with Hold. You just can't expect a computer 
program to do this sort of thing yet. Or in any case, Mathematica won't 
do it. In fact, this is the sort of thing you calls for the skills of a 
human mathematician (not that great skills actually).
What you are trying to do is to find the formula for the following 
function of two variables x and a:
f[x_, a_] := Integrate[(x + y)*
     Sum[DiracDelta[y - t], {t, 1, x}],
    {y, 0, a}]

In your case a=100 but there is no reason to limit oneself to that. But 
I am going to  assume that a and x are postitive integers, which I 
think is what you meant, otherwise there are complications with the 
meaning of Sum etc. (But a general formula  under a suitable 
interpretation can also be given).

  So here is the answer, consider:

g[x_, a_] := If[x >= a, (a - 1)*x +
     (a - 1)*(a/2), (3*x^2)/2 + x/2]

You can check that f[x,a]==g[x,a].

The proof needs only careful a careful consideration of the definitons 
so I leave it to you.

Andrzej Kozlowski




>
> 	-----Original Message-----
> 	From: Andrzej Kozlowski [mailto:akoz at mimuw.edu.pl]
To: mathgroup at smc.vnet.net
> 	Sent: Fri 12/12/2003 6:39 AM
> 	To: Scott Guthery
> 	Cc: mathgroup at smc.vnet.net
> 	Subject: [mg45021] Re: [mg45006] Disappearing Function Definition
> 	
> 	
>
> 	All that happens is that the kenrel quits. The "definition" disappears
> 	simply because once the kernel quits all all values and definiton
> 	stored by Mathematica go with it. Why does the kernel quit? Presumably
> 	because Mathematica can't make any sense of your input. I certainly
> 	can't blame it and also I can't believe you really expected to get any
> 	answer!
> 	Of course if you give x a numerical value, then it's another matter:
> 	
> 	
> 	f[x_, y_] = x + y;
> 	Pick[x_, y_] = Sum[DiracDelta[y-t], {t, x}];
> 	x=15;
> 	
> 	Integrate[f[x, y]*Pick[x, y], {y, 0, 100}]
> 	
> 	345
> 	
> 	
> 	
> 	On 12 Dec 2003, at 18:42, Scott Guthery wrote:
> 	
> 	> Can anybody explain the following?  Note that In[4] thinks for
> 	> a while and then returns with no Out[4] but if you then take a
> 	> look at f its definition has disappeared.
> 	>
> 	>
> 	> In[1]:= f[x_, y_] = x + y
> 	>
> 	> Out[1]:= x+y
> 	>
> 	> In[2]:= f[x,y]
> 	>
> 	> Out[2]:= x+y
> 	>
> 	> In[3]:= Pick[x_, y_] = Sum[DiracDelta[y-t], {t, x}]
> 	>
> 	> Out[3]:= \!\(\[Sum]\+\(t = 1\)\%x DiracDelta[\(-t\) + y]\)
> 	>
> 	> In[4]:= Integrate[f[x, y]*Pick[x, y], {y, 0, 100}]
> 	>
> 	> *** Nothing returned here ***
> 	>
> 	> In[1]:= f[x,y]
> 	>
> 	> Out[1]= f[x,y]
> 	>
> 	>
> 	>
> 	>
> 	>
> 	
> 	
>


  • Prev by Date: RE: Immediate or Delayed Definitions in NDSolve?
  • Next by Date: Replacement rules with I (sqrt(-1)
  • Previous by thread: Re: Disappearing Function Definition
  • Next by thread: Now I understand that it was an input problem!!