## Problem

I need to compute the following interval $$\begin{equation*}\int_{t_\text{s}}^{t_\text{e}} \cos\left(a+b\tau+c\tau^2\right)\text{ d}\tau\end{equation*}$$ where $$t_{\text{s}},t_{\text{e}},a,b,c$$ are non-negative given parameters. I have some difficulties in the case where $$b$$ and $$c$$ are both non zero. In order to fix the ideas, I will show my solutions in the simpler case where $$c=0$$ and $$a,b>0$$.

### simpler case $$c=0$$ and $$a,b>0$$

The integral above reduce to $$\begin{equation*}\int_{t_\text{s}}^{t_\text{e}} \cos\left(a+b\tau\right)\text{ d}\tau\end{equation*}$$ the idea is to integrate with respect $$\begin{equation*}h(\tau)\triangleq a+b\tau\end{equation*}$$ so it turns out \begin{equation*}\begin{aligned}\int_{h(t_\text{s})}^{h(t_\text{e})} \cos\left(h\right)\left(\frac{\text{ d}h}{b}\right)&=\frac{\sin(h)}{b}\bigg|_{h(t_{\text{s}})}^{h(t_\text{e})}\\ &=\frac{\sin(a+bt_{\text{e}})-\sin(a+bt_{\text{s}})}{b} \end{aligned}\end{equation*}

### general case $$a,b,c>0$$

Now seems that the substitution trick does not work. Indeed, now the full integral $$\begin{equation*}\int_{t_\text{s}}^{t_\text{e}} \cos\left(a+b\tau+c\tau^2\right)\text{ d}\tau\end{equation*}$$ requires the change of variable $$\begin{equation*}h(\tau)\triangleq a+b\tau+c\tau^2\end{equation*}$$ which causes the following problem: the differential $$\text{d}\tau$$ is a function of $$\tau$$ itself because $$\begin{equation*} \text{d}h=(b+2c\tau)\text{d}\tau \rightarrow \text{d}\tau=\frac{\text{d}h}{b+2c\tau}\end{equation*}$$ and so, due to the presence of $$\tau$$ in the above expressions, the substitution does not work.

## Question

At a first glance the general integral that I'm trying to compute does not seem so problematic: the integrand is just the composition of a cosine with a polynomial function, i.e. two very regular functions. I don't believe that there is no solution, so I'm asking if someone can give me some ideas to carry out the calculation.

• You can complete the square to get an expression of the form $cos(Kx^2 + L)$. Such an expression integrated is a "Fresnel integral" mathworld.wolfram.com/FresnelIntegrals.html . You may also be interested in Gaussian integrals, to which this is strongly related. Jan 19, 2022 at 10:34
• Thank you so much, your idea works like a charm. Actually that's the first time that I hear about the Fresnel integral. Now, due to your suggestion, I'm wondering if I can express the result in terms of the more familiar $\text{erf}(\cdot)$ function. Jan 19, 2022 at 15:43

As said by @egglog, you can reduce to Fresnel integrals. WLOG, $$c>0$$ and you can change the variable using
$$a+b\tau+c\tau^2=\upsilon^2+\tfrac\Delta{4c}$$ where $$\upsilon=\sqrt c\left(\tau+\tfrac b{2c}\right)$$. This gives $$\int_{t_s}^{t_e}\cos(a+b\tau+c\tau^2)\,d\tau=\frac1{\sqrt c}\int_{u_s}^{u_e}\left(\cos\left(\tfrac\Delta{4c}\right)\cos(\upsilon^2)-\sin\left(\tfrac\Delta{4c}\right)\sin(\upsilon^2)\right)\,d\upsilon\\ =\frac{\cos\left(\frac\Delta{4c}\right)}{\sqrt c}\left(C\left(a'+bt_e+ct_e^2\right)-C\left(a'+bt_s+ct_s^2\right)\right) \\-\frac{\sin\left(\frac\Delta{4c}\right)}{\sqrt c}\left(S\left(a'+bt_e+ct_e^2\right)-S\left(a'+bt_s+ct_s^2\right)\right)$$
where $$a':=a-\frac\Delta{4c}$$.