Strange Integral Results: Is Something Wrong?

  • Context: Mathematica 
  • Thread starter Thread starter JBD
  • Start date Start date
  • Tags Tags
    Integral Strange
Click For Summary
SUMMARY

The forum discussion centers on the unexpected results from integrating a complex mathematical expression using Mathematica's NIntegrate function. The user observed that the integral consistently evaluates to zero regardless of the parameters w, h, L, P, S, and k, except when specific test values are applied. A key conclusion drawn from the discussion is that while the indefinite integral vanishes over the entire domain, the definite integral yields a non-zero value when evaluated over narrow and symmetric limits near the origin.

PREREQUISITES
  • Understanding of integral calculus, particularly definite and indefinite integrals.
  • Familiarity with Mathematica and its NIntegrate function.
  • Knowledge of mathematical parameters and their implications in integration.
  • Ability to interpret graphical representations of integrals.
NEXT STEPS
  • Explore the properties of definite vs. indefinite integrals in calculus.
  • Learn advanced techniques for using NIntegrate in Mathematica.
  • Investigate the impact of parameter values on integral results in mathematical modeling.
  • Study graphical analysis of integrals to better understand behavior near critical points.
USEFUL FOR

Mathematicians, students of calculus, and anyone utilizing Mathematica for numerical integration who seeks to understand the nuances of integral evaluation and parameter influence.

JBD
Messages
15
Reaction score
1
As shown in the image below, I tried to integrate a large integral. However, the result is strange. According to the result, the integral is always zero whatever the values of w, h, L, P, S and k. However, when I try to put some "test values", the result is not zero.

test values: P=1,w=1,h=0.1,L=1,S=0,k=0.2

This is not consistent with ouput 1. So what's wrong with my first input?

Codes:
Integrate[P/((Sqrt[y^2 + L^2 + z^2]) ((S - y)^2 + P^2 + z^2))Cos[k (Sqrt[y^2 + L^2 + z^2] +
Sqrt[(S - y)^2 + P^2 + z^2])], {y, -w/2, w/2}, {z, -h, h}]
NIntegrate[1/((Sqrt[y^2 + 1^2 + z^2]) ((0 - y)^2 + 1^2 + z^2))Cos[0.2 (Sqrt[y^2 + 1^2 + z^2] +
Sqrt[(0 - y)^2 + 1^2 + z^2])], {y, -0.5, 0.5}, {z, -0.1, 0.1}]
NIntegrate[Cos[0.4 Sqrt[1 + y^2 + z^2]]/(1 + y^2 + z^2)^(3/2), {y, -0.5, 0.5}, {z, -0.1, 0.1}]
Problem.JPG
 

Attachments

  • Problem.JPG
    Problem.JPG
    20.8 KB · Views: 476
Physics news on Phys.org
In the first integral, you probably have defined the values of k, S, P, w, L, and h earlier in your session. What were those values?
 
phyzguy said:
In the first integral, you probably have defined the values of k, S, P, w, L, and h earlier in your session. What were those values?
Thank you for commenting.
Someone already explained to me why the integral is zero. He showed me lots of graphs and it can be seen that the indefinite integral vanishes over the entire domain. However, near the origin, when the limits of integration are narrow and symmetric, the definite integral will be positive and not vanish.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K