# Baby Rudin Th. 5.8 alternate proof.

I'm currently working through chapter 5 of baby Rudin and came across

Theorem 5.8 Let $f$ be defined on $[a,b]$; if $f$ has a local maximum at a point $x\in(a,b)$, and if $f'(x)$ exists, then $f'(x)=0$.

Now, this seemed like a theorem that shouldn't be too hard to prove myself so I made an attempt before moving on:

Proof: Consider $\delta>0$ such that $d(x,q)<\delta \implies f(q)\leq f(x)$. Suppose $f'$ exists, then $\lim_{t\rightarrow x} \frac{f(t)-f(x)}{t-x}$ exists. Let $d(t,x)<\delta$, then $f(t)-f(x)$ is nonpositive. Suppose that $f(t)-f(x)<0$, then $$\lim_{t\rightarrow x^+} \frac{f(t)-f(x)}{t-x}\neq\lim_{t\rightarrow x^-} \frac{f(t)-f(x)}{t-x},$$ which contradicts the existence of $f'$. Therefore $f'=0$

But I'm not entirely sure that I'm allowed to do everything I do. Specifically, I'm not certain whether the use of unequal right and left limit is allowed in the way I do it here.

• When you assume that $f(t) - f(x) < 0$, are you assuming that for all $t$ near $x$, for at least one $t$, or something else? – user49640 Jun 12 '17 at 10:36
• You find a contradiction and then you conclude that $f'=0$. I reckon you mean $f'(x)=0$. But such conclusion can only be made if the contradiction is based on the hypothese $f'(x)\neq0$. In the proof you do not make that hypothese. – drhab Jun 12 '17 at 10:45
• @user49640 For all, based on the definition of a local maximum. – Mitchell Faas Jun 12 '17 at 11:11
• @MitchellFaas That's not really the negation of what you're trying to prove. In fact, if $f(t) = -t^2$, then it will certainly be the case that $f(t) - f(0)$ is negative for $t \ne 0$. Since you know that $f'(x)$ exists, the negation of what you're trying to prove would be to assume $f'(x) \ne 0$. $f'(x)$ is defined as a certain limit, but a nonzero function can have a zero limit. This is the case when you write down the limit defining $f'(0)$ in the example I gave. – user49640 Jun 12 '17 at 11:13