Mathematica Strange Integral Results: Is Something Wrong?

  • Thread starter Thread starter JBD
  • Start date Start date
  • Tags Tags
    Integral Strange
AI Thread Summary
The discussion revolves around a mathematical issue with the integration of a complex function, where the initial result indicates that the integral is always zero regardless of the parameters w, h, L, P, S, and k. However, when specific test values are applied, the output is not zero, leading to confusion. The user provided code snippets for both symbolic and numerical integration, highlighting a discrepancy between expected and actual results. A participant pointed out that the integral is zero across the entire domain, but near the origin, with narrow and symmetric limits, the definite integral yields a positive value. This suggests that the behavior of the integral changes based on the limits of integration, emphasizing the importance of evaluating the integral's properties in different contexts.
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: 456
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
1
Views
2K
Replies
13
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
7
Views
2K
Replies
4
Views
4K
Replies
2
Views
1K
Replies
5
Views
3K
Replies
9
Views
3K
Back
Top