3
$\begingroup$

I am trying to simplify the following integral

Integrate[ Integrate[K[x, z] u[z], {z, -Infinity, +Infinity}] K[x, y]
+ DiracDelta[x - y] u[x], {x, -Infinity, +Infinity}]

unfortunately Mathematica is not able to simplify it into

Integrate[ Integrate[K[x, z] u[z], {z, -Infinity, +Infinity}] K[x, y],
{x, -Infinity, +Infinity}]+ u[y]

However,

Integrate[DiracDelta[x - y] u[x], {x, -Infinity, +Infinity}]

produces the correct result, namely

u[y]

I have attempted various approaches such as

Integrate[ Integrate[K[x, z] u[z], {z, -Infinity, +Infinity}] K[x, y]
+ DiracDelta[x - y] u[x], {x, -Infinity, +Infinity}]//Simplify

or

Assuming[Element[y, Reals], FullSimplify@Integrate[ Integrate[K[x, z] u[z], 
{z, -Infinity, +Infinity}] K[x, y]
+ DiracDelta[x - y] u[x], {x, -Infinity, +Infinity}]

]

but I never got the desired result.

Any suggestions?

Thanks!

$\endgroup$
3
  • $\begingroup$ What version of Mathematica are you using? DiracDelta has some known bugs in certain versions of Mathematica. $\endgroup$ Commented Apr 20, 2016 at 21:04
  • $\begingroup$ On further thought, this probably isn't an issue with one of those bugs. Effectively, you want Mathematica to simplify that $\int [ f(x) + g(x) \delta(x - x_0)]\, dx$ to $\int f(x) \, dx + g(x_0)$, even if it can't evaluate the integral of $f(x)$. My guess is that it'll be tricky to cajole Mathematica into doing this without using explicit patterns and replacement rules, and I'm not an expert on those. $\endgroup$ Commented Apr 20, 2016 at 21:14
  • $\begingroup$ Thanks Michael. I am using version 10.4. $\endgroup$ Commented Apr 20, 2016 at 21:18

1 Answer 1

4
$\begingroup$

You can define a custom transformation function:

sepint[expr_] := expr /. Integrate[Plus[a_, b_], c_] :> Plus[Integrate[a, c], Integrate[b, c]]

Then apply it to the expression. The ComplexityFunction can be used to eliminate the DiracDelta in the expression.

Simplify[Integrate[
  Integrate[K[x, z] u[z], {z, -Infinity, +Infinity}] K[x, y] + 
   DiracDelta[x - y] u[x], {x, -Infinity, +Infinity}], 
 TransformationFunctions -> {sepint}, 
 ComplexityFunction -> (Count[#, DiracDelta[_], Infinity] &), 
 Assumptions -> {y ∈ Reals}]]

(*
Integrate[Integrate[K[x, z]*u[z], {z, -Infinity, Infinity}]*K[x, y], {x, -Infinity, Infinity}] + u[y]
*)
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.