I have the following code:
Clear["Global`*"];
u = 5;
\[Tau] = (1/2)*10^(-3);
c = 10^(-6);
r = 1000;
y = u*Sum[((1 - E^((-t + \[Tau] + 4 n \[Tau])/(c*r))) HeavisideTheta[
t - 4 n \[Tau]] HeavisideTheta[
t - \[Tau] - 4 n \[Tau]]) - ((1 - E^((-t + (3 + 4 n) \[Tau])/(
c*r))) HeavisideTheta[t - 4 n \[Tau]] HeavisideTheta[
t - (3 + 4 n) \[Tau]]), {n, 0, Infinity}];
If I plot (Plot[y,{t,0,15*10^(-3)},GridLines->{{(2*6+3)*\[Tau],(2*6+1)*\[Tau]},{y/.t->(2*6+3)*\[Tau],y/.t->(2*6+1)*\[Tau]}}]
) the solution y
, I get the following picture:
Now, we can see that the maximum and the minimum of the function $y(t)$ is found at the following times: $t=(2\text{k}+3)\tau$ and $t=(2\text{k}+1)\tau$ where $k\in\mathbb{N}$.
Question: I want to find the absolute difference between the maximum and minimum when $t\to\infty$.
My work:
Mathematically speaking, I want to find:
$$\lim_{\text{k}\to\infty}\left|\text{y}\left(\left(2\text{k}+3\right)\tau\right)-\text{y}\left(\left(2\text{k}+1\right)\tau\right)\right|\tag1$$
I know that the answer to the question must be:
$$\frac{5 (e-1)}{1+e}\approx2.31059\tag2$$
Coding this in Mathematica gave me:
In[1]:=FullSimplify[
Limit[Abs[(y /. t -> (2*k + 3)*\[Tau]) - (y /.
t -> (2*k + 1)*\[Tau])], k -> Infinity]]
Out[1]=Interval[{0, 20}]
Which is wrong. What is my mistake?