# Integrate $\displaystyle \int \sin(\sqrt{at})dt$

Integrate $\displaystyle \int \sin(\sqrt{at})dt$

Here is what I tried.

Let $u=\sqrt{at}$, then $\displaystyle\ du=\frac{a}{2\sqrt{at}}dt=\frac{a}{2u}dt\implies \frac{2udu}{a}=dt.$ So by subsitution,

$$\displaystyle \int \sin(\sqrt{at})dt=\int\sin(u)\left(\frac{2udu}{a}\right)=\frac{2}{a}\int u \sin(u)du.$$

Again substituting, $v=u\implies dv=du, dw=\sin(u)du\implies w=-\cos(u)$. So

\displaystyle\begin{align} \frac{2}{a}\int\ u\sin(u)du &= -u\cos(u)+\int\cos(u)du\\ &=-u\cos(u)+\sin(u)+C\\ &=-\sqrt{at}\cos(\sqrt{at})+\sin(\sqrt{at})+C\\ \int u\sin(u)du&=\frac{a}{2}\left(-\sqrt{at}\cos(\sqrt{at})+\sin(\sqrt{at})\right).\\ \end{align}

But the answer is $\displaystyle\frac{2}{a}\left(-\sqrt{at}\cos(\sqrt{at})+\sin(\sqrt{at})\right)$. Where did I go wrong here?

• The second "substitution" is actually an application of integration by parts. – Travis Jun 30 '15 at 5:51

Your mistake is when you write \displaystyle\begin{align} \frac{2}{a}\int\ u\sin(u)du &= -u\cos(u)+\int\cos(u)du\\ &=-u\cos(u)+\sin(u)+C\\ &=-\sqrt{at}\cos(\sqrt{at})+\sin(\sqrt{at})+C\\ \int u\sin(u)du&=\frac{a}{2}\left(-\sqrt{at}\cos(\sqrt{at})+\sin(\sqrt{at})\right).\\ \end{align} It is rather \displaystyle\begin{align} \frac{2}{a}\int\ u\sin(u)du &= \color{red}{\frac{2}{a}}\left(-u\cos(u)+\int\cos(u)du\right)\\ &=\color{red}{\frac{2}{a}}\left(-u\cos(u)+\sin(u)+C\right)\\ &=\color{red}{\frac{2}{a}}\left(-\sqrt{at}\cos(\sqrt{at})+\sin(\sqrt{at})+C\right) \end{align} giving at the end the right answer.
Note that $$\int u\sin u \, du = -u\cos u + \int \cos u \, du$$This would imply that $$\frac2a\int u\sin u \, du = \frac2a(-u\cos u + \int \cos u \, du)$$
Use $\sqrt{at}=x$, then $$I(a)=\frac{2}{a}\int x\sin(x) \,dx$$
Now use integration by parts to bring it home, $u=x, v'=\sin(x)$ $$I(a)=\frac{2}{a}\left(-x\cos(x)+\int \cos(x) \,dx\right)\\ .........$$