# Laplace Transform of cos(t)/t

• I
arestes
TL;DR Summary
direct definition of the LT of cos(t)/t diverges. However wolframalpha computes it and gives a result with log and Euler Mascheroni constant
So, I know the direct definition of the Laplace Transform:
$$\mathcal{L}\{f(t) \} = \int_0^\infty e^{-st}f(t)dt$$
So when I plug in:
$$\frac{\cos(t)}{t}$$
I get a divergent integral.
however:https://www.wolframalpha.com/input/?i=+Laplace+transform+cos(t)/(t)
is supposed to be the L.T. What is wolframalpha computing? Am I mistaken in something above?

Gold Member
You may observe that the integral is rewritten as
$$I=\int_s^\infty du \int_0^\infty dt\ e^{-ut}\cos t$$
Try t integration first.

Last edited:
arestes
You may observe that the integral is rewritten as
$$I=\int_s^\infty du \int_0^\infty dt\ e^{-ut}\cos t$$
Try t integration first.
Hi!
I've computed the integral you mention. It still does not converge (t integration results in
$$\frac{u}{1+u^2}$$
and plugging this into the u integral it diverges logarithmically (a direct change of variables will yield evaluating $$\frac{1}{2} Log(1+u^2)$$ between s and infinity).

So, unfortunately, the question still stands: why is Wolframalpha giving me a solid result? (I'm starting to believe wolframalpha does some kind of analytic continuation, something I haven't seen applied to Laplace Transforms, but this is just my guess).

By the way, could you please help me figure out how you transformed that integral? I can't seem to transform the original integral to the double integral you showed me. I'd be grateful if you could refresh those techniques.

anuttarasammyak
Gold Member
Could you tell us how this problem arose? In some contexts, the fact that the integral diverges means that the transform does not exist and there is no more work to be done. Of course WolframAlpha is not using that approach! Instead they are taking the finite part of the divergent integral, or equivalently they are using the theory of distributions (generalized functions) and treating ##\cos t / t## as a pseudofunction.

I get the same expression that WolframAlpha does when I take the finite part. Since the problem singularity is at zero, the basic idea is that you consider
$$F(s) = \lim_{\epsilon \rightarrow \ 0^+} \int_\epsilon^\infty e^{-s t} \frac{\cos t}{t} \, dt$$
Integrating by parts yields
$$F(s) = \lim_{\epsilon \rightarrow \ 0^+} \left[-e^{-s \epsilon} \cos\epsilon \ln\epsilon + s \int_\epsilon^\infty e^{-s t}\, \cos t \, \ln t\,dt + \int_\epsilon^\infty e^{-s t}\, \sin t\, \ln t\, dt\right]$$
The two integrals above converge as ##\epsilon \rightarrow 0^+##, but the first term is divergent. The finite part is then obtained by simply throwing out the divergent term. If we let ##G(s)## denote the finite part of ##F(s)##, then we have,
$$G(s) = s \int_0^\infty e^{-s t}\, \cos t \, \ln t \, dt + \int_0^\infty e^{-s t}\, \sin t\, \ln t \, dt$$
which is nicely behaved by construction. I'm sure there are many ways to tackle this, but as with many integral transform problems going the direct approach isn't always the easiest. The approach I took was to Taylor expand ##\cos t## and ##\sin t## and then integrate term by term, which works because the Taylor series converge for all ##t##. Now we need to find the Laplace transform of terms that look like ##t^k \ln t##, which I computed using a trick that I have seen with similar problems in the past. Start with the definition of the Gamma function
$$\Gamma(z) = \int_0^\infty e^{-t}\, t^{z-1}\, dt.$$
The derivative is then,
$$\begin{eqnarray*} \Gamma^\prime(z) & = & \int_0^\infty e^{-t}\, t^{z-1}\, \ln t \, dt \\ & = & s \int_0^\infty e^{-s u}\, (su)^{z-1}\, \ln(su) \, du \\ & = & \Gamma(z) \ln s + s^z \int_0^\infty e^{-s t}\, t^{z-1}\, \ln t \, dt \end{eqnarray*}$$
Where in the second line I simply did a substitution ##t = su##. The last line gives us the Laplace transforms we need. I then insert this into the series, collect like terms in powers of ##s##, and the answer falls out. Note that you will need properties of ##\Gamma^\prime(z) = \Gamma(z) \psi(z)## where ##\psi(z)## is the digamma function, and the fact that ##\psi(1) = -\gamma##. See the first handful pages of https://dlmf.nist.gov/5 to get all of the relations you need. I needed ##\psi(n+1)-\psi(n) = 1/n##, for example. At the end I had to sum a series, but it is the kind of series that most of us had to be able to identify in basic calculus class since it is directly related to the series for ##\ln(1+x)##.

Hope that helps,

Jason

Last edited:
marcusl, Delta2 and anuttarasammyak
Gold Member
By the way, could you please help me figure out how you transformed that integral? I can't seem to transform the original integral to the double integral you showed me. I'd be grateful if you could refresh those techniques.
I just observe 1/t disappears by du integral way. I am not sure it is a systematic tool.

We are sure that
$$L\{\frac{1-\cos t}{t}\}(s)=\frac{1}{2}log (1+\frac{1}{s^2})$$

Linearity of Laplace transformation and the result of Wolfram you showed suggests that
$$L\{\frac{1}{t}\}(s)=log \ s + \gamma$$
which contradicts what we learned in mathematics that ##L\{\frac{1}{t}\}(s)## does not exist.

Something should be wrong or misunderstood, e.g. defined region of s which is usually s>0.

arestes
Gold Member
Linearity of Laplace transformation and the result of Wolfram you showed suggests that
$$L\{\frac{1}{t}\}(s)=log \ s + \gamma$$
which contradicts what we learned in mathematics that ##L\{\frac{1}{t}\}(s)## does not exist.

Something should be wrong or misunderstood, e.g. defined region of s which is usually s>0.
If you are considering classical analysis of functions, then yes, the Laplace transforms of ##\frac{1}{t}## and ##\frac{\cos t}{t}## do not exist. But if you considering distributions, or generalized functions, then they do exist. There is a rigorous theory of distributions (for which Laurent Schwartz was awarded a Fields Medal), but I am just an engineer so only know the practical side. In my experience it is common for engineers and physicists to be using distribution theory without explicitly stating so - the widespread use of the Dirac delta 'function' is the most common example that I see. That is why I began my previous post by asking the context in which the original question arose.

jason

Delta2 and arestes
arestes
Thanks for the ideas both of you Jason and anuttarasammyak. So this seems to fall into the realm of Principal Values I guess. Not sure if it involves generalized (distribution) functions since there aren't any in the end. I'm gland it doesn't involve analytic continuation. It does bother me that Wolframalpha didn't specify that they were taking the finite part of a divergent integral. Thanks again!

Delta2