If f’(x) = a sin x + b cos x and f’(0) = 4, f(0) = 3, , find f(x).
Given f’(x) = a sin x + b cos x and f’(0) = 4
On substituting x = 0 in f’(x), we get
f’(0) = asin0 + bcos0
⇒ 4 = a × 0 + b × 1
⇒ 4 = 0 + b
∴ b = 4
Hence, f’(x) = a sin x + 4 cos x
On integrating this equation, we have
We know
Recall and
On substituting x = 0 in f(x), we get
f(0) = –acos0 + 4sin0 + c
⇒ 3 = –a × 1 + 4 × 0 + c
⇒ 3 = –a + c
⇒ c – a = 3 -------------- (1)
On substituting in f(x), we get
⇒ 5 = –a × 0 + 4 × 1 + c
⇒ 5 = 0 + 4 + c
⇒ 5 = 4 + c
∴ c = 1
On substituting c = 1 in equation (1), we get
1 – a = 3
⇒ a = 1 – 3
∴ a = –2
On substituting the values of c and a in f(x), we get
f(x) = –(–2)cos x + 4sinx + 1
∴ f(x) = 2cosx + 4sinx + 1
Thus, f(x) = 2cosx + 4sinx + 1