f′(x)=asinx+bcosx ...(i) Put x=0 f′(0)=asin(0)+bcos(0) 4=a(0)+(b)(1)[∵f′(0)=4] ∴b=4 From Eq. (i), f′(x)=asinx+bcosx Integrating on both sides. ∫f′(x)dx=∫(asinx+bcosx)dx f(x)=a(−cosx)+b(sinx)+c ....(ii) Put x=0 in Eq. (ii), f(0)=a(−cos0)+bsin(0)+C 3=−a+C[∵f(0)=3] ∴−a+c=3....(iii) Put x=
π
2
in Eq. (ii) f(
π
2
)=a(−cos
π
2
)+b(sin
π
2
)+C 5=a(0)+b(1)+c[∵f(
π
2
)=5] b+c=5 4+c=5[∵b=4] C=1 From Eq. (iii), −a+1=3⇒a=−2 From Eq. (ii), f(x)=(−2)(−cosx)+4(sinx)+1 f(x)=2cosx+4sinx+1