DiracDelta function example from Wolfram documentation

  • Context: Mathematica 
  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Example Function
Click For Summary

Discussion Overview

The discussion revolves around an issue encountered while using the DiracDelta function in Wolfram's documentation, specifically regarding an integration example. Participants explore the problem of receiving an error message when attempting to run the integration in Wolfram Cloud.

Discussion Character

  • Technical explanation

Main Points Raised

  • One participant shares an example from Wolfram documentation involving the DiracDelta function and reports an error message related to invalid integration variable or limits.
  • Another participant inquires whether the integration variable 'x' had been previously set to a specific value in the script, suggesting this might be the source of the issue.
  • A later reply confirms that 'x' had indeed been set to 3 earlier in the script, indicating a potential cause for the error.
  • Another suggestion is made to clear the variable 'x' or to use a different variable for the integration to resolve the issue.
  • The original poster expresses gratitude and confirms that the suggested solutions worked.

Areas of Agreement / Disagreement

Participants generally agree on the cause of the error being related to the variable 'x' being previously defined, and the proposed solutions appear to resolve the issue without further disagreement.

Swamp Thing
Insights Author
Messages
1,048
Reaction score
799
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
O... M... G...

Yes, I have, actually :oops:
 
Try clearing x or use another integration variable.
 
Thanks, it works now.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K