<s>[INST] Find the range of $f(x) =(x-1)^{1/2} + 2\cdot(3-x)^{1/2}$ How to take out the range of the following function : 
$$f(x) =(x-1)^{1/2} + 2\cdot(3-x)^{1/2}$$
I am new to functions hence couldn't come up with a solution.
 [/INST] Let $y = f(x)$ be a function with domain $D$.
Let $\left[a,b\right] \le D$, then the global extrema are the extreme (largest and smallest) values in $\left[a,b\right]$.
There are two global extrema; global minima (least value) and global maxima (largest value)
Conceptually speaking,
$$f'(x) = 0\iff f(x)  \text{ `makes a turning`}\iff f(x) \text{ is an extrema}$$
Let $c_1,\space c_2,\space \dots, c_n$ be the points at which $f'(x) = 0$ (ie, the extreme points)
Then,
$$\text{Global Minima }(m) = \min\{f(a), f(c_1),\dots, f(c_n), f(b)\}\\
\text{Global Maxima }(M) = \max\{f(a), f(c_1),\dots, f(c_n), f(b)\}$$
Then, the range of $f(x)$ in $\left[a,b\right]$ is simply the interval $(m,M)$

Given :: $f(x) = \sqrt{x-1} + 2\sqrt{3-x}$

Since $\sqrt{n}$ is only a real function when $n\ge 0$, then in $f(x)$,
$$x-1\ge 0 \quad \&\quad 3-x \ge 0\\
\Rightarrow 1 \le x \le 3\\
\Rightarrow x \in \left[1,3\right]$$
Now, to check for extrema,
$$\frac{d}{dx} f(x) = f'(x) = 0 \\
\Rightarrow \frac{1}{2\sqrt{x-1}} - \frac{1}{\sqrt{3-x}} = 0\\
\Rightarrow \frac1{2\sqrt{x-1}} = \frac1{\sqrt{3-x}}\\
\Rightarrow 4(x-1) = 3-x \\
\Rightarrow x = \frac{7}{5} = 1.4 \in \left[1,3\right]
$$
The suspects:
$$
f\left(\frac{7}{5}\right) = \sqrt{\frac{7 - 5}{5}} + 2\sqrt{\frac{15-7}{5}} = \sqrt{\frac{2}{5}} + 4\sqrt\frac{2}{5} = \sqrt5\cdot\sqrt2 =\sqrt{10} \approx 3.1622\\
f(1) = 0 + 2\sqrt{3-1} = 2\sqrt{2} \approx 2.8284\\
f(3) = \sqrt{3-1} + 0 = \sqrt{2}\approx 1.4142
$$
Clearly, $f\left(\frac{7}{5}\right) > f(1) > f(3)$
$\therefore $ The global Maxima is $\sqrt{10}$ and the global minima is $\sqrt{2}$
$$\boxed{\text{Range}(f) = \left[ \sqrt{2}, \sqrt{10} \right]}$$
</s>