# second derivative does not exist at specified points

Would any one give me an example or hint how to construct a function whose second derivative does not exist at some specified points say at n number of points. for first derivative I have the modulas function( i.e $|x|$), I need an example for second.

-
For an everywhere discontinuous function, such as $f(x)=1$ if $x$ is rational, $f(x)=0$ otherwise, neither the first nor the second derivative exists anywhere. So such a function will always work. – Chris Eagle Jun 4 '12 at 16:51
@ChrisEagle while he does not explicitly say this, I guess he is searching for a function for which the second derivative does exist with the exception of some finite number of given points. – user20266 Jun 4 '12 at 17:00
@Chris yes exactly – Un Chien Andalou Jun 4 '12 at 17:01

Really $|x|$ is just a convenient shorthand for what's really a piecewise defined function. If you allow piecewise defined functions, then it's rather easy to come up with examples.

$$f(x)=x^2,x>0$$ $$f(x)=-x^2,x<0$$

does the trick quite nicely at $x=0$. To make a function that has no second derivative at finitely/countably(?) many arbitrary points you can simply shift and add multiple functions like these.

-
Good example. Of course your $f$ can also be seen as $f(x)=x|x|$. Its derivative would be $f'(x)=2|x|$, a continuous function everywhere. But while $f''(x)=2\operatorname{sign}(x)$ for $x\ne 0$, as the asker knows, $f''(0)$ does not exist. – Jeppe Stig Nielsen Jan 7 '14 at 15:16

Hint: integrate $|x|$.$\ \\\\\\\\\\\\$

-
so $f(x)=\int_{0}^{x}|t|dt + \int_{0}^{x}|t-1|dt$ is a function whose 2nd derivative does not exist at $0$ and $1$? – Un Chien Andalou Jun 4 '12 at 16:54
I think you can figure that out: what is the derivative of that $f(x)$? (you have to use the fundamental theorem of calculus) – talmid Jun 4 '12 at 16:58

$|x|$ also has a second derivative not defined at the origin. If you want something whose first derivative exists but second doesn't use integration (as suggested by others).

If you want to try something really fun think about going a step further the derivative of the absolute value function is $f(x)=\begin{cases} \phantom{-}1 & \text{if } x>0\\ -1 & \text{if } x<0 \end{cases}$

Integrate $\int f(x) dx$ to get $|x|$

In fact any step function integrated will give you a function that is continuous whose jump discontinuities become places the derivative of the integral is undefined.

For example take $\lfloor x \rfloor$ to be the greatest integer function. Then $f(x)=\int_0^x \lfloor t \rfloor dt$ is continuous everywhere is not differentiable at any integer value.

-
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}