# Existence of antiderivative for a piecewise function

How to determine the value of an $$a \in \mathbb{R}$$ parameter so that there exists an antiderivative for the $$f:\mathbb{R} \Rightarrow \mathbb{R}$$, $$f(x)=\begin{cases}\sin\frac{e^x}{x},& x\neq 0\\ a, &x=0\end{cases}$$ piecewise function.

My first idea would be to transform $$\sin\frac{e^x}{x}$$ into the sum or difference or maybe even the product of two elementary functions and from there I only need to check that the two functions are continous in the $$x=0$$ point. Now this sounds great in theory but can I transform $$\sin\frac{e^x}{x}$$ in such a way?

• I'm guessing that the term "antiderivative" is used in this sense: We want a function $F$ so that $F'(x)=f(x)$ everywhere, including $x=0$). From this it does not follow that $f$ is continuous. For example, $f_1(x) = \sin(1/x)$ does have such an antiderivative. Commented Dec 11, 2023 at 18:49

The antiderivative of a function doesn't depend on its value at any specific point - the value you assign at $$a$$ won't make a difference.
You can also see that there's no value you can assign at 0 that will make this function continuous. As $$x$$ approaches 0, $$e^x$$ approaches $$1$$ and $$\frac 1x$$ approaches $$\pm \infty$$. In particular, $$\frac {e^x}{x}$$ will approach $$\pm \infty$$ as $$x$$ approaches $$0$$ from the right and left respectively. Then $$\sin(\frac {e^x}{x})$$ will oscillate between $$\pm 1$$, so no limit can exist at 0.