Solveeit Logo

Question

Question: Find the range of \(f\left( x \right)=\sin x+\cos x+3\). Range is \(\left[ a,b \right]\), then find ...

Find the range of f(x)=sinx+cosx+3f\left( x \right)=\sin x+\cos x+3. Range is [a,b]\left[ a,b \right], then find abab.

Explanation

Solution

We will find the maxima and minima of the given function. To find the maxima and minima, we will differentiate the function and equate it to zero. The range of the function will be the values that lie between the minimum value and the maximum value of the function. After we find the range, we will multiply the values of the endpoints of the range to get the desired answer.

Complete step by step solution:
The given function is f(x)=sinx+cosx+3f\left( x \right)=\sin x+\cos x+3. We will look at the derivative of the given function. To find the derivative of a function which is of the form g(x)=u(x)+v(x)g\left( x \right)=u\left( x \right)+v\left( x \right), we will use the following rule,
g(x)=ddx(u(x)+v(x)) =u(x)+v(x)\begin{aligned} & {g}'\left( x \right)=\dfrac{d}{dx}\left( u\left( x \right)+v\left( x \right) \right) \\\ & ={u}'\left( x \right)+{v}'\left( x \right) \end{aligned}
So, we have
ddx(f(x))=ddx(sinx+cosx+3)\dfrac{d}{dx}\left( f\left( x \right) \right)=\dfrac{d}{dx}\left( \sin x+\cos x+3 \right)
Using the rule mentioned above, we get the following,
ddx(sinx+cosx+3)=ddx(sinx)+ddx(cosx)+ddx(3)\dfrac{d}{dx}\left( \sin x+\cos x+3 \right)=\dfrac{d}{dx}\left( \sin x \right)+\dfrac{d}{dx}\left( \cos x \right)+\dfrac{d}{dx}\left( 3 \right)
We know that the derivative of a constant function is zero. Therefore, we have ddx(3)=0\dfrac{d}{dx}\left( 3 \right)=0. We also know that ddx(sinx)=cosx\dfrac{d}{dx}\left( \sin x \right)=\cos x and ddx(cosx)=sinx\dfrac{d}{dx}\left( \cos x \right)=-\sin x. Substituting these values in the equation above, we get
ddx(f(x))=cosxsinx+0 =cosxsinx\begin{aligned} & \dfrac{d}{dx}\left( f\left( x \right) \right)=\cos x-\sin x+0 \\\ & =\cos x-\sin x \end{aligned}
Now, to find the maxima and minima, we will equate the derivative of the function to zero, that is, f(x)=0{f}'\left( x \right)=0. Therefore, we obtain the following equation,
cosxsinx=0\cos x-\sin x=0
This implies that cosx=sinx\cos x=\sin x. This is possible when x=π4x=\dfrac{\pi }{4}. The value of the function at x=π4x=\dfrac{\pi }{4} is the following,
f(π4)=sinπ4+cosπ4+3f\left( \dfrac{\pi }{4} \right)=\sin \dfrac{\pi }{4}+\cos \dfrac{\pi }{4}+3
Substituting sinπ4=cosπ4=12\sin \dfrac{\pi }{4}=\cos \dfrac{\pi }{4}=\dfrac{1}{\sqrt{2}} in the above equation, we get
f(π4)=12+12+3 =22+3 =2+3\begin{aligned} & f\left( \dfrac{\pi }{4} \right)=\dfrac{1}{\sqrt{2}}+\dfrac{1}{\sqrt{2}}+3 \\\ & =\dfrac{2}{\sqrt{2}}+3 \\\ & =\sqrt{2}+3 \end{aligned}
We get cosx=sinx\cos x=\sin x when x=π4+πx=\dfrac{\pi }{4}+\pi , since we know that sin(π+θ)=sinθ\sin \left( \pi +\theta \right)=-\sin \theta and cos(π+θ)=cosθ\cos \left( \pi +\theta \right)=-\cos \theta . Therefore, at x=π4+πx=\dfrac{\pi }{4}+\pi , we get the value of the function as
f(π4+π)=sin(π4+π)+cos(π4+π)+3f\left( \dfrac{\pi }{4}+\pi \right)=\sin \left( \dfrac{\pi }{4}+\pi \right)+\cos \left( \dfrac{\pi }{4}+\pi \right)+3
Using the identities mentioned above, we get
f(π4+π)=sinπ4cosπ4+3 =1212+3 =22+3 =2+3\begin{aligned} & f\left( \dfrac{\pi }{4}+\pi \right)=-\sin \dfrac{\pi }{4}-\cos \dfrac{\pi }{4}+3 \\\ & =-\dfrac{1}{\sqrt{2}}-\dfrac{1}{\sqrt{2}}+3 \\\ & =-\dfrac{2}{\sqrt{2}}+3 \\\ & =-\sqrt{2}+3 \end{aligned}
Hence, the minima of the function is attained at x=π4+πx=\dfrac{\pi }{4}+\pi and the maxima is attained at x=π4x=\dfrac{\pi }{4}, and their respective values are 2+3-\sqrt{2}+3 and 2+3\sqrt{2}+3. So, the range of the given function is [a,b]=[2+3,2+3]\left[ a,b \right]=\left[ -\sqrt{2}+3,\sqrt{2}+3 \right]. So, the value of abab can be calculated as follows,
ab=(2+3)(2+3) =223+23+9 =7\begin{aligned} & ab=\left( -\sqrt{2}+3 \right)\left( \sqrt{2}+3 \right) \\\ & =-2-\sqrt{2}\cdot 3+\sqrt{2}\cdot 3+9 \\\ & =7 \end{aligned}
Hence, we have ab=7ab=7.

Note: The maxima and minima of a function are obtained by equating the derivative of the function to zero. The values of xx for which we obtain f(x)=0{f}'\left( x \right)=0 are called the critical values. We can talk about the function increasing or decreasing by taking the second derivative of the function. It is called the second derivative test.