Maxima and Minima of a cosx/(sqrt(1+x^2))

Hello,

I want to find the maxima and minima of f(x)=cosx/(sqrt(1+x^2)) in the domain -4<=x<=4

I used Desmos and I can see it. If I have to do it by hand, I get the first derivative as -(sinx+xcosx)/sqrt(1+x^2)

Q1 - How do I interpret the horizontal asymptotes with limits. I just guessed it here. When x is +infinity - max of sin and cos is 1. So, 1/(A big number) = 0

When -infinity, I am not sure how to handle this.

Q2 - f’(x) = 0 when tanx=x? So, x is 0 (I can see that it is the maxima) but at this point the second derivative
f’'(x)= (-2xsinx)/sqrt(1+x^2) is also zero. But, this is not an inflection point.

Q3 - I can’t get why the minima is at 2.83783? It shows up on desmos and wolfram alpha. However, I can’t calculate the value.

Hi, @gowrir,

Thanks for writing in with your question! We’re happy to help.

I want to find the maxima and minima of f(x)=cosx/(sqrt(1+x^2)) in the domain -4<=x<=4

Let’s start with a copy of the Desmos graph so we can all can see the function. We’ve labeled the points where you’re seeing the minima, and the dotted curve indicates the function outside of the domain range you stated.

Q1 - How do I interpret the horizontal asymptotes with limits. I just guessed it here. When x is +infinity - max of sin and cos is 1. So, 1/(A big number) = 0
When -infinity, I am not sure how to handle this.

Since you said the domain is -4 \le x \le 4, I’m guessing this is a separate question about the horizontal asympotes? Assuming so: Your reasoning is solid for what happens as x \to \infty. You can extend the same thinking for x \to -\infty: As x gets bigger and bigger, so does 1+x^2, and so you again have 1/(A big number) and so the limit is again 0. For this kind of informal reasoning, you might find our blog post helpful: Limits at Infinity: What You Need to Know

And if you wanted to make your reasoning formal, you would use the “Squeeze Theorem,” which we discuss and illustrate on this screen. As you write, \cos(x) simply oscillates between -1 and 1, so you’d be squeezing the function as

\frac{-1}{\sqrt{1+x^2}} \le \frac{\cos(x)}{\sqrt{1+x^2}} \le \frac{1}{\sqrt{1+x^2}}

Your function is “squeezed” between the functions on the left and the right there, and since the limit of both of those functions is zero as x \to \pm \infty, the limit of your function must be 0 as well.

I used Desmos and I can see it. If I have to do it by hand, I get the first derivative as -(sinx+xcosx)/sqrt(1+x^2)
Q2 - f’(x) = 0 when tanx=x? So, x is 0 (I can see that it is the maxima) but at this point the second derivative

If you’d like to post your work we’ll try to see how you arrived at your first derivative. We get a different result, as shown using either the Product Rule or the Quotient Rule:

Method 1: Product Rule

\begin{align*} f(x) &= \frac{\cos(x)}{\sqrt{1+x^2}} \\[8px] &= \cos(x)(1+x^2)^{-1/2} \\[8px] f'(x) &= -\sin(x)(1+x^2)^{-1/2} + \cos(x)\left(-\frac{1}{2}(1+x^2)^{-3/2}(2x)\right) \\[8px] &= \frac{-\sin(x)}{\sqrt{1+x^2}} - \frac{x\cos(x)}{(1+x^2)^{3/2}} \\[8px] &= \frac{-\sin(x)(1+x^2)}{(1+x^2)^{3/2}} - \frac{x\cos(x)}{(1+x^2)^{3/2}} \\[8px] &= \frac{-\sin(x)(1+x^2) - x\cos(x)}{(1+x^2)^{3/2}} \quad \blacktriangleleft \end{align*}

Method 2: Quotient Rule

