For the given piece-wise definition we have
f(x)={k1(x−π)2−1,k2cosx,x≤πx>π
To be twice differentiable at the joining point x=π, the function itself, its first derivative and its second derivative must all be continuous there.
1. Continuity of the function at x=π
Left-hand value:
f(π−)=k1(π−π)2−1=k1⋅0−1=−1
Right-hand value:
f(π+)=k2cosπ=k2(−1)=−k2
For continuity we equate the two:
−1=−k2⟹k2=1
2. Continuity of the first derivative at x=π
First we write the standard differentiation formulas we will use:
• For xn we use dxd(xn)=nxn−1.
• For cosx we use dxd(cosx)=−sinx.
Left-hand derivative:
f′(x)=dxd(k1(x−π)2−1)=k1⋅2(x−π)=2k1(x−π)
Therefore
f′(π−)=2k1(π−π)=0
Right-hand derivative (using k2=1 already obtained):
f′(x)=dxd(k2cosx)=−k2sinx=−sinx
Hence
f′(π+)=−(sinπ)=0
Because both one-sided derivatives equal 0, the first derivative is continuous automatically for every k1 when k2=1. So we proceed to the second derivative.
3. Continuity of the second derivative at x=π
The second derivative on the left side is obtained by differentiating f′(x)=2k1(x−π) once more:
f′′(x)=dxd(2k1(x−π))=2k1
Thus
f′′(π−)=2k1
On the right side we differentiate f′(x)=−sinx again, recalling the formula dxd(sinx)=cosx and carrying the minus sign:
f′′(x)=dxd(−sinx)=−cosx
So
f′′(π+)=−(cosπ)=−(−1)=1
For the second derivative to be continuous we need
f′′(π−)=f′′(π+)⟹2k1=1
Solving this simple linear equation gives
k1=21
Combining the two conditions, we finally obtain
(k1,k2)=(21,1)
Hence, the correct answer is Option A.