# Confused about developing a Taylor series of a function that implicates an integral

There is a function that makes me confused:

$$f(x)=\int_{\frac{\pi}{2}}^x \frac{\cos(t)}{t-\frac{\pi}{2}}~dt$$

The question wants me to find its Taylor series centered in $a=π/2$ and I don't know how, I tried separating $\cos(t)$ of $\dfrac{1}{t-π/2}$ and make the MacLaurin series of $\cos(t)$, and then multiply the series by $\dfrac{1}{t-\frac{π}{2}} ~dt$ . But at the end, it doesn't end as a Taylor series centered in $π/2$, it's more like a MacLaurin series : I found $$\sum_{n=0}^{\infty} \frac{t^n}{n!\cdot (t-\frac{π}{2})}$$

Please could you help me with this series ?

Thank you a lot !

• It's centered at pi/2, so the first term will be 0. May 22, 2017 at 16:51

Note that

$$\cos t = -\sin\left(t-\frac{\pi}{2} \right) = \sum_{n=0}^\infty \frac{(-1)^{n+1}}{(2n+1)!}\left( t-\frac{\pi}{2}\right)^{2n+1}$$

Then by integration

\begin{align}f(x) &= \int^{x}_{\pi/2}\frac{1}{t-\pi/2} \sum_{n=0}^\infty \frac{(-1)^{n+1}}{(2n+1)!}\left( t-\frac{\pi}{2}\right)^{2n+1}\,dt\\&= \sum_{n=0}^\infty \frac{(-1)^{n+1}}{(2n+1)!}\int^{x}_{\pi/2}\left( t-\frac{\pi}{2}\right)^{2n}\,dt \\&= \sum_{n=0}^\infty \frac{(-1)^{n+1}}{(2n+1)!}\int^{x-\pi/2}_{0}t^{2n}\,dt \\&= \sum_{n=0}^\infty \frac{(-1)^{n+1}}{(2n+1)(2n+1)!}\left(x-\frac{\pi}{2} \right)^{2n+1} \end{align}

• Oh thank you for your help I appreciate it ! It was a question of substitution then !
– Kat
May 22, 2017 at 17:50
• @Kat, yes using the known expansion of sine and integrating term by term. May 22, 2017 at 17:51

I think you are over-thinking this. A taylor series of a function f, by definition is $$f(x) = f(a) + f'(a)(x-a) + \frac{1}{2}f''(a)(x-a)^2 +...$$ Specifically, $f(a) = f(\pi/2)= \int_{\pi/2}^{\pi/2}\frac{\cos t}{t-\pi/2}dt=0$ because both bounds of integration are equal. Next we should use the second fundamental theorem of calculus that says if $f(x) = \int_c^{u(x)}g(t)dt$ then $f'(x) = g(u(x))\cdot u'(x)$. In out case, $$f'(x) = \frac{\cos (x)}{x-\pi/2}$$ If we plug in $\pi/2$ for $x$ we get $0/0$ so we take the limit and use LHopital's rule $$\lim_{x \rightarrow \pi/2}\frac{\cos (x)}{x-\pi/2}= \lim_{x \rightarrow \pi/2} \frac{-\sin(x)}{1}=-1.$$ Let's take a few more derivatives (hopefully a pattern emerges) $$f''(x) = \frac{-\sin(x)(x-\pi/2)-\cos(x)}{(x-\pi/2)^2}$$ Again, plugging in $\pi/2$ gets us $0/0$ so again we take the limit $$\lim_{x\rightarrow \pi/2}\frac{-\sin(x)(x-\pi/2)-\cos(x)}{(x-\pi/2)^2} = \lim_{x \rightarrow \pi/2} \frac{-\cos(x)(x-\pi/2) - \sin(x)+\sin(x)}{2(x-\pi/2)}=0$$ . I still don't see a pattern maybe one will emerge if we take more derivatives, in any case, every coefficient of the sequence is well defined and can be found analytically. So $$f(x)= 0 -1(x-\pi/2)+0 + O((x-\pi/2)^3)$$ I have a lingering suspicion that all the even terms are 0 but I will leave this as an exercise to the reader (translation: I don't feel like doing it). Hope I helped.

• Thank you a lot I am going to try it !
– Kat
May 22, 2017 at 17:49