Find the values of $a$ for which the function $f(x)=x^3+x^2+a\sin x$ is one-one(injective)

algebra-precalculuscalculusfunctionsgraphing-functionsreal-analysis

Find the values of $a$ for which the function $$f(x)=x^3+x^2+a\sin x$$ is one-one(injective).

My Attempt

Since $f(x)$ is differentiable one can say that the derivative must be either always non-negative or non positive

i.e. $f'(x)\geq 0$

$\Rightarrow 3x^2+2x+a\cos x\geq 0$

Since minimum value of $\cos x$ is $-1$ we can say that if

$3x^2+2x-a\geq 0$ then $f'(x)\geq 0$ for all $x\in \mathbb{R}$

So,for $3x^2+2x-a\geq 0$,the discriminant of the quadratic must be non-positive

i.e. $4+12a\leq 0$. Thus $a\in \left(-\infty,-\frac{1}{3}\right]$

But when I take $a=-1$ and plot the graph $y=x^3+x^2-\sin x$ I see that $f(x)$ is NOT one-one.

What mistake I am making.

Best Answer

You are on the right way, but make logical and technical mistakes.

With $f$ being differentiable, going through the derivate being always non-negative or non-positive is the right way forward. What's important to examine here is what exactly the relation is between "$f$ is injective" and "$f'$ is always non-negative or non-positive". What you ideally want is an equivalence between what you need to have (injective) and the condition that you can check.

What you realized is that "$f$ is injective" implies "$f'$ is always non-negative or non-positive". What is less clear is the other way around. For example, any constant function, $f(x)=c$ has a derivative $f'(x)=0$ that is non-negative, but $f(x)=c$ is certainly not injective.

Assuming "$f'$ is always non-negative or non-positive", if we had $f(x_1) = f(x_2) = c$ for $x_1 < x_2$, that would imply $\forall x \in [x_1,x_2]: f(x) = c$, as $f$ cannot go both up and down. This implies that in the interval $(x_1,x_2)$ $f$ is constant, so it's first, second a.s.o derivatives there are all identical to $0$.

