3
$\begingroup$

I would like to extract the argument from :

DiracDelta[-10 + x + ξ]
$\endgroup$
6
$\begingroup$

You can use Part to access the parts of any normal expression.

DiracDelta[-10 + x + ξ][[1]]
(* -10 + x + ξ *)

In this case you can also use First since you want the first part.

Another common need is to pull out the arguments of a function when that function is buried in a larger expression. For this you can use Cases

Cases[
 {w''[z] + k^2 w[z] == DiracDelta[z], w[0] == 0, w'[0] == 1},
 DiracDelta[arg_] :> arg, Infinity]
(* {z} *)
$\endgroup$
3
$\begingroup$

What about

DiracDelta[-10 + x + \[Xi]] /. DiracDelta -> Identity
(**)

More generally(also works for several arguments)

 Apply[List ,DiracDelta[-10 + x + \[Xi]] ]
$\endgroup$
2
$\begingroup$
DiracDelta[-10 + x + \[Xi]] /. DiracDelta -> " "

or (as @JasonB wrote):

First@DiracDelta[-10 + x + \[Xi]] 
$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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