# Series function not differentiable at a point

Consider the function

$\displaystyle f(x) = \sum_{n=1}^\infty 3^{-n/2} \cos (3^n x)$

How to show that it is not differentiable at x=0?

It is absolutely convergent but the derivative of partial sum is not, so I know it does not make sense to just differentiate and put x=0 in, but what should I be looking at instead for non-differentiability?
(edited 2 months ago)
Original post by LeTroll
Consider the function

$\displaystyle f(x) = \sum_{n=1}^\infty 3^{-n/2} \cos (3^n x)$

How to show that it is not differentiable at x=0?

It is absolutely convergent but the derivative of partial sum is not, so I know it does not make sense to just differentiate and put x=0 in, but what should I be looking at instead for non-differentiability?

What happens as x->0+ and x->0-?
Original post by LeTroll
Consider the function

$\displaystyle f(x) = \sum_{n=1}^\infty 3^{-n/2} \cos (3^n x)$

How to show that it is not differentiable at x=0?

It is absolutely convergent but the derivative of partial sum is not, so I know it does not make sense to just differentiate and put x=0 in, but what should I be looking at instead for non-differentiability?

you have written the function twice.... the first version looks better :
Original post by mqb2766
What happens as x->0+ and x->0-?

Cosine is a smooth even function so the behaviour of f should be the same from either side? We get f(0) which is convergent
(edited 2 months ago)
Original post by LeTroll
Cosine is a smooth even function so the behaviour of f should be the same from either side? We get f(0) which is convergent

For the derivative? So its -sin() with coeffs 3^(n/2) so ...
Original post by the bear
you have written the function twice.... the first version looks better :

Oh not sure why that happened haha, latex seems ok

(edited 2 months ago)
Original post by LeTroll
Consider the function

$\displaystyle f(x) = \sum_{n=1}^\infty 3^{-n/2} \cos (3^n x)$

How to show that it is not differentiable at x=0?

It is absolutely convergent but the derivative of partial sum is not, so I know it does not make sense to just differentiate and put x=0 in, but what should I be looking at instead for non-differentiability?

I don't think this is easy. The obvious example of something similar is the proof that the Weierstrass function is nowhere differentiable, which runs a couple of pages.

In this case, I think you can look at something like $x_k = \pi/3^k$ and show the limit $\dfrac{f(x_k)-f(0)}{x_k}$ doesn't exist, but I think it will be fiddly.

