Im given a function $f(x)$ defined about a point $x=0$ by $$f(x) = x+ px^2 + O(x^5)$$ where $p \in \mathbb R$
I need to find the value of $p$ for which the function $$g(x)=f(\sin x)-x+ (1/3) x^2+(1/3)x^3$$
has a local maximum, a local minimum and an infection point at $x=0$.
The question states that I should apply taylor polynomial about $x=0$ but I'm uncertain whether that means taylor polynomial of $f(x)$ or $g(x)$
I know that to find the local minimum, maximum and inflection point I need to show that
$g''(0)<0$ for local maximum
$g''(0)>0$ for local minimum
$g''(0)=0$ for possible inflection point
And that
$$g'(x)=f'(\sin x)\cos x-1+(2/3)x+(2/3)x^2$$
$$g''(x)=f''(\sin x)\cos x-f'(\sin x)\sin x+(2/3)+(4/3)x$$
I guess you are supposed to find the Taylor expansion of $g$ using the Taylor expansions of $f$ and $\sin x$. We have \begin{align} f(\sin x)&=\sin x+p\sin^2x+O(\sin^5x)\\ &=\Bigl(x-\frac{x^3}{6}+O(x^5)\Bigr)+p\,\Bigl(x-\frac{x^3}{6}+O(x^5)\Bigr)^2+O(x^5)\\ &=x+p\,x^2-\frac{x^3}{6}-\frac{p\,x^4}{3}+O(x^5). \end{align} Then $$ g(x)=\Bigl(p+\frac 13\Bigr)\,x^2+\frac{x^3}{6}+O(x^4) $$ From here you can find, $g(0)$, $g'(0)$, $g''(0)$ and $g'''(0)$.