DiracDelta function example from Wolfram documentation

  • Context: Mathematica 
  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Example Function
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 2K views
Swamp Thing
Insights Author
Messages
1,065
Reaction score
820
TL;DR
Example of DiracDelta from the Wolfram Language help doesn't seem to work, at least on Wolfram Cloud.
The page on the Wolfram function DiracDelta has this example:
Code:
Integrate[DiracDelta[x] Cos[x], {x, -Infinity, Infinity}]
It's the first example under Examples > Basic Examples. When I run it in Wolfram Cloud, it says "Invalid integration variable or limit(s) ..."
and shows this result:
1577242349659.png


What's going wrong?

Edit: here's a screenshot:
1577242663222.png
 
Physics news on Phys.org
Have you set x to 3 earlier in your script?
 
  • Wow
Likes   Reactions: Swamp Thing
Try clearing x or use another integration variable.