1. **Problem statement:**
I) Find real values of $a$ and $b$ such that the function
$$f(x) = \begin{cases} a x + \frac{b^{x-2}}{x+1} - 1, & x \leq 1 \\ b \sqrt{2x - 1} - a e^{x-1}, & x > 1 \end{cases}$$
is differentiable on $\mathbb{R}$.
II) Study differentiability of
$$f(x) = \begin{cases} x^2 \cos\left(\frac{1}{x}\right), & x \neq 0 \\ 0, & x = 0 \end{cases}$$
---
2. **Key formulas and rules:**
- Differentiability at a point requires continuity and matching left and right derivatives.
- For piecewise functions, check continuity and derivative limits at the boundary point.
---
### Part I
3. **Continuity at $x=1$:**
Set left and right limits equal:
$$\lim_{x \to 1^-} f(x) = \lim_{x \to 1^+} f(x) = f(1)$$
Left side:
$$f(1) = a(1) + \frac{b^{1-2}}{1+1} - 1 = a + \frac{b^{-1}}{2} - 1 = a + \frac{1}{2b} - 1$$
Right side:
$$f(1) = b \sqrt{2(1) - 1} - a e^{1-1} = b \sqrt{1} - a e^0 = b - a$$
Equate:
$$a + \frac{1}{2b} - 1 = b - a$$
Rearranged:
$$2a + \frac{1}{2b} - 1 = b$$
---
4. **Differentiability at $x=1$:**
Compute left derivative:
$$f'_-(1) = \frac{d}{dx} \left(a x + \frac{b^{x-2}}{x+1} - 1\right) \Big|_{x=1}$$
Derivatives:
- $\frac{d}{dx} (a x) = a$
- For $g(x) = \frac{b^{x-2}}{x+1}$, use quotient rule:
$$g'(x) = \frac{(b^{x-2} \ln b)(x+1) - b^{x-2} \cdot 1}{(x+1)^2} = \frac{b^{x-2} ((x+1) \ln b - 1)}{(x+1)^2}$$
Evaluate at $x=1$:
$$g'(1) = \frac{b^{-1} (2 \ln b - 1)}{4} = \frac{(1/b)(2 \ln b - 1)}{4} = \frac{2 \ln b - 1}{4b}$$
So,
$$f'_-(1) = a + \frac{2 \ln b - 1}{4b}$$
---
5. **Right derivative:**
$$f'_+(1) = \frac{d}{dx} \left(b \sqrt{2x - 1} - a e^{x-1}\right) \Big|_{x=1}$$
Derivatives:
- $\frac{d}{dx} b \sqrt{2x - 1} = b \cdot \frac{1}{2 \sqrt{2x - 1}} \cdot 2 = \frac{b}{\sqrt{2x - 1}}$
- $\frac{d}{dx} (-a e^{x-1}) = -a e^{x-1}$
Evaluate at $x=1$:
$$f'_+(1) = \frac{b}{\sqrt{1}} - a e^0 = b - a$$
---
6. **Set derivatives equal:**
$$a + \frac{2 \ln b - 1}{4b} = b - a$$
Rearranged:
$$2a + \frac{2 \ln b - 1}{4b} = b$$
---
7. **Solve system:**
From continuity:
$$2a + \frac{1}{2b} - 1 = b$$
From differentiability:
$$2a + \frac{2 \ln b - 1}{4b} = b$$
Subtract second from first:
$$\left(2a + \frac{1}{2b} - 1\right) - \left(2a + \frac{2 \ln b - 1}{4b}\right) = b - b$$
$$\frac{1}{2b} - 1 - \frac{2 \ln b - 1}{4b} = 0$$
Multiply both sides by $4b$:
$$2 - 4b - (2 \ln b - 1) = 0$$
$$2 - 4b - 2 \ln b + 1 = 0$$
$$3 - 4b - 2 \ln b = 0$$
Rearranged:
$$4b + 2 \ln b = 3$$
Divide by 2:
$$2b + \ln b = \frac{3}{2}$$
This transcendental equation can be solved numerically.
---
8. **Numerical approximation:**
Try $b=1$:
$$2(1) + \ln 1 = 2 + 0 = 2 > 1.5$$
Try $b=0.5$:
$$2(0.5) + \ln 0.5 = 1 - 0.693 = 0.307 < 1.5$$
Try $b=0.7$:
$$1.4 + \ln 0.7 \approx 1.4 - 0.357 = 1.043 < 1.5$$
Try $b=0.8$:
$$1.6 + \ln 0.8 \approx 1.6 - 0.223 = 1.377 < 1.5$$
Try $b=0.85$:
$$1.7 + \ln 0.85 \approx 1.7 - 0.163 = 1.537 > 1.5$$
By interpolation, $b \approx 0.83$.
---
9. **Find $a$:**
Use continuity equation:
$$2a + \frac{1}{2b} - 1 = b$$
Plug $b=0.83$:
$$2a + \frac{1}{2 \times 0.83} - 1 = 0.83$$
$$2a + 0.602 - 1 = 0.83$$
$$2a - 0.398 = 0.83$$
$$2a = 1.228$$
$$a = 0.614$$
---
### Part II
10. **Function:**
$$f(x) = \begin{cases} x^2 \cos\left(\frac{1}{x}\right), & x \neq 0 \\ 0, & x = 0 \end{cases}$$
Check differentiability at $x=0$.
11. **Continuity at 0:**
$$\lim_{x \to 0} x^2 \cos\left(\frac{1}{x}\right)$$
Since $|\cos(1/x)| \leq 1$,
$$|x^2 \cos(1/x)| \leq x^2 \to 0$$
So, $f$ is continuous at 0.
12. **Derivative at 0:**
$$f'(0) = \lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} \frac{h^2 \cos(1/h) - 0}{h} = \lim_{h \to 0} h \cos(1/h)$$
Since $|\cos(1/h)| \leq 1$,
$$|h \cos(1/h)| \leq |h| \to 0$$
So,
$$f'(0) = 0$$
13. **Differentiability for $x \neq 0$:**
$f$ is differentiable as product of differentiable functions.
14. **Conclusion:**
$f$ is differentiable everywhere on $\mathbb{R}$ with
$$f'(0) = 0$$
---
**Final answers:**
$$a \approx 0.614, \quad b \approx 0.83$$
and $f$ in part II is differentiable on $\mathbb{R}$ with $f'(0) = 0$.
Piecewise Differentiability Bfd81D
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.