Find value of n such the function has local mimima at x=1. If $f$ is defined by
$$f(x)=(x^2-1)^n(x^2+x-1)$$
then $f$ has a local minimum at $x=1$, when


*
(i) $n=2$


(ii) $n=3$

(iii) $n=4$

 (iv) $n=5$
Multiple options are correct. 

The given answer is $n=2$ and $n=4$.

I tried putting derivative equal to zero and double derivative greater than zero, but both of them were independent of $n$.

The second derivative test is inconclusive for $n > 2$.

As a fall back, you can use the first derivative test.

Let $n > 1$ be a positive integer.

Computing $f'(x)$, we get the factored form
$$f'(x)=(x^2-1)^{n-1}g(x)$$
where
$$g(x)= (2n+2)x^3+(2n+1)x^2-(2n+2)x-1$$

Noting that $g(1)=2n$, it follows that $g(x) > 0$ near $x=1$.

Since $n > 1$, we have $f'(1)=0$, so $x=1$ is a critical value of $f$.

Consider two cases . . .

Case $(1)$:$\;n\;$is odd.

Then $n-1$ is even, so $(x^2-1)^{n-1} > 0$ both to the left and to the right of $x=1$ near $x=1$.

Then since $g(x) > 0$ near $x=1$, it follows that $f'(x) > 0$ both to the left and to the right of $x=1$ near $x=1$, so by the first derivative test, the critical value $x=1$ does not correspond to a relative extremum.

Case $(2)$:$\;n\;$is even.

Then $n-1$ is odd, so $(x^2-1)^{n-1} < 0$ to the left of $x=1$ near $x=1$, and $(x^2-1)^{n-1} > 0$ to the right of $x=1$ near $x=1$.

Then since $g(x) > 0$ near $x=1$, it follows that $f'(x) < 0$ to the left of $x=1$ near $x=1$, and $f'(x) > 0$ to the right of $x=1$ near $x=1$, so by the first derivative test, the critical value $x=1$ corresponds to a relative minimum.

Therefore, for the stated question, the answers are $n=2$ and $n=4$.

As an alternative, much simpler solution, one can argue as follows . . .

Let $n$ be a positive integer.

First note that $f(1)=0$.

At $x=1$, we have $x^2+x-1 > 0$, hence, near $x=1$, the sign of $f(x)$ is the same as the sign of $(x^2-1)^n$.

If $n$ is even, $(x^2-1)^n > 0$, both to the left and to the right of $x=1$ near $x=1$, hence the same is true for $f(x)$. It follows that $f$ has a relative minimum at $x=1$.

If $n$ is odd, $(x^2-1)^n < 0$, to the left of $x=1$ near $x=1$, hence the same is true for $f(x)$. It follows that $f$ does not have a relative minimum at $x=1$.
