Select the correct answer from the given alternative:

If f(x) `{:( = x^2 + sin x + 1, "for" x ≤ 0),(= x^2 - 2x + 1, "for" x ≤ 0):}` then

#### Options

f is continuous at x = 0, but not differentiable at x = 0

f is neither continuous nor differentiable at x = 0

f is not continuous at x = 0, but differentiable at x = 0

f is both continuous and differentiable at x = 0

#### Solution

**f is continuous at x = 0, but not differentiable at x = 0**

**Explanation;**

f(x) `{:( = x^2 + sin x + 1,"," x ≤ 0),(= x^2 - 2x + 1,"," x ≤ 0):}`

`lim_(x -> 0^-) "f"(x) = lim_(x -> 0^-) (x^2 + sinx + 1)` = 0 + 0 + 1 = 1

`lim_(x -> 0^+) "f"(x) = lim_(x -> 0^+) (x^2 - 2x + 1)` = 0 – 0 + 1 = 1

∴ f is continuous at x = 0

Lf'(0) = `lim_("h" -> 0^-) ("f"(0 + "h") - "f"(0))/"h"`

= `lim_("h" -> 0^-) ("h"^2 + sin "h" + 1 - (0 + 0 + 1))/"h"`

= `lim_("h" -> 0^-) ("h" + sin"h"/"h")` = 0 + 1 = 1

Rf'(0) = `lim_("h" -> 0^+) ("f"(0 + "h") - "f"(0))/"h"`

= `lim_("h" -> 0^+) ("h"^2 - 2"h" + 1 - 1)/"h"`

= `lim_("h" -> 0) ("h" - 2)`

= – 2

∵ Rf'(0) ≠ Lf'(0)

∴ f is not differentiable at x = 0.