Find the values of p and q that make function f(x) differentiable everywhere on R

f(x) `{:( = 3 - x"," , "for" x < 1),(= "p"x^2 + "q"x",", "for" x ≥ 1):}`

#### Solution

f is differentiable on R and hence f is differentiable at x = 1.

∴ Lf'(1) = Rf'(1) ...(1)

f(x) = px^{2} + qx, for x ≥ 1

∴ f(1) = p(1)^{2} + q(1) = p + q

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

= `lim_("h" -> 0) ([3 - (1 + "h")] - ["p" + "q"])/"h"` ...[∵ f(x) = 3 – x, for x < 1]

= `lim_("h" -> 0) (2 - "h" - "p" - "q")/"h"`

= `lim_("h" -> 0) ((2 - "p" - "q") - "h")/"h"`

∵ Lf'(1) exists, we must have

2 – p – q = 0 i.e. p + q = 2 ...(2)

∴ Lf'(1) = `lim_("h" -> 0) (-"h")/"h"`

= `lim_("h" -> 0) ( - 1)` ...[∵ h → 0, ∴ h ≠ 0]

= – 1

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

= `lim_("h" -> 0) (["p"(1 + "h")^2 + "q"(1 + "h")] - ["p" + "q"])/"h"` ...[∵ f(x) = px^{2} + qx, for x ≥ 1]

= `lim_("h" -> 0) ("p" + 2"ph" + "ph"^2 + "q" + "qh" - "p" - "q")/"h"`

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

= `lim_("h" -> 0) ("h"[2"p" + "ph" + "q"])/"h"`

= `lim_("h" -> 0) [2"p" + "ph" + "q"]` ...[∵ h → 0, ∴ h ≠ 0]

= 2p + 0 + q

= 2p + q

∴ 2p + q = – 1 ...[By (1)]

∴ 2p + (2 – p) = – 1 ..,[By (2)]

∴ p = – 3

Substituting the value of p in (2), we get

∴ – 3 + q = 2

∴ q = 5

Hence, p = – 3, q = 5.