But this is not the case for our $f$, as $f'''(x) = -a\cos x$, which is not always zero on a complete (however small) interval.

That means with our $f(x)=x^3+x^2+a\sin x$, the conditions "$f$ is injective" and "$f'$ is always non-negative or non-positive" are equivalent.

In your solution you assumed that and it was correct, but I wanted to point out that you actually need to think about this, because the same omission comes again later, where the consequences are more severe.

So we found that the inital problem is equivalent to finding all $a \in \mathbb R$ where

$$f'(x)= 3x^2 + 2x + a\cos x$$

is always non-negative or non-positive. It's easy to see that for large $|x|$, $f'(x)$ will always be positive as $3x^2 + 2x$ is a polynomial which is always dominated by the leading term and $|a\cos x| \le |a|$, so this is always bounded by a fixed number, so cannot make the whole term go negative for large $|x|$.

So we find that the initial problem is equivalent to finding all $a \in \mathbb R$ where

$$\forall x \in \mathbb R: 3x^2 + 2x + a\cos x \ge 0. \tag{1}\label{eq1} $$

You've gotten so far as well.

Now comes your technical mistake, you wrote:

Since minimum value of $\cos x$ is $-1$ we can say that if

$3x^2+2x-a\geq 0$ then $f'(x)\geq 0$ for all $x\in \mathbb{R}$

This is only true when $a \ge 0$.

Only then is $\cos x = -1$ the "worst case" for bounding $a\cos x$ from below. For negative $a$, this is actually the best case we can hope for, making the term as big as possible!

In order to proceed your way, we need to consider the cases $a > 0$ and $a < 0$ separately. $a=0$ can be dealt with immediately, as then $$f'(x) = 3x^2+2x = 3(x^2+\frac23x) = 3(x^2+\frac23x + \frac19) - \frac13 = 3(x+\frac13)^2 - \frac13$$

will be $< 0$ at $x=-\frac13$.

The logical mistake you make is that even for $a>0$ the 2 inequalities

$$\forall x \in \mathbb R: 3x^2 + 2x - a \ge 0 \tag{2}\label{eq2}$$

and

$$\forall x \in \mathbb R: 3x^2 + 2x + a\cos x \ge 0 \tag{3}\label{eq3}$$

are not equivalent! What we know is that $\eqref{eq2} \implies \eqref{eq3}$, but we know nothing about the other way around. In fact, using $a=1$ we can see that $\eqref{eq3} \implies \eqref{eq2}$ is actually wrong:

plot of 3x^2 + 2x - a vs. 3x^2 + 2x + a\cos x

At the point where $3x^2 + 2x + 1\cos x$ has it's minimum (looks somewhere near $-0.4$), it's value still positive, while $3x^2 + 2x - 1$ is clearly in the negative there. At $x=-0.4$ we have $3x^2 + 2x = -0.32 <0$, and we have $\cos x \approx 0.92$. That means the part $+1\cos x$ is actively helping to get the whole sum $3x^2 + 2x + 1\cos x$ above zero, while the "worst case assumption" adds a $-1$, making it even more negative.

What can we do now? This is a common occurance in math, we have some condition that is relatively easy to check in \eqref{eq2}, but does not give us the whole picture about the problem \eqref{eq3} we actually want to solve. But we know that if we find all values of $a$ that make \eqref{eq2} true, those will also make \eqref{eq3} true, which is a result, just not the whole picture.

However, as you correctly found out, the discriminant of the quadratic function in \eqref{eq2} is $4+12a$, which is always positive for $a > 0$, so this approach says that \eqref{eq2} is not true for any positive $a$, which is a really bad result, because it says nothing about \eqref{eq3}, which is what we are really interested in.

So how to proceed?

Looking at the $y=3x^2 + 2x$ term alone, we see it's a parabola with zeros at $x=-\frac23, 0$ and getting the minumum at $(-\frac13, -\frac13)$. That's why we above concluded that $a=0$ does not satisfy \eqref{eq3}. So when $|a|$ is 'small', $f'(x) = 3x^2 + 2x + a\cos x$ will not be much different from that parabola. Trying a few $a<0$, one realizes that we have $f'(0) = 0 + 0 + a\cos 0 = a < 0$, so this immediately means

$$\text{\eqref{eq3} is never true for}\;\; a < 0$$

For $a > 0$ and 'small', we need to have $a$ that big that the $a\cos x$ term moves the parabola of $y=3x^2 + 2x$ above the x-axis in the interval $[-\frac23, 0]$ and especially around $x=-\frac13$, where the parabole needs the biggest 'boost'.

Playing around in Wolfram Alpha, a value if $a \approx 0.354$ seems to be when $3x^2 + 2x + a\cos x$ becomes always non-negative:

plot of 3x^2 + 2x + 0.354\cos x

Suspiciously, the x-value ($x_0$) where the curve touches the x-axis looks like $-0.354$, which I would guess is is not a coincidence, but which I can't prove to be exactly $-a$.

Finding the exact value of that $a$ will only be possible by numerical calculations. Following Maverick's solution, that $x_0$ must satsify both $f'(x_0)=0$ and $f''(x_0)=0$, which leads to

$$\tan x_0 = -\frac{6x_0+2}{3x_0^2+2x_0}, \tag{4}\label{eq4}$$

which needs a numerical approach (as best as I can see).

So we see that from $a_min \approx 0.354$ on, $3x^2 + 2x + a\cos x$ will be non-negative in the interval $[-\frac23, 0]$, where the original parabola $3x^2 + 2x$ was negative. That's true because for $x in [-\frac23, 0]$, the term $\cos x$ will be positive, so increasing $a$ will then increase $3x^2 + 2x + a\cos x$ even more.

However, when we increase a more and more, it will no longer be 'small', and the intervals where $\cos x$ are negative will move the original parabola downwards by a considerable amount. For example for $a=10$, we get

plot of 3x^2 + 2x + 10\cos x

where around $x=-2$ there is a 'downwards dent' n the parabola, because of the $a\cos x$ term, which is negative there!

Again, the question is when this curve touches the x-axis, and again playing around with Wolfram Alpha we get that for $a \approx 16.887$ the function just touches the x-axis at roughly $x_0=-2.34$:

plot of 3x^2 + 2x + 16.887\cos x

increasing $a$ beyond that point will make the $a \cos x$ term becomer more negative, so then $f'(x) will have negative values, violating \eqref{eq3}.

So we know that for $a$ outside $[0.234, 16.887], f'(x)$ will be negative for some $x$. For $a$ inside $[0.234, 16.887], f'(x)$ is non-negative around the initial interval where $3x^2+2x$ was negative and near $x=2$, which is around where $a \cos x$ is negative and $3x^2+2x$ is still small to be overshadowed by $a \cos x$.

Could there be other intervals where $f'(x)$ is negative for $a$ inside $[0.234, 16.887]$?

No! $3x^2+2x$ is positive outside $[-\frac23, 0]$ and will be $> 20$ outside the interval $[-\pi, \pi]$, so adding $a \cos x$ with $|a| < 17$ will not make $3x^2 + 2x + a\cos x$ become negative there. Since the $3x^2+2x$ parabola is centered at $x=-\frac13$, $[-\pi, 0]$ interval is the critical one, as $a \cos x = a \cos -x$ , but $3x^2+2x > 3(-x)^2+2(-x)$ for $x \in [0,\pi]$.

To get better values (if desired), one can ask Wolfram Alpha to calculate the interesting zeros of the critical equation \eqref{eq4}:

solutions of critical equation

The values found by experimenting are validated and now given with more precision.

So the final answer is that $f(x)$ is injective exactly when $a \in [\approx 0.354, \approx 16.887] $ (with the exact values depending on the solutions of \eqref{eq4}.

Related Question