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! : )