# Laplace Transform of tan(t)

1. Aug 11, 2011

### FeDeX_LaTeX

EDIT: I think all errors are fixed now. It's 1:30 AM and I'm going to bed now.

Hello,

I am trying to find the Laplace transform of tan(t), but I don't know if I'm getting anywhere. I can't find it in Laplace transform tables and WolframAlpha gives me an answer in terms of complex numbers, hyperbolic trig functions and the digamma function and I don't understand how they get that.

Here is my working and how I got to where I am currently;

$$\mathcal{L}\{{\tan}t\} = \int_{0}^{\infty}e^{-st}{\tan}tdt$$

Because by integrating tan(t) I had the feeling I would end up with increasingly complicated integrations if I integrated by parts multiple times so I wrote it as the integral of three functions;

$$\int_{0}^{\infty}e^{-st}{\sin}t\frac{1}{{\cos}t}dt$$

Because this is the product of 3 functions I derived what the formula for integration by parts using the product rule like this;

$$\frac{d}{dt}uvw = w(udv + vdu) + uvdw$$

Integrating both sides;

$$uvw = \int uwdv - \int vwdu - \int uvdw$$

Re-arranging;

$$\int uvdw = uvw - \int uwdv - \int vwdu$$

where u, v, w are all functions of t.

For integration by parts I let;

$u = \frac{1}{{\cos}t}$ so $du = \frac{{\sin}t}{{\cos}^{2}t}dt$

$v = {\sin}t$ so $dv = {\cos}tdt$

$dw = e^{-st}dt$ so $w = -\frac{1}{s}e^{-st}$

Using our formula for integration by parts we get;

$$-\frac{1}{s}e^{-st}{\sin}t\frac{1}{{\cos}t} - \int_{0}^{\infty}-\frac{1}{s}e^{-st}\frac{1}{{\cos}t}{{\cos}t}dt - \int_{0}^{\infty}-\frac{1}{s}e^{-st}\frac{{\sin}^{2}t}{{\cos}^{2}t}dt$$

Simplifying;

$$-\frac{1}{s}e^{-st}{\tan}t + \frac{1}{s}\mathcal{L}\{1\} + \frac{1}{s}\mathcal{L}\{{\tan}^{2}t\}$$

Laplace transform of 1 is just $\frac{1}{s}$, so;

$$-\frac{1}{s}e^{-st}{\tan}t + \frac{1}{s^{2}} + \frac{1}{s}\int_{0}^{\infty}e^{-st}{\tan}^{2}tdt$$

Doing integration by parts again, I rewrite the integral as $\int_{0}^{\infty}e^{-st}{\sin}^{2}t\frac{1}{{\cos}^{2}t}dt$.

I let;

$u_{2} = \frac{1}{{\cos}^{2}t}$ so $du_{2} = \frac{{\sin}2t}{{\cos}^{4}t}dt$

$v_{2} = {\sin}^{2}t$ so $dv_{2} = {\sin}2tdt$

$dw_{2} = e^{-st}dt$ so $w_{2} = -\frac{1}{s}e^{-st}$

Using our formula for integration by parts again we get;

$$\mathcal{L}\{{\tan}t\} = -\frac{1}{s}e^{-st}{\tan}t + \frac{1}{s^{2}} + \frac{1}{s}\bigg(-\frac{1}{s}e^{-st}\frac{1}{{\cos}^{2}t}{\sin}^{2}t - \int_{0}^{\infty}-\frac{1}{s}e^{-st}\frac{1}{{\cos}^{2}t}{\sin}2tdt - \int_{0}^{\infty}-\frac{1}{s}e^{-st}\frac{{\sin}2t}{{\cos}^{4}t}{\sin}^{2}tdt\bigg)$$

Simplifying;

$$\mathcal{L}\{{\tan}t\} = -\frac{1}{s}e^{-st}{\tan}t + \frac{1}{s^{2}} + \frac{1}{s}\bigg(-\frac{1}{s}e^{-st}{\tan}^{2}t + \frac{2}{s}\mathcal{L}\{{\tan}t\} + \frac{2}{s}\mathcal{L}\{{\tan}^{3}t\}\bigg)$$

So as you can see I end up with a tan(t) cubed term to take the Laplace transform of which looks worrying as it looks like no matter how many Laplace transforms I take I'll still end up with some power of tan(t) to take the Laplace transform of, which gets me nowhere. I was wondering if anyone could help me provide a better method of doing this as I think I'll be doing integration by parts forever.

Thanks.

Last edited: Aug 12, 2011
2. Aug 11, 2011

### Termotanque

Does the first integral converge? If not, the symbol means nothing.

