Is this function $y=-\ln\left(1+\frac{\sin x -\cos x}{2}\right)$ convex? Is this function convex for $x\in[0,\frac{\pi}{4}]$?
$$y=-\ln\left(1+\frac{\sin x -\cos x}{2}\right)$$
without use the derivative.
 A: Disclaimer: it is quite a long exercise in trigonometry to avoid the use of derivatives to prove the convexity.
Since the function is continuous, you only need the midpoint-convexity in order to prove the convexity. If we take $[x,y]\subset[0,\pi/4]$, we need to prove:
$$-2\log\left(1+\frac{1}{\sqrt{2}}\sin\left(\frac{x+y}{2}-\frac{\pi}{4}\right)\right)\leq -\log\left(1+\frac{1}{\sqrt{2}}\sin\left(x-\frac{\pi}{4}\right)\right)-\log\left(1+\frac{1}{\sqrt{2}}\sin\left(y-\frac{\pi}{4}\right)\right)$$
that equivalent to:
$$\left(1+\frac{1}{\sqrt{2}}\sin\left(\frac{x+y}{2}-\frac{\pi}{4}\right)\right)^2 \geq \left(1+\frac{1}{\sqrt{2}}\sin\left(x-\frac{\pi}{4}\right)\right)\cdot\left(1+\frac{1}{\sqrt{2}}\sin\left(y-\frac{\pi}{4}\right)\right)$$
or to:
$$\left(1-\frac{1}{\sqrt{2}}\sin\left(\frac{z+w}{2}\right)\right)^2 \geq \left(1-\frac{1}{\sqrt{2}}\sin z\right)\cdot\left(1-\frac{1}{\sqrt{2}}\sin w\right)$$
for $[z=\pi/4-y,w=\pi/4-x]\subset[0,\pi/4]$. If we continue expanding we get:
$$-\frac{2}{\sqrt{2}}\sin\left(\frac{z+w}{2}\right)+\frac{1}{2}\sin^2\left(\frac{z+w}{2}\right) \geq -\frac{2}{\sqrt{2}}\frac{\sin z+\sin w}{2}+\frac{1}{2}\sin w \sin z$$
or:
$$\sqrt{2}\sin\left(\frac{z+w}{2}\right)\left(1-\cos\left(\frac{z-w}{2}\right)\right) \leq \frac{1}{2}\left(\frac{1-\cos(z+w)}{2}-\sin w \sin z\right),$$
$$2\sqrt{2}\sin\left(\frac{z+w}{2}\right)\left(1-\cos\left(\frac{z-w}{2}\right)\right) \leq \sin^2\frac{z-w}{2},$$
$$\sqrt{2}\sin\left(\frac{w+z}{2}\right) \leq \cos^2\frac{w-z}{4},$$
but if $w-z=u\in[0,\pi/4]$, then $\frac{w+z}{2}\leq \frac{\pi}{4}-\frac{u}{2}$, hence the LHS is $\leq \sqrt{2}\sin(\pi/4-u/2)$, so we just need to prove that for any $u\in[0,\pi/4]$ we have:
$$ \sqrt{2}\sin\left(\frac{\pi}{4}-\frac{u}{2}\right)\leq \cos^2\left(\frac{u}{2}\right),$$
or:
$$ \cos\frac{u}{2}-\sin\frac{u}{2}\leq \cos^2\left(\frac{u}{2}\right),$$
$$ \sin(u/2) \geq \cos(u/2)-\cos^2(u/2),$$
$$ \cot(u/4) \geq \cos(u/2), $$
That is trivial since over $[0,\pi/4]$ the LHS is greater than $\cot\frac{\pi}{16}>1$ while the RHS is obviously $\leq 1$.
A: 
Look at the picture, do you think it is convex or concave?
