Why do I get two different values for an integral?

  • I
  • Thread starter Mr Davis 97
  • Start date
  • Tags
    Integral
In summary, the use of different methods of integration can lead to slightly different values for the same integral due to limitations, assumptions, and numerical approximations. The correct value can only be determined through the fundamental theorem of calculus, and rounding errors can also contribute to discrepancies. The significance of the difference in values depends on the specific problem, and to minimize this difference, it is important to carefully select the method of integration and use more sophisticated techniques or increase the number of intervals.
  • #1
Mr Davis 97
1,462
44
Suppose ##t \ge 0##. Let ##\displaystyle I(t) = \int_{-\infty}^{\infty}\frac{x \sin (tx)}{x^2+1}~\text{dx}##. Call this form 1.

Note that we can also write the integral as
$$
\begin{align*}
I(t) &= \int_{-\infty}^{\infty}\frac{x \sin (tx)}{x^2+1}~\text{dx} \\
&= \int_{-\infty}^{\infty}\frac{(x^2+1-1) \sin (tx)}{x(x^2+1)}~\text{dx} \\
&= \int_{-\infty}^{\infty}\frac{\sin (tx)}{x}~\text{dx} - \int_{-\infty}^{\infty}\frac{\sin (tx)}{x(x^2+1)}~\text{dx} \\
&= \pi - \int_{-\infty}^{\infty}\frac{\sin (tx)}{x(x^2+1)}~\text{dx} \\
\end{align*}
$$
Call this form 2.

Now, in form 1, it seems that ##I(0) = 0##, while in form 2 it seems that ##I(0) = \pi##. Why am I getting two different values, and what am I doing wrong?
 
Physics news on Phys.org
  • #2
Mr Davis 97 said:
Suppose ##t \ge 0##. Let ##\displaystyle I(t) = \int_{-\infty}^{\infty}\frac{x \sin (tx)}{x^2+1}~\text{dx}##. Call this form 1.

Note that we can also write the integral as
$$
\begin{align*}
I(t) &= \int_{-\infty}^{\infty}\frac{x \sin (tx)}{x^2+1}~\text{dx} \\
&= \int_{-\infty}^{\infty}\frac{(x^2+1-1) \sin (tx)}{x(x^2+1)}~\text{dx} \\
&= \int_{-\infty}^{\infty}\frac{\sin (tx)}{x}~\text{dx} - \int_{-\infty}^{\infty}\frac{\sin (tx)}{x(x^2+1)}~\text{dx} \\
&= \pi - \int_{-\infty}^{\infty}\frac{\sin (tx)}{x(x^2+1)}~\text{dx} \\
\end{align*}
$$
Call this form 2.

Now, in form 1, it seems that ##I(0) = 0##, while in form 2 it seems that ##I(0) = \pi##. Why am I getting two different values, and what am I doing wrong?

The culprit is the integral ##\int_{-\infty}^{+\infty} \dfrac{sin(tx)}{x} dx##. Call that integral ##F(t)##. If ##t > 0##, then you can perform a variable change ##x \rightarrow tx## to transform the integral into: ##\int_{-\infty}^{+\infty} \dfrac{sin(x)}{x} dx = \pi##. If ##t < 0##, then since ##sin(tx) = - sin(-tx)##, it should be clear that ##F(t) = -\pi##. When ##t=0##, ##F(t) = 0##.
 
  • #3
Your initial integral is well-defined, but then you extended it by ##\frac{x}{x}## and integrated over the now singularity at ##x=0##.
 
  • Like
Likes Fred Wright
  • #4
I suggest that you extend the integral to the complex plane and use the residue theorem. I get:$$ I(t)= i\pi sinh(t) $$
I don't see how to solve this integral w/o complex analysis.
 
  • #5
Mr Davis 97 said:
Suppose ##t \ge 0##. Let ##\displaystyle I(t) = \int_{-\infty}^{\infty}\frac{x \sin (tx)}{x^2+1}~\text{dx}##. Call this form 1.

Note that we can also write the integral as
$$
\begin{align*}
I(t) &= \int_{-\infty}^{\infty}\frac{x \sin (tx)}{x^2+1}~\text{dx} \\
&= \int_{-\infty}^{\infty}\frac{(x^2+1-1) \sin (tx)}{x(x^2+1)}~\text{dx} \\
&= \int_{-\infty}^{\infty}\frac{\sin (tx)}{x}~\text{dx} - \int_{-\infty}^{\infty}\frac{\sin (tx)}{x(x^2+1)}~\text{dx} \\
&= \pi - \int_{-\infty}^{\infty}\frac{\sin (tx)}{x(x^2+1)}~\text{dx} \\
\end{align*}
$$
Call this form 2.

Now, in form 1, it seems that ##I(0) = 0##, while in form 2 it seems that ##I(0) = \pi##. Why am I getting two different values, and what am I doing wrong?
Why is ##I(0)=0## in form 1? The integrand is an even function of ##x##.
 
  • #6
mathman said:
Why is ##I(0)=0## in form 1? The integrand is an even function of ##x##.

Because ##sin(tx) = 0## when ##t=0##.
 

Related to Why do I get two different values for an integral?

1. Why do I get two different values for an integral when I use different methods to solve it?

There are different methods for solving integrals, such as the Riemann sum, the trapezoidal rule, and Simpson's rule. Each method has its own level of accuracy and is based on different assumptions. Therefore, it is not uncommon to get slightly different values for an integral when using different methods.

2. Can rounding errors cause two different values for an integral?

Yes, rounding errors can occur when using numerical methods to solve integrals, especially when dealing with large or small numbers. These errors can accumulate and result in slightly different values for the integral.

3. Is it possible to get two different values for an integral if the function is not continuous?

Yes, if the function is not continuous, it can result in different values for the integral. This is because the methods used to solve integrals rely on the continuity of the function. If the function has discontinuities, the methods may not accurately approximate the integral.

4. Why do I get two different values for an integral when I change the limits of integration?

The value of an integral is dependent on the limits of integration. Changing the limits will result in a different area under the curve and therefore, a different value for the integral.

5. Can human error lead to two different values for an integral?

Yes, human error can occur when manually solving an integral, such as making a mistake in the calculation or using the wrong method. This can result in two different values for the integral. It is important to double-check calculations and use the appropriate method for the integral to minimize human error.

Similar threads

Replies
19
Views
3K
Replies
1
Views
1K
  • Calculus
Replies
3
Views
1K
Replies
3
Views
1K
  • Calculus
Replies
9
Views
1K
  • Calculus
Replies
4
Views
1K
Replies
4
Views
454
Replies
2
Views
1K
Replies
3
Views
715
Back
Top