\begin{align*} f(x) &= \frac{\cos(x)}{\sqrt{1+x^2}} \\[8px] f'(x) &= \frac{-\sin(x)\sqrt{1+x^2}\, - \, \cos(x)\left(\frac{1}{2}\left(1+x^2 \right)^{-1/2}(2x) \right)}{1+x^2} \\[8px] &= \frac{-\sin(x)\sqrt{1+x^2} - \frac{x\cos(x)}{\sqrt{1+x^2}}}{1+x^2} \\[8px] &= \frac{-\sin(x)\left( 1 + x^2\right) - x\cos(x)}{\left(1+x^2 \right) ^{3/2}} \quad \blacktriangleleft \end{align*}

Again, if you’d like to post your work we’ll be happy to look for an error.

Now, we can see by inspection (meaning just looking at the numerator) that there is one critical point at x_c = 0 since f'(0) = 0. Looking at the graph we see that’s a local (and absolute) max, but we’d have to use the First or Second Derivative Tests to show that that’s true analytically.

Finding the other crucial points is a challenge, though, since we can’t easily solve

-\sin(x)(1+x^2) - x\cos(x) = 0

The only way to find the solutions is with numerical assistance that comes from something like Desmos or a calculator with such built-in functionality, so you’d have to ask your instructor how you’re supposed to proceed from here. You can, however, verify that if you substitute x = -2.83783 and x = 2.83783 into f'(x), you get zero, showing that those two points are indeed local extrema. (We can see from the graph that they’re local mins, but again we’d need to show that using the First or Second Derivative Tests to prove that analytically.)

One final note: Since the domain is specified as -4 \le x \le 4, your problem probably asks for absolute max and min as well as local. If that’s the case, don’t forget the check the function’s value at the endpoints. Again you can see from the graph they’re neither absolute maxs or mins, but on an exam you’d have to address that specifically. (See Question 2 here.)


Please write back with any follow-up thoughts or questions, or if we can help you with anything else. For now, thanks again for posting, and we hope we’ve helped! : )

Thanks for your wonderful and detailed response.

I am laying out my thoughts on this question (not in any particular order).

  1. There are certain questions, like this one, whose maxima and minima can only found using a GDC?
  2. How do you create a dotted line for the function outside the domain? I used desmos and it just darkens the area.
  3. How do I use the insert equation feature? I clicked on it, but I do not see a box coming up as in word. \frac{1}{x}. I used 1/x just as a trial.
  4. I got my error while finding the derivative. I used quotient rule and used it as 1/sqrt(1+x^2) instead of using it as sqrt(1+x^2).

Thanks

Glad to know that was helpful – thanks!

  1. There are certain questions, like this one, whose maxima and minima can only found using a GDC?

Absolutely. Any function whose first derivative results in an equation that can’t easily be solved to find the critical points will require a numerical method (which you probably don’t know yet), or a computer/calculator to help, which could be a graphing display calculator (GDC). When most students are learning Calculus they’re only given functions that result in first derivatives that can be solved by factoring or some other relatively straightforward technique, so you’d naturally conclude all functions work this way . . . but actually the problems have been crafted so things work out that way. In “the real world” there’s no guarantee that that will be the case.

  1. How do you create a dotted line for the function outside the domain? I used desmos and it just darkens the area.

We created a second expression for the region outside the stated domain, and made that curve dotted with the same color. (Just wanted to make sure everyone could get a visual sense for the horizontal asymptotes being zero.)

  1. How do I use the insert equation feature? I clicked on it, but I do not see a box coming up as in word. \frac{1}{x}. I used 1/x just as a trial.

Sorry about that, and thanks for letting us know. A recent update to the Forum software probably introduced an error; we’ll investigate and get that fixed. In the meantime, if you’re comfortable writing LaTeX, if you put a single dollar sign $ around both sides of the equation, like $\frac{1}{x},$ you’ll get \frac{1}{x}. You can see more about the usage on our Forum here: How to typeset an equation

  1. I got my error while finding the derivative. I used quotient rule and used it as 1/sqrt(1+x^2) instead of using it as sqrt(1+x^2).

Glad you found that! It’s the most common error when using the Quotient Rule, and most of us have to make it a few times early on before the correct approach become automatic. So, glad you did that now rather than later on an exam. :+1:

Please let us know how else we can help!