2

References

I still have problems with this funny integral \begin{equation*}\int_0^t \cos(c+b\tau+a\tau^2)\text{ d}\tau\end{equation*} This post is the continuation of these other 3 posts, where you can find some insights about my problems.


Background

In part 3 you can find the proof of the following facts.

  • Fact 1 \begin{equation*}\begin{aligned} \int_0^t \cos(c+b\tau+a\tau^2)\text{ d}\tau&=\frac{\textrm{C}\left(\sqrt[+]{a}t+\frac{b}{2\sqrt[+]{a}}\right)- \textrm{C}\left(\frac{b}{2\sqrt[+]{a}}\right) }{\sqrt[+]{a}}\cos\left(c-\frac{b^2}{4a}\right)\\ &\qquad\qquad- \frac{\textrm{S}\left(\sqrt[+]{a}t+\frac{b}{2\sqrt[+]{a}}\right)- \textrm{S}\left(\frac{b}{2\sqrt[+]{a}}\right) }{\sqrt[+]{a}}\sin\left(c-\frac{b^2}{4a}\right)\triangleq I_1(t) \end{aligned} \end{equation*} where $C(h)\triangleq \int_0^h \cos(\theta^2)\text{ d}\theta$, $S(h)\triangleq \int_0^h \sin(\theta^2)\text{ d}\theta$ are the unnormalized Fresnel integrals.

  • Fact 2 \begin{equation*}\begin{aligned} \int_0^t \cos(c+b\tau)\text{ d}\tau&= \frac{\sin(bt)}{b}\cos(c)-\frac{1-\cos(bt)}{b}\sin(c) \triangleq I_2(t) \end{aligned} \end{equation*}

  • Fact 3 \begin{equation*}\lim_{a\to 0} I_1(t)=I_2(t)\end{equation*}


Problem

I want to check numerically the limit in fact 3, so I wrote some code and, naturally, my computer went mad when I ask to him to compute \begin{equation*} \cos\left(c-\frac{b^2}{4a}\right) \qquad \sin\left(c-\frac{b^2}{4a}\right) \end{equation*} with $a\to 0$. What I mean is that I cannot see $I_1(t)$ approaching with continuity to $I_2(t)$ as $a$ becomes smaller and smaller. In other words, the solution $I_1(t)$ is numerically unstable and this is my problem because I have to compute $I_1(t)$ also when $a=0$ or is near such singularity.


Question

How can I avoid the computation of $\cos\left(c-\frac{b^2}{4a}\right)$, $\sin\left(c-\frac{b^2}{4a}\right)$? Or at least, how can I write $I_1(t)$ is a form that is numerically robust?


Remark

The two guys $\cos\left(c-\frac{b^2}{4a}\right)$ and $\sin\left(c-\frac{b^2}{4a}\right)$ provide a sort of rotation of a 2-dimensional reference system. I know that a solution to compute rotations numerically consists into employing quaternions or something related (I'm not an expert in such field). In particular, if I'm not wrong, the 2-dimensional counterpart of the quaternions are the complex numbers. Does it make sense try to compute numerically $I_1(t)$ by employing complex numbers?

matteogost
  • 787
  • 4
  • 10

0 Answers0