MathGroup Archive 2012

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

Search the Archive

Re: Integrating DiracDelta in Mathematica: how to suppress


Look into assumptions. If q2 is in fact real, then you can use the 
following code:

In:	Assuming[Element[q2, Reals], Integrate[DiracDelta[p - q2], {p, -Infinity, Infinity}]]
Out:	1

Alex


On Sun, 7 Oct 2012, Yaj wrote:

> For the integral shown below, how do I get Mathematica to output only the "correct" answer as 1 (for future steps in the notebook) and i.e. have Mathematica NOT OUTPUT the ConditionalExpresssion that q2 is real etc?
>
> In[5]:= Integrate[DiracDelta[p - q2], {p, -Infinity, Infinity}]
>
> Out[5]:= ConditionalExpression[1, q2 \[Element] Reals]
>



  • Prev by Date: Re: Assuming and Integrate
  • Next by Date: Re: Trouble Loading Packages...
  • Previous by thread: Integrating DiracDelta in Mathematica: how to suppress ConditionalExpression
  • Next by thread: Re: Integrating DiracDelta in Mathematica: how to suppress ConditionalExpression