1

I define the simple function:

   Simp[h_] := Integrate[h[x] p[x], {x, -∞, ∞}]

where the function p[x] is continuous, but I want to define later, not now.

I want to evaluate Simp[h] when h is, say, $1 + \delta$. This ought to be easy, but how do I get Mathematica to do the obvious? My work around is to break the evaluation into two parts and add the results myself. However, in my real problem, Simp[h] appears in several places inside a nonlinear functional. Now things get tedious. It doesn't help that in my real problem the DiracDelta ($\delta$) is a weighted train of unequally spaced DiracDeltas. The DiracComb is useless for me.

Artes
  • 57,212
  • 12
  • 157
  • 245
Roy S.
  • 11
  • 1
  • Your Simp[h] is not a usual function, but a functional. If you want Simp[h] to handle the $\delta$-distribution, then this is a functional on a complex space. Ask it at a math forum, say MSE. – user64494 Oct 21 '22 at 03:48
  • You might want to check out Convolve. – chuy Oct 21 '22 at 19:38

2 Answers2

3

The core problem is that Integrate[f[x],x] does not distribute over f[x], if f[x] is the sum of other functions. So, use

simp[h_] := Map[Integrate[# p[x], {x, -Infinity, Infinity}] &, h]
simp[1 + DiracDelta[x]]
(* Integrate[p[x], {x, -Infinity, Infinity}] + p[0] *)

The following also works, directly addressing the distribution issue.

simp1[h_] := Distribute[Integrate[Expand[h p[x]], {x, -Infinity, Infinity}]]
bbgodfrey
  • 61,439
  • 17
  • 89
  • 156
0

I'm not quite sure if this helps but this might be an approach to solve your problem:

Simp[x0_][f_] := Integrate[f[x]*DiracDelta[x - x0], {x, -\[Infinity], \[Infinity]}]

I just used f[x]*DiracDelta[x - x0] instead of f[x]*(1+DiracDelta[x - x0]), so it is easier to see if the calculations are correct.

So at any point you can define a function, e.g.

g[x_] := x + 1;

and call the Simp-Function to get the desiered result:

Simp[2][g]

3

Does this help? For more information about this topic check out this question.

mathetronaut
  • 124
  • 7