# Revision history [back]

### Integration of diracdelta

Hello,

When I tried to integrate the following

(dirac_delta(x)).integrate(x,-pi,pi)


I get 1 (as expected)

But when I integrate

(dirac_delta(cos(x))).integrate(x,-pi,pi)


I get integrate(dirac_delta(cos(x)), x, -pi, pi) back. I would expect to get 2 since there are two points which are zero between the upper and lower bounds of the integral. So by any means of approaching these points with limit during the integration, the integral of dirac_delta should have returned 1 for each point which adds up to 2

If I try the same with Mathematica,

Integrate[DiracDelta[x], {x, -Pi, Pi}]


I get 1 and when I try

Integrate[DiracDelta[Cos[x]], {x, -Pi, Pi}]


I get 2 as I would expect.

What is the reason of this behaviour of Sage?

### Integration of diracdelta

Hello,

When I tried to integrate the following

(dirac_delta(x)).integrate(x,-pi,pi)


I get 1 (as expected)

But when I integrate

(dirac_delta(cos(x))).integrate(x,-pi,pi)


I get integrate(dirac_delta(cos(x)), x, -pi, pi) back. I would expect to get 2 since there are two points which are zero between the upper and lower bounds of the integral. So by any means of approaching these points with limit during the integration, the integral of dirac_delta should have returned 1 for each point which adds up to 2

If I try the same with Mathematica,

Integrate[DiracDelta[x], {x, -Pi, Pi}]


I get 1 and when I try

Integrate[DiracDelta[Cos[x]], {x, -Pi, Pi}]


I get 2 as I would expect.

What is the reason of this behaviour of Sage?

Hello,

When I tried to integrate the following

(dirac_delta(x)).integrate(x,-pi,pi)


I get 1 (as expected)

But when I integrate

(dirac_delta(cos(x))).integrate(x,-pi,pi)


I get integrate(dirac_delta(cos(x)), x, -pi, pi) back. I would expect to get 2 since there are two points which are zero between the upper and lower bounds of the integral. So by any means of approaching these points with limit during the integration, the integral of dirac_delta should have returned 1 for each point which adds up to 2

If I try the same with Mathematica,

Integrate[DiracDelta[x], {x, -Pi, Pi}]


I get 1 and when I try

Integrate[DiracDelta[Cos[x]], {x, -Pi, Pi}]


I get 2 as I would expect.

What is the reason of this behaviour of Sage?