MHB Numerics on wild oscillating functions

AI Thread Summary
Accurate computation of functions with intense oscillations, such as the integral of sin(x^2), poses challenges due to instability when integrating to infinity. A suggested approach is to split the integral into two parts to manage the infinite limit effectively. One method involves calculating the integral over a finite range and then addressing the improper part using integration by parts to enhance convergence. Additionally, collecting positive and negative contributions separately before summing them may improve accuracy. These strategies aim to achieve better numerical results for oscillating functions.
Theia
Messages
121
Reaction score
1
Hello!

I'd like to ask for a help about how to compute accurately functions which has very intense oscillations. My example is to estimate

$$I = \int_0^{\infty} \sin(x^2) dx= \int_0^{\infty}\frac{\sin(t)}{2\sqrt{t}} dt$$.I tried trapezoid rule over one oscillation at a time, but result is poor. My next though is to collect positive parts and negative parts together and add them later on in the code...

Any comments?

Thank you!
 
Mathematics news on Phys.org
Theia said:
Hello!

I'd like to ask for a help about how to compute accurately functions which has very intense oscillations. My example is to estimate

$$I = \int_0^{\infty} \sin(x^2) dx= \int_0^{\infty}\frac{\sin(t)}{2\sqrt{t}} dt$$.I tried trapezoid rule over one oscillation at a time, but result is poor. My next though is to collect positive parts and negative parts together and add them later on in the code...

Any comments?

Thank you!

I think integrating to infinity is typically unstable, isn't it?
So we should probably split the integral in two parts to eliminate infinity.
That is:
$$I = \int_0^{\infty} \sin(x^2)\,dx = \int_0^{\sqrt{2\pi}} \sin(x^2)\, dx + \int_0^{1/\sqrt{2\pi}} u^{-2}\sin(u^{-2})\, du$$
Perhaps we can integrate the second integral period by period now?
 
Thank you! I computed first

$$\int_0^{2\pi}\frac{\sin t}{2\sqrt{t}}$$,

and then the improper part by using integration by parts to increase $$\sqrt{t}$$ to $$\sqrt{t^3}$$ to obtain faster convergence.
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Back
Top