It may be worth explicitly summing the series, but you might be able to manage without. [Edit: you can't easily sum the series - I was thinking of how you'd sum if it was cos(3n x). I think you basically want to refer to a proof of the Weierstrass function's non-differentiability - your function is basically the same.]
(edited 2 months ago)
Original post by mqb2766
For the derivative? So its -sin() with coeffs 3^(n/2) so ...

I might be wrong, but I think you have to actually use the definition of the derivative at x=0 here; just because differentiating term by term gives something that doesn't converge as x->0 doesn't necessarily mean the derivative doesn't exist.

C.f. f(x) = x^2 sin(1/x), which is differentiable at x=0 but f'(x) doesn't converge to a limit as x -> 0.
(edited 2 months ago)
Original post by DFranklin
I might be wrong, but I think you have to actually use the definition of the derivative at x=0 here; just because differentiating term by term gives something that doesn't converge as x->0 doesn't necessarily mean the derivative doesn't exist.

C.f. f(x) = x^2 sin(1/x), which is differentiable at x=0 but f'(x) doesn't converge to a limit as x -> 0.

The 3^(n/2) coeffs mean that its rough everywhere, so asking about x=0 isnt that special for this question as you say, though I guess it makes it a bit more precise. I was just imagining that you pick a sequence for x positive (so the peaks of sin(3^n x) and argue it -> inf, then you must get the converse for x negative?
(edited 2 months ago)
Original post by mqb2766
The 3^(n/2) coeffs mean that its rough everywhere, so asking about x=0 isnt that special for this question as you say, though I guess it makes it a bit more precise. I was just imagining that you pick a sequence for x positive (so the peaks of sin(3^n x) and argue it -> inf, then you must get the converse for x negative?

It seemed you were saying "take the derivative, show it behaves badly as x->0", which doesnt work - the limit not existing doesn't mean the derivative at x=0 doesn't exist.

Taking a sequence that behaves badly when you look at (f(x)-f(0))/x seems the obvious step and I think it's even obvious what a likely candidate is, but the nitty-gritty of showing it doesn't converge looks painful.

Edit: also the function's even so you only need to look at the limit from one side, really.
(edited 2 months ago)
Moved to a computer instead of trying to answer on my phone.

Actually, I think the x = 0 case is not too bad. The key advantage is that each cos(3^n x) term is 1 at x =0. So for x=/=0, if we're arguing that f(x) is close to f(0), we can always replace terms with 1, and know we're not making it worse. So take $x_k = \pi / 3^k$; split the sum into $\sum_0^{k-1} 3^{-n/2} \cos(3^n x) + \sum_k^\infty 3^{-n/2} \cos(3^n x)$, then for the first part just replace cos(3^n x) by 1, and explicltly sum the 2nd part and it should be easy to show (f(x_k)-f(0))/x_k is unbounded.

Edit: it would be nastier for the x=/=0 case because you could possibly have the difference caused by the "2nd part" of the sum cancelling with the diffference caused by the 1st part. But when x = 0 you know all the differences have to be in the same direction (i.e. whatever h is, cos(3^n h) is always <=1).
(edited 2 months ago)
Original post by DFranklin
Moved to a computer instead of trying to answer on my phone.

Actually, I think the x = 0 case is not too bad. The key advantage is that each cos(3^n x) term is 1 at x =0. So for x=/=0, if we're arguing that f(x) is close to f(0), we can always replace terms with 1, and know we're not making it worse. So take $x_k = \pi / 3^k$; split the sum into $\sum_0^{k-1} 3^{-n/2} \cos(3^n x) + \sum_k^\infty 3^{-n/2} \cos(3^n x)$, then for the first part just replace cos(3^n x) by 1, and explicltly sum the 2nd part and it should be easy to show (f(x_k)-f(0))/x_k is unbounded.

Edit: it would be nastier for the x=/=0 case because you could possibly have the difference caused by the "2nd part" of the sum cancelling with the diffference caused by the 1st part. But when x = 0 you know all the differences have to be in the same direction (i.e. whatever h is, cos(3^n h) is always <=1).

I see, so converting from $x\to 0$ to observing specific points $x_k = \dfrac{\pi}{3^k}$ as $k \to \infty$ should help here.

Let me check if I got your reasoning right;

$\displaystyle \lim_{x \to 0} \dfrac{f(x) - f(0)}{x} = \lim_{k \to \infty} \dfrac{f(x_k) - f(0)}{x_k}$

$\displaystyle = \lim_{k \to \infty} \dfrac{ \sum_{n=1}^{k-1} 3^{-n/2} \cos(3^{n-k} \pi) + \sum_{n=k}^{\infty} 3^{-n/2} \underbrace{\cos(3^{n-k} \pi)}_{=-1} - \dfrac{1}{3^{1/2} - 1}}{x_k}$

$\displaystyle = \lim_{k \to \infty} \dfrac{ \sum_{n=1}^{k-1} 3^{-n/2} \cos(3^{n-k} \pi) - \dfrac{3^{-k/2 + 1/2}}{3^{1/2}-1} - \dfrac{1}{3^{1/2} - 1}}{x_k}$

I don't understand why we are replacing $\cos(3^{n-k} \pi)$ by 1 in the first sum next? Surely this is only a good approximation for $n \ll k$ but when $n\approx k$ we have $\cos(\pi/3^2) \approx 0.94$ or even $\cos(\pi/3) \approx 0.5$.

Carrying on past some algebra with geometric series, and replacing these cos terms with 1, gets me

$\displaystyle = \lim_{k \to \infty} \dfrac{ - 3^{k/2} (3^{1/2} + 1)}{\pi (3^{1/2} - 1)}$

and this does not converge.
(edited 2 months ago)
Original post by LeTroll
I see, so converting from $x\to 0$ to observing specific points $x_k = \dfrac{\pi}{3^k}$ as $k \to \infty$ should help here.

Let me check if I got your reasoning right;

$\displaystyle \lim_{x \to 0} \dfrac{f(x) - f(0)}{x} = \lim_{k \to \infty} \dfrac{f(x_k) - f(0)}{x_k}$

$\displaystyle = \lim_{k \to \infty} \dfrac{ \sum_{n=1}^{k-1} 3^{-n/2} \cos(3^{n-k} \pi) + \sum_{n=k}^{\infty} 3^{-n/2} \underbrace{\cos(3^{n-k} \pi)}_{=-1} - \dfrac{1}{3^{1/2} - 1}}{x_k}$

$\displaystyle = \lim_{k \to \infty} \dfrac{ \sum_{n=1}^{k-1} 3^{-n/2} \cos(3^{n-k} \pi) - \dfrac{3^{-k/2 + 1/2}}{3^{1/2}-1} - \dfrac{1}{3^{1/2} - 1}}{x_k}$

I don't understand why we are replacing $\cos(3^{n-k} \pi)$ by 1 in the first sum next? Surely this is only a good approximation for $n \ll k$ but when $n\approx k$ we have $\cos(\pi/3^2) \approx 0.94$ or even $\cos(\pi/3) \approx 0.5$.

You want to show f(x) is "significantly smaller" than f(0), but f(x) isn't easy to evaluate so we're estimating - that is, we're choosing e(x) where e(x) >= f(x) but e(x) is easier to.compare to f(0). If e(x) is significantly smaller than f(0) and f(x)<=e(x) then we're good, even if e(x) is actually a pretty poor approximation to f(x).

In fact, thinking about it, I'm pretty sure you only really need to actually use one real value of cos(3^n x) and just replace ALL the other values with 1 (just keeping the term with n=k) works, I think.
As far as your working, yes, that's enough to show that the limit doesn't exist, so f isn't differentiable. You've somewhat made heavy weather of it though, the point is that replacing cos(3^n x) by 1 for the first k terms means those terms cancel with the first k terms when x = 0. And in fact, if you look at subsequent terms you'll find that they perfectly "anti-cancel" (i.e. for n >= k, cos(3^n \pi/3^k) = - cos(0)).

As I said in the post above, you could actually argue along the lines of:

Define x_k = pi/3^k and e_k to be the series $\sum_{n=0}^\infty 3^{-n/2} a_n$, where a_n = 1 unless n=k, where it = -1. (i.e. we look at the series for f(0) and f(x_k) and choose terms from f(0) except the term for n = k).

Then clearly f(x_k) <= e_k = f(0) - 2(3^{-k/2}), and so $\dfrac{f(0) - f(x_k)}{x_k} > \frac{2}{\pi} 3^{k/2}$ and so is unbounded as k->inf.
(edited 2 months ago)