# Least value of n that makes the nth derivative of the function non zero at $x=0$

The function f(x) is as follows.

$f(x)=6\tan (x)(e^x-x-1)-3x^3-x^4-x^5$

If the $n^{th}$ derivative at $x=0$ is non zero then what should be the least value of n?

My obvious approach was to differentiate $f(x)$ and see a pattern which would help me estimate the same. Differentiating the tan x part by applying product rule once would give me one $sec^2x$ and one part $e^x-1$. The second part of sec x would make it 0 and $e^x-1$ would also be 0. Differentiation of sec x would give one tan x term, making it 0 in higher differentiation. $e^x-1$ will always have one tan x part in every differentiation , so going this way inductively would make the first team of f(x) 0. The remaining terms, $-3x^3-x^4-x^5$ would be non zero at least value of n as 3. Therefore my answer is 3.

But I was surprised to see the answer when I plotted the graph in my graphing calculator and differentiated it a couple of times to see the slope go non zero at $x=0$ at $5^{th}$ derivative, making the answer $n=6$.

What is wrong in my reasoning? Why isn't the answer 3?

• Then reformulate the question so that the answer is $6$. Find the least value of $n$ such that ...? What's supposed to be there? If it's nonzero derivative then the answer is $5$. – user2345215 Nov 17 '14 at 14:10

Use Taylor series for $e^x$ and $\tan x$. It becomes \begin{align*}&6(x+x^3/3+o(x^3))(x^2/2+x^3/6+x^4/24+o(x^4))-3x^3-x^4-x^5\\&=3x^3+x^4+x^5/4+x^5+o(x^5)-3x^3-x^4-x^5=x^5/4+o(x^5)\end{align*} So the derivatives up to the 4th are $0$ and the 5th is $5!/4=5\cdot3\cdot2=30$.
• @Rohinb97 I'm not sure I understand it. Why do you think the answer is $n=6$ when $n=5$ is the nonzero derivative? And this approach is not necessary per se, but it's the standard approach for these types of problems and makes things much easier than differentiating. – user2345215 Nov 17 '14 at 13:28