If $f^{\prime}(x)=k(\cos x+\sin x)$ and $f(0)=9, f\left(\frac{\pi}{2}\right)=15$, then $f(x)=$

If $f^{\prime}(x)=k(\cos x+\sin x)$ and $f(0)=9, f\left(\frac{\pi}{2}\right)=15$, then $f(x)=$
  1. $3(\sin x-\cos x)+12$
  2. $3(\sin x-\cos x)-12$
  3. $3(\sin x+\cos x)+12$
  4. $3(\cos x+\sin x)-12$

Solution

$f^{\prime}(x)=k(\cos x+\sin x)$ On integrating both sides, we get $f(x)=k(\sin x-\cos x)+C$ $f(0)=k(0-1)+C$ $f(0)=-k+C \Rightarrow-k+C=9$ ...(1) Also $f\left(\frac{\pi}{2}\right)=k\left(\sin \frac{\pi}{2}-\cos \frac{\pi}{2}\right)+C$ $15=k+C$ ...(2) Adding (1) $\&(2)$ we get $2 C=24 \Rightarrow C=12 \Rightarrow k=3$ $\therefore f(x)=3(\sin x-\cos x)+12$

Asked in: MHT CET 2020 (12 Oct Shift 2)

Practice more Indefinite Integration questions on Aicharya