Derivatives and graphs $f(x) = \sin(x)+ \cos(x) $  for $ 0≤x≤2\pi$
I have to do the following
1) Find the intervals on which $f$ is increasing or decreasing
2) Find the local maximum and minimum values of $f$
3) Find the intervals of concavity and the inflections points
I got until this point when trying to solve problem 1: $\tan(x) = 1$. The next step in the manual says that $x = \pi/4$ or $5\pi/4$. How did they get that $x = \pi/4$ or $5\pi/4$?
 A: We solve for $0\leq x\leq 2\pi$. $\tan x=1$ if and only if $x=\tan^{-1} 1=\frac{\pi}{4}$ or $x=\pi+\tan^{-1} 1=\frac{5\pi}{4}$. ($\frac{\pi}{4}$ is the principal value and the tangent is positive in the first and third quadrants.)
A: (1)  $f$ is increasing or decreasing accordingly as $f'(x)>0$ or $<0$
Now, $f'(x)=\cos x-\sin x=\sqrt2\cos(x+\frac \pi 4)$
$f'(x)>0$ if $\cos(x+\frac \pi 4)>0$ if $ x+\frac \pi 4$ lies in the 1st or 4th quadrant.
As,$0\le x\le 2\pi,$ for $f'(x)>0, 0\le x<\frac \pi 4$ or $\frac{3\pi}2-\frac \pi4<x\le 2\pi$
Similarly for $f'(x)<0$
(2)For the maxima/minima, $f'(x)=0\implies \tan x=1=\tan \frac \pi 4 \implies x=m\pi+\frac \pi 4 $ where $m$ is any integer.
$f''(x)=-(\sin x+\cos x)=-\sqrt2\cos(x-\frac \pi 4)$
So, $f''(m\pi+\frac \pi 4)= -\sqrt2\cos m\pi$ which is $<0$ if $m$ is even$=2r$(say) where $r$ is any integer
So,the local maximum of $f(x)$ is at $x=2r\pi+\frac \pi 4$
As $0\le x\le 2\pi,$ for local maximum of $f(x),x=\frac \pi 4$
$f_{max}=f(\frac \pi 4)=\sqrt 2$
Similarly, for local minimum.
(3) Using this, $f(x)$ is concave up  if $f''(x) > 0$
So, we need $\cos(x-\frac \pi 4)<0$  i.e., $x-\frac \pi 4$ will lie in the 2nd or in the 3rd quadrant.
$\frac \pi2<x-\frac \pi 4< \frac {3\pi}2\implies \frac \pi2+\frac \pi 4<x< \frac {3\pi}2+\frac \pi 4$ as $0\le x\le 2\pi$
Similar for the concave down if $f''(x) < 0$
For the point of inflexion, $f''(x)=0$ or $f''(x)$ does not exist.
Here clearly $f^n(x)$ exists for $n\ge 0$
So we need $f''(x)=0\implies \sin x+\cos x=0\implies \tan x=-1=\tan (-\frac{\pi}4)\implies x=s\pi-\frac{\pi}4$ where $s$ is any integer
As $0\le x\le 2\pi,x=\pi-\frac{\pi}4,2\pi-\frac{\pi}4$ for the point of inflexion.
