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.
 A: (A solution with no square roots needed.)
$g'(k) = g''(k)$ gives
$$ 2ak+b = 2a $$
If $a=0$ then this forces $b=0$, $0 = g'(k) = 2a$ so $a=0$, and finally $g(k)=c=0$. In the degenerate case where $f$ and $g$ are zero everywhere, $k$ can be any number at all. The problem should have eliminated this case, to have an answer.
So for the rest, assume $a \neq 0$.
$$ k = 1 - \frac{b}{2a} $$
Then $g(k) = g''(k)$ gives
$$ a\left(1 - \frac{b}{a} + \frac{b^2}{4a^2}\right) + b\left(1-\frac{b}{2a}\right) + c = 2a $$
$$ a + c - \frac{b^2}{4a} = 2a $$
Substituting $c=a-b$,
$$ \frac{b^2}{4a} + b = 0 $$
So either $b=0$ or $\frac{b}{a} = -4$. If $b=0$, $k=1$. If $\frac{b}{a} = -4$, $k=3$. The largest possible value of $k$ (again excluding the $a=b=c=0$ case) is $k=3$.
A: $$g(x) = (b + c)x^2 + bx + c$$
$$g'(x) = 2(b + c)x + b$$
$$g''(x) = 2(b + c)$$
For $f$ to be continuous at $k$, we must have $g(k) = g'(k)$,
$$(b + c)k^2 + bk + c = 2(b + c)k + b$$
$$(b + c)k^2 + (- b - 2c)k + (c - b) = 0$$
$$k = \frac{b + 2c \pm \sqrt{(-b-2c)^2 - 4(b+c)(c-b)}}{2(b+c)}$$
$$k = \frac{b + 2c \pm \sqrt{5b^2+4bc}}{2(b+c)}$$
For $f$ to be differentiable at $k$, we must have $g'(k) = g''(k)$.
$$2(b + c)k + b = 2(b + c)$$
$$2(b + c)k = b + 2c$$
$$k = \frac{b + 2c}{2(b + c)}$$
Equating the two expressions for $k$ gives:
$$\frac{b + 2c \pm \sqrt{5b^2+4bc}}{2(b+c)} = \frac{b + 2c}{2(b + c)}$$
$$b + 2c \pm \sqrt{5b^2+4bc} = b + 2c$$
$$\pm \sqrt{5b^2+4bc} = 0$$
$$5b^2+4bc = 0$$
$$b(5b+4c) = 0$$
$$b = 0 \text{ or } b = -\frac{4c}{5}$$
If $b = 0$, then $k = \frac{2c}{2c} = 1$.
If $b = -\frac{4c}{5}$, then $k = \frac{-\frac{4c}{5} + 2c}{2(-\frac{4c}{5} + c)} = \frac{1.2c}{0.4c} = 3$.
So $k \in \{ 1, 3 \}$.  The maximum value in this set is 3.
A: The original question looks wrong or at least badly worded. From continuity and differentiability at $k$, one indeed gets $g(k)=g'(k)=g''(k)$.
First assume that $a\neq 0$ and therefore $b+c\neq 0$.
Solving the differentiability condition gives $k=1-\frac{b}{2a}=\frac{b+2c}{2b+2c}$, using $b+c=a$.
The continuity condition gives the degree two equation in $k$, $(b+c)k^2 -(b+2c)k+c-b=0$, with discriminant $\Delta=5b^2+4bc$. The solutions are $k_{1,2}=\frac{b+2c\pm \sqrt{5b^2+4bc}}{2b+2c}$.
Comparing the two conditions, assuming $b+c\neq 0$, the only way a $k$ can exist is if $5b^2+4bc=0$, i.e., $b=0$ or $c=-\frac{5b}{4}$.
If $b=0$, then the unique solution is $k=1-\frac{0}{2a}=1$.
If $c=-\frac{5b}{4}$, then again there is a unique solution $k=\frac{b-\frac{5b}{2}}{2(b-\frac{5b}{4})}=3$.
Finally, if $a=b+c=0$, then $g(x)=bx-b$ and the differentiability and continuity condition boils down to $bk-b=b=0$, so $f$ is differentiable if and only if $g\equiv0$. And then clearly any $k$ works.
A: 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$
A: Equating $g(x)$ and $g'(x)$ and using $c=a-b$ gives
$$ax^2+x(b-2a)=2b-a.$$
Completing the square:
$$(2ax+b-2a)^2=4a(2b-a)+(b-2a)^2=b^2+4ab.$$
We must have only one solution, that is $b=0$ or $b=-4a$.  From $(2ax+b-2a)^2=0$ we get $x = 1$ or $x = 3$.
