# Removing jump discontinuity from a tricky function. [duplicate]

I have the function $\cos(x)\lfloor x \rfloor$ which I would like to make continuous without changing the derivative where it exists or the values approaching 0 from the right side. I can do this by subtracting a piecewise constant function from it. My trouble here is that I do not know what that function should be.

I believe it is:

$$\sum^{\lfloor x \rfloor}_{i=0} \cos(x)$$

But I am unsure as to how would I would reduce it further or if it is correct. Help would be appreciated, thank you.

## marked as duplicate by The Great Duck, Community♦Jan 16 '17 at 19:07

This question was marked as an exact duplicate of an existing question.

• What do you mean to "make" it continuous? Why not subtract itself from it? - You may also be interested in $\sin(\pi x)\lfloor x\rfloor$, which is already continuos ... – Hagen von Eitzen Jun 19 '16 at 21:40
• @HagenvonEitzen Maybe I'm misunderstanding what a step function/what the questioner is asking, but I don't think $\cos x\lfloor x\rfloor$ is a step function, so they can't subtract that. They want a step function $f(x)$ such that $\cos x\lfloor x\rfloor-f(x)$ is continuous. The summation they put above indeed makes this function continuous for positive $x$, but they are having trouble simplifying it to show that it is just a step function. – Noble Mushtak Jun 19 '16 at 21:47
• @HagenvonEitzen fixed. I forgot to include the part about the derivative not changing. And no I am not interested in proving it is the step function if it is. Im more interested in reducing it. – The Great Duck Jun 19 '16 at 22:02
• for $x$ not an integer, the derivative of $\cos(x) \lfloor x \rfloor$ is $-\sin(x) \lfloor x \rfloor$, so once the jumps are removed, you get $-\int \lfloor x \rfloor\sin(x)) dx = \ldots$ – reuns Jun 19 '16 at 22:11
• @user1952009 Thanks. Im not sure how that is directly relevant, but thanks. – The Great Duck Jun 19 '16 at 22:21

Your idea ist almost correct, namely to substract the jumps from the function. Obviously, $f:[0,\infty)\to\mathbb R,\ x\mapsto\cos(x)[x]$ has jumps only at $x=x_0\in\mathbb N$, and at each those points we have \begin{align*} \lim_{x\to x_0-}f(x)=\cos(x_0)(x_0-1),\qquad \lim_{x\to x_0+}=\cos(x_0)x_0. \end{align*} Thus, the hight of each jump is $\cos(x_0)$, so \begin{align*} F(x):=\cos(x)[x]-\sum_{k=1}^{[x]}\cos(k) \end{align*} is continuous on $[0,\infty)$.
To make it continuous in all of $\mathbb R$, you can do the same trick for negative values of $x$. Thus, \begin{align*} F(x):=\cos(x)[x]-\sum_{k=1}^{[x]}\cos(k)+\sum_{k=0}^{[-x]}\cos(k) \end{align*} is continuous in $\mathbb R$. Here, a sum $\sum_{k=a}^b...$ is meant to be 0, if $b<a$.
• It's pedantic, but worth noting, that if the domain of $f$ is instead allowed to be $\Bbb R$, there is no "canonical" way to do this construction: you can also subtract an arbitrary constant and the derivative remains the same. You might complain that if you take a totally arbitrary constant, the new function might never agree with the old function. That complaint is reasonable, but for most functions there are still infinitely many constants that are as reasonable as the one produced using the method provided. – Eric Stucky Jun 20 '16 at 0:35