3. Aug 11, 2011

### FeDeX_LaTeX

Hello,

Now that I think about it I don't think it does converge... looks like I wasted my time then.

4. Aug 12, 2011

### FeDeX_LaTeX

This is what Wolfram Alpha says (credit to Au101 from mathsisfunforum.com for typing this up):

$$\mathcal{L}_{t}[\tan(t)](s) = -\frac{i}{s} - \frac{1}{2}i\pi \operatorname{csch}\left(\frac{\pi s}{2}\right) - \frac{1}{2}\psi\left( \frac{1}{2} + \frac{is}{4}\right) + \frac{\psi\left(\dfrac{is}{4}\right) }{2}$$
$$\text{For: } \mathcal{L}_{t}[\tan(t)](s) = \mathcal{P}\int_{0}^{ \infty} e^{-st}\tan(t) \; dt \text{ and } \Re(s) > 0$$
$$\text{Where:}$$
$$\mathcal{L}_{t}[f(t)](s) \text{ is the Laplace transform of } f(t) \text{ with complex argument } s$$
$$\operatorname{csch}(x) \text{ is the hyperbolic cosecant function}$$
$$\psi^{(n)}(x) \text{ is the } n^{\text{th}} \text{ derivative of the digamma function}$$
$$\mathcal{P}\int f \; dx \text{ is the Cauchy principal value integral}$$
$$\Re(z) \text{ is the real part of } z$$

I don't understand how they got that though?

5. Aug 12, 2011

### alexfloo

Let me start by saying I've never seen a Cauchy principal value integral. All my comments are from a few minutes of research.

The Cauchy principal value integral is essentially a method of assigning mathematically useful values to divergent improper integrals. Wikipedia, for instance, defines the Laplace transform in terms of a Lebesgue integral. The key point really is that the Lebesgue and the Cauchy principle value are *not* the same, so in the traditional sense, what Wolfram|Alpha computed is not actually the Laplace transform of the tangent, which doesn't exist, because the Lebesgue integral diverges. However, (it is likely that - again, I've never seen this integral before) the function Wolfram computed has many of the useful properties of the Laplace Transform, and is therefore a reasonable substitute.

6. Aug 12, 2011

### FeDeX_LaTeX

Hello,

Thanks for the info. So you are saying that the output Wolfram|Alpha gives is computing something entirely different?

I have been trying to make sense of the Wikipedia article of the Cauchy principal value. Would I be correct in saying that one can change a divergent improper integral to a convergent improper integral by applying a Cauchy principal value to it? I can't find out how this works, nor how W|A gives the output that it does. I'm currently trying to integrate using the definition of tan(t) in terms of e and i, and on another forum someone did it using a series expansion of tan(t) and then integrating.

So does there exist no Laplace transform for any non-piecewise continuous function?

7. Sep 25, 2013

### kstahmer

tangent Laplace transform

Please read the Penn State Erie MATH 251 Laplace Transforms PDF (page 133).

8. Sep 25, 2013

### jackmell

No, not at all. Don't you know the road to the right one is often strewn with wrong ones and sometimes the only way to get to the right one is to wade through those wrong ones.

Principal-valued integrals are very important and solve a wide variety of problems. Do you know Riemann relied on these types of integrals to construct his expression for counting primes? If he can do it, how come we can't?

What would you do if your teacher just wrote on the board

$$\mathcal{L} \tan(x)$$

and said, "make is so" and dismissed class? No you can't drop-add. Too late. How can I make converge, the integral:

$$\int_0^{\infty} e^{-st} \tan(t)dt$$

I'm not proud. How about just

$$\int_0^{\infty} e^{-2t} \tan(t)dt$$

What does the integrand look like? Well it has asymptotes at $\pi/2, 3\pi/2,5\pi/2,\cdots$.

Still not proud. How about just then:

$$\int_0^{\pi} e^{-2t}\tan(t)dt$$

and since I need this class, I want to make it so. Well, in that case I can take the principal-valued integral:

$$\text{PV}\int_0^{\pi} e^{-2t}\tan(t)dt$$

and that integral converges in the principal-valued sense. Which you can look up if you want. Same dif for

$$\text{PV}\int_\pi^{2\pi} e^{-2t}\tan(t)dt$$

and in fact:

$$\lim_{N\to\infty} \sum_{n=0}^N \left\{\text{PV}\int_{n\pi}^{(n+1)\pi} e^{-2t}\tan(t)dt\right\}$$

converges as well so that I can say:

$$\text{PV}\int_0^{\infty}e^{-2t}\tan(t)dt$$

