<s>[INST] If $g(x)=ax^2+bx+c$ and $f(x)= \begin{cases} {g(x)} & {x\ge k} \\ {g'(x)} & {x< k} \end{cases} $ , $\max (k)=?$ if $f$ is a differentiable function 
If $g(x)=ax^2+bx+c$ and $f(x)= \begin{cases} {g(x)} & {x\ge k} \\
 {g'(x)} & {x< k} \end{cases}  $. If $f(x)$ is a differentiable
function, what is the maximum value of $k$, provided that $b+c=a$?
$1)\frac34\qquad\qquad2)1\qquad\qquad3)3\qquad\qquad4)4$

In order to $f(x)$ be differentiable function, we should have $g(k)=g'(k)=g''(k)$,
$$ak^2+bk+c=2ak+b=2a$$ $$(b+c)k^2+bk+c=(2b+2c)k+b=2b+2c$$
Here for each equation I tried to equate the coefficients of $k^2 , k^1 , k^0$ but I get $a=b=c=0$ which doesn't make sense at all. I don't know how to continue form here.
 [/INST] Assume $a\neq 0$:
Statement 1:
$$ak^2+bk+c=2ak+b$$
$$ak^2+(b-2a)k+(c-b)=0$$
$$k=\frac{2a-b\pm\sqrt{b^2-4ab+4a^2+4ab-4ac}}{2a}$$
$$k=\frac{2a-b\pm\sqrt{b^2+4a^2-4ac}}{2a}$$
Statement 2:
$$2ak+b=2a$$
$$k=\frac{2a-b}{2a}$$
Statement 3, combining 1 and 2:
$$\frac{2a-b\pm\sqrt{b^2+4a^2-4ac}}{2a}=\frac{2a-b}{2a}$$
$$2a-b\pm\sqrt{b^2+4a^2-4ac}=2a-b$$
$$\sqrt{b^2+4a^2-4ac}=0$$
$$b^2+4a^2-4ac=0$$
Substituting $b=a-c$:
$$a^2-2ac+c^2+4a^2-4ac=0$$
$$5a^2-6ac+c^2=0$$
$$a=\frac{6c\pm\sqrt{36c^2-20c^2}}{10}$$
$$a=\frac{6c\pm4c}{10}$$
This gives two solutions, $a_+=c, a_-=\frac c5$
Then, $b_+=0, b_-=-\frac{4c}5$
We then solve using each of these values:
For $+$, we can substitute into statement $2$ and get that $k=1$, and the solution $g(x)=ax^2+a$ results in $f(x)$ being continuous and differentiable everywhere and satisfies $b+c=a$
For $-$, we substitute into statement $2$ and get that $k=1+\frac45c=1+4a$.  This gives us $g(x)=ax^2-4ax+5a, g'(x)=2ax-4a, g''(x)=2a$. As such, $g(k)=16a^3-8a^2+2a$, $g'(k)=8a^2-2a$, $g''(k)=2a$.  Solving $g'(k)=g''(x)$ gives $-a^2=\frac a2$, or possible solutions of $a=0$ and $a=\frac12$.  As we assumed $a\neq 0$, we have that $a=\frac 12$, which can easily be verified is also a solution for $g(k)=g'(k)$.  We then have $k=3$ and $g(x)=\frac 12 x^2 -2x+\frac 52$, which results in $f(x)$ being continuous and differentiable everywhere and satisfies $b+c=a$
Lastly, consider what if $a=0$.  In this case, $g(x)=bx+c$ and $g''(x)=0$, which means that in order for $f$ to be differentiable, $g'(k)=0$.  This means that $b=0$, and  therefore $g(x)=c$.  In order for $f$ to be continuous, this means that $c=0$ as well.
In answer to the question, if we allow $g(x)$ to be $0$ everywhere, then there is no maximum value of $k$ that makes $f$ differentiable everywhere.  If we restrict that there must be some value of $x$ for which $g(x)\neq0$, we
found two solutions for $g(x)$ and $k$ for which $f$ was continuous everywhere, and the greater value for $k$ was $3$
</s>