0
$\begingroup$

I am trying to simplify an expression with multiple Diracdelta functions in both numerator and denominator. For example,

expr = (x1 DiracDelta[ω0 + ω]+x2 DiracDelta[ω0 + ω])/
        (x3 DiracDelta[ω0 + ω] - x4 DiracDelta[ω0 + ω]) // FullSimplify

However, DiracDelta[ω0 + ω] does not cancel out during the simplification. I have already read answers to this, this, and this questions, and I understand that this is due to the definition of DiracDelta[ω0 + ω].

This is my approach:

expr /.{DiracDelta[ω0 + ω]->X}// FullSimplify

enter image description here

It works, however, not very convenient for complicated expressions with multiple DiracDelta at different values.

Is there any better approach to cancel out same DiracDelta functions both denominator and numerator?

$\endgroup$
7
  • $\begingroup$ There are problems with multiplication of distributions (see the Problem of multiplication section in en.wikipedia.org/wiki/Distribution_(mathematics) ). Division is multiplication by inverse distribution. $\endgroup$
    – user64494
    Jan 10 '20 at 14:20
  • $\begingroup$ Got it. But here, I just want to use Mathematica to analyse an electrical circuit and I want similar terms to be cancelled out. $\endgroup$
    – Pojj
    Jan 10 '20 at 14:26
  • $\begingroup$ It is impossible to simplify an indeterminate expression. Here is a simpler example FullSimplify[1/Gamma[n - 1]/Gamma[n], Assumptions -> n \ [Element] Integers] . The expression in your question is indeterminate because the supports of the numerator and denominator are the same. Hope I am clear. $\endgroup$
    – user64494
    Jan 10 '20 at 16:12
  • $\begingroup$ Here is a similar command to yours FullSimplify[(2*0 - 0)/(5*0 - 3*0)] which is answered Indeterminate. $\endgroup$
    – user64494
    Jan 11 '20 at 11:33
  • 1
    $\begingroup$ Use //Factor instead of //FullSimplify $\endgroup$
    – Bill Watts
    Feb 7 '20 at 8:20
1
$\begingroup$

Answer instead of comment.

Use //Factor instead of //FullSimplify

$\endgroup$
2
  • $\begingroup$ All that is built on the sand because the expression under simplification is indeterminate. You demonstrate rather a weakness of Mathematica than its capacities. $\endgroup$
    – user64494
    Feb 7 '20 at 11:10
  • $\begingroup$ The Factor command is so powerful: even Factor[(3*"0" - "0")/(2*"0" - "0")] performs 2. $\endgroup$
    – user64494
    Feb 7 '20 at 13:51
1
$\begingroup$

Try this:

expr = (x1 DiracDelta[ω0 + ω] + x2 DiracDelta[ω0 + ω])/(x3 DiracDelta[ω0 + \
ω] - x4 DiracDelta[ω0 + ω]) // Cancel

(* (x1 + x2)/(x3 - x4)  *)

Have fun!

$\endgroup$
5
  • $\begingroup$ All that is built on the sand because the expression under simplification is indeterminate. You demonstrate rather a weakness of Mathematica than its capacities. $\endgroup$
    – user64494
    Feb 7 '20 at 11:09
  • $\begingroup$ @user64494 No. One should understand delta-function as a limit of a bell-shaped function. In that case one makes simplification and passes to the limit. $\endgroup$ Feb 7 '20 at 11:55
  • $\begingroup$ This is the limit in the weak topology (see encyclopediaofmath.org/index.php/Generalized_function for info). Mathematica does not deal with such limits. $\endgroup$
    – user64494
    Feb 7 '20 at 12:48
  • $\begingroup$ @AlexeiBoulbitch, Thanks, this also works! I accepted the other answer because he first put it as a comment. $\endgroup$
    – Pojj
    Feb 7 '20 at 12:58
  • $\begingroup$ The Cancel command is so powerful: even Cancel[(3*"0" - "0")/(2*"0" - "0")] performs 2. $\endgroup$
    – user64494
    Feb 7 '20 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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