converges. In fact, it converges very quickly. We can compute say the first five terms and then compare it to the digamma expression Mathematica returns:

Code (Text):

In[19]:=
myf[s_] := -I/s - (1/2)*Pi*I*Csch[Pi*(s/2)] - (1/2)*PolyGamma[1/2 + I*(s/4)] +
(1/2)*PolyGamma[I*(s/4)]
N[myf[2]]
mysum = Sum[NIntegrate[Exp[-2*t]*Tan[t], {t, k*Pi, k*Pi + Pi/2, (k + 1)*Pi},
Method -> "PrincipalValue"], {k, 0, 5}]

Out[20]= 0.269611 - 1.11022*10^-16 I

Out[21]= 0.269611

We can then write:

\begin{align*} \mathcal{L}_{t}[\tan(t)](s)\biggr|_{s=2} &= \lim_{N\to\infty} \sum_{n=0}^N \left\{\text{PV}\int_{n\pi}^{(n+1)\pi} e^{-2t}\tan(t)dt\right\}\\ &=\left( -\frac{i}{s} - \frac{1}{2}i\pi \operatorname{csch}\left(\frac{\pi s}{2}\right) - \frac{1}{2}\psi\left( \frac{1}{2} + \frac{is}{4}\right) + \frac{\psi\left(\dfrac{is}{4}\right) }{2}\right)_{s=2} \end{align*}

Could someone figure out how that limit equals that for us please and write it up nicely in Latex?

What about other values of s then?

Last edited: Sep 25, 2013
9. Sep 27, 2013

### jackmell

Let $T(s)=-i/s-\pi/2 \text{csch}(\pi s/2)-1/2\psi(1/2+is/2)+1/2 \psi(is/4)$, and consider

$$\mathop\oint\limits_{\text{box}} e^{st} T(s)ds$$

where the right side of the box is pinned on the Bromwich contour of what would be the inverse transform integral. Let the horizontal legs pass between consecutive poles at $\pm 2ni$ and $\pm 2(n+1)i$ for $n$ a positive number. The integral over the Bromwich leg can be expressed as a sum of residues and the two integrals over the horizontal legs:

$$\frac{1}{2\pi i} \mathop\int\limits_{\sigma-iT}^{\sigma+iT} e^{st} T(s)ds=2\sum_{k=1}^{K} (-1)^{k+1} \sin(2kt)-\frac{1}{\pi} \text{Im}\left\{\int_{\sigma}^{-\infty} e^{st}T(s)ds\right\}$$

Let $\sigma=1$ and create a table of points $(t,\tan(t))$ equally spaced in the interval $(0,2\pi)$ and avoiding $\pi/2$. Compute the above expression for each value of $t$ in this list for $K$ in the range of 10 to 800.

Take the mean value of the list for each value of $t$ and superimpose it over the tan function. The first plot shows the actual points choosen over the tan function. The second plot shows the results of this mean-value analysis.

The results look interesting. However, I'm not suggesting the transform and inverse transform integrals for the tangent function are valid. I'm simply showing that the Bromwich integral data, if averaged, does appear to be tending to the tangent function.

#### Attached Files:

• ###### inverse transform analysis.jpg
File size:
13.3 KB
Views:
464
Last edited by a moderator: Sep 28, 2013
10. Sep 29, 2013

### jackmell

Now consider the initial value problem

$$y''+y'=\tan(t),\quad y(0)=0, \quad y'(0)=1$$

Let's apply the mean-value transform described above to this problem. We can first solve the equation numerically in the interval $(0,3/2)$, the solution of which is shown in the first plot below.

Then attempting to take this transform of both sides, we obtain

$$Y(s)=\frac{T(s)+1}{s(s+1)}$$

where $T(s)$ is the tangent transform described above and $Y(s)$, the transform of the solution. In a likewise manner of what was done in the previous post, we consider the Bromwich integral:

$$y(t)=\frac{1}{2\pi i}\mathop\int_{\sigma-i\infty}^{\sigma+i\infty} e^{st}\frac{T(s)+1}{s^2+s} ds$$

and doing the same analysis as above, we can estimate this integral as a sum of residues and integrals over a (finite) square contour pinned at the Bromwich leg:

$$y(t)=B+\sum_{k=1}^K (-1)^{k+1} 2\text{Im}\left(\frac{1}{(2ki)^2+2ki}\right) (\cos(2kt)+2k\sin(2kt))-\frac{1}{\pi}\text{Im}\left\{\int_{\sigma}^{-\infty} e^{st} \frac{T(s)+1}{s^2+s}ds\right\}$$

