# Problem with solution Simplify 6 Integrals with the Delta Function

Calculate the following integrals containing a **delta function** \(\delta(x)\):

**Integral 1**Formula anchor $$ \begin{align} \int^5_1 \left( 2x^2 - x + 1 \right) \, \delta(x-3) \, \text{d}x \end{align} $$**Integral 2**Formula anchor $$ \begin{align} \int^{3}_0 x^3 \, \delta(x+2) \, \text{d}x \end{align} $$**Integral 3**Formula anchor $$ \begin{align} \int^4_0 \cos(x) \, \delta(x-\pi) \, \text{d}x \end{align} $$**Integral 4**Formula anchor $$ \begin{align} \int \ln(x+3) \, \delta(x+1) \, \text{d}x \end{align} $$**Integral 5**Formula anchor $$ \begin{align} \int^2_{-3} \left( 6x + 2 \right) \, \delta(3x) \, \text{d}x \end{align} $$**Integral 6**Formula anchor $$ \begin{align} \int^b_{-\infty} 3 \, \delta(x-a) \, \text{d}x \end{align} $$

## Solution tips

- First, check that the delta function is within the integration limits.
- If the delta function lies within the integration limits, then evaluate \( f(x) \) at the position \(p\) of the delta function:
`$$ \int f(x) \, \delta(\cdot) \, \text{d}x ~=~ f(p) $$`

## Solution for (a)

We want to calculate the following integral:`$$ \int^5_1 \left( 2x^2 - x + 1 \right) \, \delta(x-3) \, \text{d}x $$`Here \(f(x) = 2x^2 - x + 1 \). And the position of the delta function is at \(x=3\).

First, we ask ourselves if the position of \(\delta(x-3)\) lies in the integration interval [1, 5]. It does. Therefore, the integral is not necessarily zero and we must evaluate the function \(f(x)\) at the position \(x=3\) where the delta function is found:`\begin{align}
\int^5_1 \left( 2x^2 - x + 1 \right) \, \delta(x-3) \, \text{d}x ~&=~ 2\cdot 3^2 - 3 + 1 \\
~&=~ 16
\end{align}`

## Solution for (b)

We want to calculate the following integral:`$$ \int^{3}_0 x^3 \, \delta(x+2) \, \text{d}x $$`Here \(f(x) = x^3 \). And the delta function is shifted to the negative and is at \(x=-2\).

First, we ask ourselves if the position of \(\delta(x+2)\) lies in the integration interval [0, 3]. It does not. The integral is zero:`\begin{align}
\int^{3}_0 x^3 \, \delta(x+2) \, \text{d}x ~=~ 0
\end{align}`

## Solution for (c)

We want to calculate the following integral:`$$ \int^4_0 \cos(x) \, \delta(x-\pi) \, \text{d}x $$`Here \(f(x) = \cos(x) \). And the position of the delta function is at \(x=\pi\).

First, we ask ourselves if the position of \(\delta(x-\pi)\) lies in the integration interval [0, 4]. It does. Therefore, the integral is not necessarily zero and we must evaluate the function \(f(x)\) at the position \(x=\pi\) where the delta function is found:`\begin{align}
\int^4_0 \cos(x) \, \delta(x-\pi) \, \text{d}x ~&=~ \cos(\pi) \\
~&=~ -1
\end{align}`

## Solution for (d)

We want to calculate the following integral:`$$ \int \ln(x+3) \, \delta(x+1) \, \text{d}x $$`Here \(f(x) = \ln(x+3) \). And the position of the delta function is at \(x=-1\).

First, we ask ourselves if the position of \(\delta(x+1)\) lies in the integration interval \([-\infty, \infty]\). It does. Therefore, the integral is not necessarily zero and we must evaluate the function \(f(x)\) at the position \(x=-1\) where the delta function can be found:`\begin{align}
\int \ln(x+3) \, \delta(x+1) \, \text{d}x ~&=~ \ln(-1 + 3) \\
~&=~ 0.693...
\end{align}`

## Solution for (e)

We want to calculate the following integral:`$$ \int^2_{-3} \left( 6x + 2 \right) \, \delta(3x) \, \text{d}x $$`Here \(f(x) = \left( 6x + 2 \right) \). And the position of the delta function is at \(x=0\). The scaling factor is \( |k| = 3 \).

First we question whether the position of \(\delta(3x)\) lies in the integration interval \([-3, 2]\). It does. Therefore, the integral is not necessarily zero and we need to evaluate the function \(f(x)\) at the position \(x=0\) and multiply it by the factor \(1/|k|\):`\begin{align}
\int^2_{-3} \left( 6x + 2 \right) \, \delta(3x) \, \text{d}x ~&=~ \frac{1}{3}\, \left( 6\cdot 0 + 2 \right) \\
~&=~ \frac{2}{3}
\end{align}`

## Solution for (f)

We want to calculate the following integral:`$$ \int^b_{-\infty} 3 \, \delta(x-a) \, \text{d}x $$`Here \(f(x) = 3 \) is a constant function. And the position of the delta function is at \(x=a\).

First we question whether the position of \(\delta(x-a)\) is in the integration interval \([-\infty, b]\). This depends on whether \(a\) is greater or smaller than \(b\).

- If \(a\) is GREATER than \(b\), then the delta function is outside the integration limits and the integral is zero in this case.
- If \(a\) is SMALLER than \(b\), then the delta function is within the integration limits and the integral is not necessarily zero in this case. Here we have to evaluate the function \(f(x)\) at the point \(x=a\):
`$$ f(a) = 3 $$`

The overall result is thus:`$$ \int^b_{-\infty} 3 \, \delta(x-a) \, \text{d}x \begin{cases} 3, &\mbox{} a < b \\
0, &\mbox{} a > b \end{cases} $$`