Find the minimum of $f(x) = x^2+\sin(x)$ I need to find the minimum of $x^2+\sin(x)$ but I can't get an answer. So far I've done this:
The first derivative is $f'(x)=\cos(x) + 2x=0$ 
and the second derivative $f''(x)=-\sin(x) +2$
From the first derivative I can take the magnitude of $\cos(x)$ which is $1$, so I can have $x=-\frac{1}{2}$, but I don't know if this approach is correct
On the other hand, in order to get the minimum from the second derivative i know that $-\sin(x)+2 \geq 0$ so $-\sin(x) \geq -2$, but I don't know how to get the minimum, which is in $-1/2$
Thank you in advance
 A: As Travis commented, the solution of $$g(x)=f'(x)=\cos(x)+2x=0$$ has no closed-form solution and only numerical methods could give an answer. What is interesting is that $g'(x)=f''(x)$ is always positive; so, $g(x)$ is an increasing function.
For finding the root, something as simple as Newton method could be used : starting from a guess $x_0$ of the solution, the method will update it according to $$x_{k+1}=x_k-\frac{g(x_k)}{g'(x_k)}$$ For the case we consider here, the iterative scheme corresponds to $$x_{k+1}=\frac{x_k \sin (x_k)+\cos (x_k)}{\sin (x_k)-2}$$ Looking for a starting point, we can notice that $g(0)=1$ and $g(-\frac{\pi}{2})=-\pi$, so let us make a guess $x_0=-\frac{\pi}{4}$; Newton method then generates the following iterates : $-0.466353$
, $-0.450231$, $-0.450184$ which is the solution for six significant figures.
I suppose that you have in hands what is required and I am sure that you can take from here.
Edit
There is another approach to the solution of the problem. Trying classical values for $x$ ($-\frac{\pi}{2},-\frac{\pi}{3},-\frac{\pi}{4},-\frac{\pi}{6}$), you could notice that $-\frac{\pi}{6}$ is the value which makes $g(x)$ the closest to $0$.
So, we could approximate the function itself by its Taylor series centered at $x=-\frac{\pi}{6}$ and get $$f(x) \approx\frac{1}{36} \left(\pi ^2-18\right)+\left(\frac{\sqrt{3}}{2}-\frac{\pi }{3}\right)
   \left(x+\frac{\pi }{6}\right)+\frac{5}{4} \left(x+\frac{\pi
   }{6}\right)^2+O\left(\left(x+\frac{\pi }{6}\right)^3\right)$$ which is just a quadratic function. The minimum then occurs for $$x=-\frac{1}{30} \left(6 \sqrt{3}+\pi \right)\approx -0.45113$$ and, for this value $$f(x)=-\frac{1}{180} \left(117-12 \sqrt{3} \pi -\pi ^2\right)\approx -0.232409$$ while the rigourous approach locates the minimum at $x\approx -0.450184$ for which the corresponding $f(x) \approx -0.232466$.
A: You have $f''(x) = 2 - \sin x$, so $f''(x) >0 $ everywhere and so $f$ is strictly convex. Since $f(x) \to \infty$ as $|x| \to \infty$, we see that
$f$ has a unique minimiser.
The minimiser satisfies $f'(x) = 0$, that is $\cos x = - 2x$.
Since $f(0) = 0 $, $f(-{ \pi \over 2}) >0$ and $f'(0)  = 1$, we see that the
minimiser occurs in $(-{ \pi \over 2}, 0)$.
We can write the minimiser as the solution to $x = -{1 \over 2} \cos x$, so
we can look for the unique fixed point of $g(x) = -{1 \over 2} \cos x$. That is,
the minimiser is the limit of $x_n$ where $x_0 \in \mathbb{R}$, $x_{n+1} = g(x_n)$. A quick computation shows this to be $\approx -0.4502$.
A: You can use Taylor for solving approximately $\cos(x) +2x=0.$ 
We have that
$$\cos(x)+2x = 1 + 2x -\frac{x^2}{2} + \mathcal{O}(x^4).$$ Since $|x| \leq 1/2$, the quadratic approximation is enough. Hence,
$$1 + 2x -\frac{x^2}{2} =0 \implies x \approx -0.4494.$$
