Determine if $f$ has local maximum or minimum in $0$ by using Maclaurin series

48 Views Asked by At

Let $f(x) = \ln(1 + x + x^2/2) - \sin(x)$

Determine if $f$ has a local maximum or minimum in $x=0$.

My approach:
Set $u(x) = x + x^2/2$

I know the Maclaurin series
$\ln(1+x) = x - x^2/2 + x^3/3 + ... + (-1)^{n-1}x^n/n + \mathcal{O}(x^{n+1})$

And because of properties of $u$ it follows that $\ln(1+x+x^2/2) = \ln(1+u(x)) = u(x) + \mathcal{O}(u(x)^2) = x + x^2/2 + \mathcal{O}(x^2)$

And by the maclaurin series for $\sin(x) = x - x^3/3! + x^5/5! -...$ it follows that
$f(x) = x + x^2/2 + \mathcal{O}(x^2) - \sin(x) = x + x^2/2 + \mathcal{O}(x^2) - (x + \mathcal{O}(x^3)) = x^2/2 + \mathcal{O}(x^2) = x^2(1/2 + \mathcal{O}(1))$

So for $x$ near $0$ $f(x) > 0$ and $f(0) = 0$, so $0$ is a local minimum.

The books answer is that it is a local minimum, but it says that $f(x) = x^4/8 + \mathcal{O}(x^5)$ for $x$ close to $0$ which makes me suspect that I've solved the problem in the wrong way. The only way I can think of to arrive at the books answer is by expanding $\ln(1+u(x))$ up to order $4$ but that would become a lot more calculations than I've done in my solution. So I wonder if my solution is correct and if the way to arrive at the books answer is to expand the series for $\ln(1 + u(x))$ up to order 4?

2

There are 2 best solutions below

2
On BEST ANSWER

\begin{align}\ln (1+x+x^2/2)&=(x+x^2/2)-\frac{(x+x^2/2)^2}{2}+\frac{(x+x^2/2)^3}3-\frac{(x+x^2/2)^4}4+O(x^5)\\ &=x+\left(\frac{1}2-\frac{1}2\right)x^2+\left(-\frac12+\frac13\right)x^3+\left(-\frac18 +\frac12-\frac14\right)x^4+O(x^5)\\ &=x-\frac16x^3+\frac18x^4 + O(x^5)\end{align}

Also, $\sin(x) = x-\frac{x^3}6+O(x^5)$

Hence $$\ln (1+x+x^2/2) - \sin (x) = \frac18x^4+O(x^5).$$

2
On

Let $$f(x)=\ln \left( 1+x+1/2\,{x}^{2} \right) -\sin \left( x \right) $$ then we get $$f'(x)={\frac {1+x}{1+x+1/2\,{x}^{2}}}-\cos \left( x \right) $$ $$f''(x)= \left( 1+x+1/2\,{x}^{2} \right) ^{-1}-{\frac { \left( 1+x \right) ^{2 }}{ \left( 1+x+1/2\,{x}^{2} \right) ^{2}}}+\sin \left( x \right) $$ $$f'''(x)=-3\,{\frac {1+x}{ \left( 1+x+1/2\,{x}^{2} \right) ^{2}}}+2\,{\frac { \left( 1+x \right) ^{3}}{ \left( 1+x+1/2\,{x}^{2} \right) ^{3}}}+\cos \left( x \right) $$ $$f''''(x)=12\,{\frac { \left( 1+x \right) ^{2}}{ \left( 1+x+1/2\,{x}^{2} \right) ^{3}}}-3\, \left( 1+x+1/2\,{x}^{2} \right) ^{-2}-6\,{\frac { \left( 1+x \right) ^{4}}{ \left( 1+x+1/2\,{x}^{2} \right) ^{4}}}-\sin \left( x \right) $$ and $$f^{(iv)}(0)=3$$