Try this problem from IIT JAM 2017 exam (Problem 10).This problem needs the concept of Rolle's Theorem.
$$f(x)=\left\{\begin{array}{ll}1+x & \text { if } x<0 \\ (1-x)(p x+q) & \text { if } x \geq 0\end{array}\right.$$
satisfies the assumptions of Rolle's theorem in the interval $[-1,1],$ then the ordered pair $(p, q)$ is
Real Analysis
Continuity / Differentiability
 Mean-value theorem of differential calculus
Answer: $(2,1)$
IIT JAM 2017 , Problem 10
Real Analysis : Robert G. Bartle
Rolle's Theorem :
Let a function $f:[a, b] \rightarrow R$ be such that
Then there exists at least one point $c \in(a, b)$ such that $f^{\prime}(c)=0$
We can easily see that $3^{rd}$ assumption of Rolle's theorem is satisfied for $f(x)$ irrespective of the values of $p,q$.
Since $f(-1)=0=f(1)\quad \forall p,q$
Since $f(x)$ satisfies $1^{st}$ assumption, then
$\begin{aligned}& \quad \lim _{x \rightarrow 0^{-}} f(x)=\lim _{x \rightarrow 0^{+}} f(x)=f(0)\\&\text { ie, } \lim _{x \rightarrow 0^{-}}(1+x)=\lim _{x \rightarrow 0^{+}}(1-x)(px+q)=q\\&\Rightarrow 1=q\end{aligned}$
$L f^{\prime}(0)=R f^{\prime}(0) \cdots \cdots(*)$
$\begin{aligned} \text{Now, } L f^{\prime}(0) &=\lim _{h \rightarrow 0^{-}} \frac{f(0+h)-f(0)}{h} \\&=\lim _{h \rightarrow 0^{-}} \frac{(1+h)-q}{h} \\ &=\lim _{h \rightarrow 0^{-}} \frac{1+h-1}{h}[\text{because } q=1] \\&=\lim_{h \to 0^{-}} \frac hh\\&=1\end{aligned}$
$\begin{aligned}\text{and, } R f^{\prime}(0)&=\displaystyle\lim _{h \rightarrow 0^{+}} \frac{f(0+h)-f(0)}{h}\\&=\lim _{h \rightarrow 0^{+}} \frac{(1-h)\left(ph+q\right)-q}{h}\\&=\lim _{h \rightarrow 0^{+}} \frac{(1-h)(ph +1)-1}{h}\quad[\text{because } q=1]\\&=\lim _{h \rightarrow 0^{+}}\frac{ph+1- ph^{2}-h-1}{h}\\&=\lim _{h \rightarrow 0^{+}} \frac{h(p-ph-1)}{h}\\&=\lim_{h \ to 0^{+}} (p-ph-1)\\&=p-1\end{aligned}$
Then by $(*) \text{we have}, \quad P-1=1 \Rightarrow P=2$
Then order pair $(p,q)\equiv (2,1)$ [ANS]