Find the values of $a$ and $b$ such that the function $f$ defined by
$$f(x)= \begin{cases}\frac{x-4}{|x-4|}+a, & \text { if } x<4 \\ a+b, & \text { if } x=4 \\ \frac{x-4}{|x-4|}+b, & \text { if } x>4\end{cases}$$
is a continuous function at $x=4$.
We have, $f(x)=\left\{\begin{array}{l}\frac{x-4}{|x-4|}+a, \text { if } x<4 \\ a+b, \quad \text { if } x=4 \\ \frac{x-4}{|x-4|}+b, \text { if } x>4\end{array}\right.$
$$\begin{aligned} &\text { At } x=4 \text {, }\\ &\begin{aligned} \mathrm{LHL} & =\lim _{x \rightarrow 4^{-}} \frac{x-4}{|x-4|}+a \\ & =\lim _{h \rightarrow 0} \frac{4-h-4}{|4-h-4|}+a=\lim _{h \rightarrow 0} \frac{-h}{h}+a \\ & =-1+a \end{aligned} \end{aligned}$$
$$\begin{aligned} \mathrm{RHL} & =\lim _{x \rightarrow 4^{+}} \frac{x-4}{|x-4|}+b \\ & =\lim _{h \rightarrow 0} \frac{4+h-4}{|4+h-4|}+b=\lim _{h \rightarrow 0} \frac{h}{h}+b=1+b \\ f(4) & =a+b \Rightarrow-1+a=1+b=a+b \\ \Rightarrow \quad-1+a & =a+b \text { and } 1+b=a+b \\ \therefore \quad b & =-1 \text { and } a=1 \end{aligned}$$
If the function $f(x)=\frac{1}{x+2}$, then find the points of discontinuity of the composite function $y=f\{f(x)\}$.
We have,
$$\begin{aligned} f(x) & =\frac{1}{x+2} \\ \therefore\quad y & =f\{f(x)\} \\ & =f\left(\frac{1}{x+2}\right)=\frac{1}{\frac{1}{x+2}+2} \\ & =\frac{1}{1+2 x+4} \cdot(x+2)=\frac{(x+2)}{(2 x+5)} \end{aligned}$$
So, the function $y$ will not be continuous at those points, where it is not defined as it is a rational function.
Therefore, $y=\frac{x+2}{(2 x+5)}$ is not defined, when $2 x+5=0$
$$\therefore \quad x=\frac{-5}{2}$$
Hence, $y$ is discontinuous at $x=\frac{-5}{2}$.
Find all points of discontinuity of the function $f(t)=\frac{1}{t^2+t-2}$, where $$ t=\frac{1}{x-1}.$$
$$\begin{aligned} \text{We have,}\quad f(t) & =\frac{1}{t^2+t-2} \text { and } t=\frac{1}{x-1} \\ \therefore\quad f(t) & =\frac{1}{\left(\frac{1}{x^2+1-2 x}\right)+\left(\frac{1}{x-1}\right)-\frac{2}{1}} \\ & =\frac{1}{\left(\frac{1+x-1+\left[-2(x-1)^2\right]}{\left(x^2+1-2 x\right)}\right)} \\ & =\frac{x^2+1-2 x}{x-2 x^2-2+4 x} \\ & =\frac{x^2+1-2 x}{-2 x^2+5 x-2} \\ & =\frac{(x-1)^2}{-\left(2 x^2-5 x+2\right)} \\ & =\frac{(x-1)^2}{(2 x-1)(2-x)} \end{aligned}$$
So, $f(t)$ is discontinuous at $2 x-1=0 \Rightarrow x=1 / 2$
and $$2-x=0 \Rightarrow x=2$$
Show that the function $f(x)=|\sin x+\cos x|$ is continuous at $x=\pi$.
We have, $$f(x)=|\sin x+\cos x| \text { at } x=\pi$$
Let $g(x)=\sin x+\cos x$
and $h(x)=|x|$
$$\begin{aligned} \therefore\quad \operatorname{hog}(x) & =h[g(x)] \\ & =h(\sin x+\cos x) \\ & =|\sin x+\cos x| \end{aligned}$$
Since, $g(x)=\sin x+\cos x$ is a continuous function as it is forming with addition of two continuous functions $\sin x$ and $\cos x$.
Also, $h(x)=|x|$ is also a continuous function. Since, we know that composite functions of two continuous functions is also a continuous function.
Hence, $f(x)=|\sin x+\cos x|$ is a continuous function everywhere.
So, $f(x)$ is continuous at $x=\pi$.
Examine the differentiability of $f$, where $f$ is defined by
$$f(x)=\left\{\begin{array}{ll} x[x], & \text { if } 0 \leq x<2 \\ (x-1) x, & \text { if } 2 \leq x<3 \end{array} \text { at } x=2 .\right.$$
We have, $$f(x)=\left\{\begin{array}{ll} x[x], & \text { if } 0 \leq x<2 \\ (x-1) x & \text { if } 2 \leq x<3 \end{array} \text { at } x=2 .\right.$$
At $x=2$,
$$L f^{\prime}(2)=\lim _{h \rightarrow 0} \frac{f(2-h)-f(2)}{-h}$$
$$=\lim _\limits{h \rightarrow 0} \frac{(2-h)[2-h]-(2-1) 2}{-h}$$
$\{\because[a-h]=[a-1]$, where $a$ is any positive number $\}$
$$=\lim _\limits{h \rightarrow 0} \frac{(2-h)(1)-2}{-h}$$
$$=\lim _\limits{h \rightarrow 0} \frac{2-h-2}{-h}=\lim _\limits{h \rightarrow 0} \frac{-h}{-h}=1$$
$$R f^{\prime}(2)=\lim _\limits{h \rightarrow 0} \frac{f(2+h)-f(2)}{h}$$
$$=\lim _\limits{h \rightarrow 0} \frac{(2+h-1)(2+h)-(2-1) \cdot 2}{h}$$
$$=\lim _\limits{h \rightarrow 0} \frac{(1+h)(2+h)-2}{h}$$
$$=\lim _\limits{h \rightarrow 0} \frac{2+h+2 h+h^2-2}{h}$$
$$=\lim _\limits{h \rightarrow 0} \frac{h^2+3 h}{h}=\lim _\limits{h \rightarrow 0} \frac{h(h+3)}{h}=3$$
$$\therefore \quad L f^{\prime}(2) \neq R f^{\prime}(2)$$
So, $f(x)$ is not differentiable at $x=2$.