where $B$ is the sum of the residues at the points zero and minus one and the other sum, the enclosed residues at the points $-2ki$ and $2ki$.

Evaluating this expression for a set of points in the interval $[0,3/2]$ and taking the mean over 160 terms, we then superimpose the results along the numerical solution of the IVP, and obtain the second plot below.

The results are again encouraging. Based on the results of this study, I propose considering the mean-value integrals described above, potential valid definitions for $\mathcal{L}\{\tan(t)\}$ and $\mathcal{L}^{-1}\{T(s)\}$.

#### Attached Files:

• ###### meanvalue solution.jpg
File size:
12 KB
Views:
419
Last edited: Sep 29, 2013
11. Sep 29, 2013

### JJacquelin

Hello !

Since the Laplace transform of tanh(x) is wellknown, it seems an easy way to start with (Attachment)
The Principal Value is for the real part only. It would be difficult to analytically express the imaginary part. In fact we don't need to do it : we know that PV is real, so the imaginary part is = 0.
This is consistent with the complete formula reported by Jackmell at the end of the post Sep25-13 01:48 PM , if we take the real part only.

#### Attached Files:

• ###### CauchyPV.JPG
File size:
22 KB
Views:
1,248
Last edited: Sep 29, 2013
12. Sep 30, 2013

### jackmell

Hi JJacquelin,

Got some problems with your analysis above:

For example, suppose we let a=2 and s=2 and consider:

$$\int_0^\infty e^{-2t} \tanh(2t)dt$$

Numerically, that's 0.2854.

$$\frac{1}{2 a} \psi_0\left(\frac{a s+2}{4}\right)-\frac{1}{2 a} \psi_0\left(\frac{a s}{4}\right)-\frac{1}{a^2 s}$$

I get 0.0284.

However, when I integrate the expression in Mathematica, I get

$$\int_0^{\infty} e^{-st} \tanh(at)dt=\frac{-2 a-s \text{PolyGamma}\left[0,\frac{s}{4 a}\right]+s \text{PolyGamma}\left[0,\frac{1}{4} \left(2+\frac{s}{a}\right)\right]}{2 a s}$$

and when I substitute a=2 and s=2 into that expression, I obtain the correct answer. However, Mathematics says that antiderivative is valid only when Re(a)>0 and Re(s)>0. So if that is the case, we cannot make the substitution a=i and then conclude the resulting expression is the integral for the tangent function.

13. Oct 1, 2013

### JJacquelin

Hi Jackmell !

you are right. Thank you for pointing out the mistake.
In fact, I made a wrong copy of the formula because I had to change the symbols in order to made them correspond with the notations used here. The stupid mistake was to confuse s/a with s*a.
The corrected page is attached below.
By chance, the final result isn't changed : since a=i, confusing s/i with s*i only change the sign of i*s. And changing i into -i in the digamma functions change the imaginary part, but not the real part.
Mathematica is right in saying that the antiderivative is valid only when Re(a)>0 and Re(s)>0. This is true if we consider the whole complex expression because the imaginary part would not be correct. But, if we consider the real part only, the restrinction is only Re(s)>0.

#### Attached Files:

• ###### PVIntegral.JPG
File size:
33.6 KB
Views:
986
14. Oct 1, 2013

### jackmell

Hi,

I don't understand why you're saying the principal-valued integral of the tangent transform is real. I understand it would be real for real s and I checked your formula for that, but we can't restrict s to the reals since we intend to integrate the transform over the complex plane to invert it and for example:

$$\text{PV}\int_0^{\infty}e^{-(1+i)t} \tan(t)dt\approx. 0.5-0.351i$$

15. Oct 1, 2013

### JJacquelin

Hi,
all I said, since the begining of the discussion, is for s real and s>0.
The starting point of the topic was about Laplace transform. So, I suppose that the question raised by FeDeX_LaTeX is with s real.
Of course, if s is not real, the simplified method that I proposed is not valid.

16. Oct 1, 2013

### jackmell

Ok, I didn't understand that. I'm clear now. Thanks.

I'm still working on:

$$\lim_{N\to\infty} \sum_{n=0}^N \left\{\text{PV}\int_{n\pi}^{(n+1)\pi} e^{-st}\tan(t)dt\right\}=\left( -\frac{i}{s} - \frac{1}{2}i\pi \operatorname{csch}\left(\frac{\pi s}{2}\right) - \frac{1}{2}\psi\left( \frac{1}{2} + \frac{is}{4}\right) + \frac{\psi\left(\dfrac{is}{4}\right) }{2}\right)$$

I'm pretty confident I can figure it out by the end of the year though. This whole principal-valued transform idea is a really beautiful problem for me. :)