# Function that is not differentiable at a point

I am looking for a continuous function to be used in fourier series graph that have the same value at both $-\pi$ and $\pi$ but has a very poor differentiability at a point.

I have one: $\sqrt{(\pi\vert x\vert) - x^{2}}$ through trial and error and it indeed have poor differentiability at $x=0$. Now I have no issue computing its fourier coefficient for $a_{0}$ and $b_{n}$ but its another story for $a_{n}$. Hence I could not graph it. I have also consulted various books but to no avail.

Hence I would like to know if anyone here have a such function in mind so that I can graph its fourier's partial sums and compare it with its function.

-
If you just want to take a look, you can compute coefficient numerically. Or even ask, say, Mathematic to plot truncated Fourier series for this function - there is such routine. – Ilya Jan 10 '13 at 13:07
@Ilya - Yes I did using Mathematica. When plotting the $a_{n}$, even Mathematica produced an error saying exceed limit, etc and couldn't continue. This equation took about 40 mins to be process by Mathematica on my computer. – Sandra Jan 10 '13 at 13:17
This is the $a_{n}$ computed by Mathematica => $\frac{(\pi BesselJ[1, (\frac{n\pi}{2}] \cos \frac{n \pi}{2}}{n}$. When plotting it as a graph, Mathematica can't continue. – Sandra Jan 10 '13 at 13:21
Why not use $f(x) = |x|$? You can find the corresponding Fourier series here. – Ayman Hourieh Jan 10 '13 at 13:26
@AymanHourieh - Yes I had done this. Thank you. I am looking for one other example. – Sandra Jan 10 '13 at 13:30

If you are looking for something simple and not differentiable at $x=0$, try the following:
$$|x| = \frac{\pi}{2} - \frac{2}{\pi} \sum_{n=1}^{\infty} \frac{1}{(2 n-1)^2} \cos{(2 n-1) x}$$
Plot the partial sums in Mathematica against $|x|$. What happens at $x=0$?
Yes I had plotted $\vert x \vert$ as one of my example. I am looking for another one with the same value at $(-\pi,\pi)$ and had more worst differentiability at a point than $\vert x \vert$. The one I gave in my first post had a very bad differentiability at $x=0$ but too bad even Mathematica can't draw out its partial sums. – Sandra Jan 10 '13 at 13:33
Another one to try might be $|x|^{-1/2}$. Its Fourier transform has interesting properties at least. – Ron Gordon Jan 10 '13 at 13:34
From the graph of this function, I can't explain about the one point I need. I am trying to explain about the convergence and hence differentiability at one point just like $\vert x \vert$. I have even look through Handbooks of Mathematics & Tables and integrals reference books but to no avail. – Sandra Jan 10 '13 at 13:47
Be careful re convergence of Fourier series at a point. Fourier series are designed to converge to a function over an interval according to an $L^2$ metric (i.e., the integral of the square of the error vanishes as the number of terms in the partial sum increases). At a particular point, however, you may never get convergence in the sense you hope. An example is the Fourier series for $\sin{x}/x$, which is known for its Gibb's phenomenon. – Ron Gordon Jan 10 '13 at 13:55