Solution to second order linear differential equation with only second order differential has 2 trial solutions? $$ m\frac {d^{2}y}{d^{2}x} = 1 $$
homogenous linear equation for this ode is 
$$ m\frac {d^{2}y}{d^{2}x} = 0 $$
trial solution is $Ae^{kx}$ but clearly in this case $Bx+C$ is a trial solution that works. What is the logic behind having 2 trial solutions only in this case? For every other problem I only guess the exponential solution.

The solution $Bx+C$ is a limit for the combination of the solutions $Ae^{\pm \omega\,x}$, when $\omega \,\to \,0$.
In fact, when you consider the general linear 2nd order ODE
$$
m{{d^2 y} \over {d^2 t}} + r{{dy} \over {dt}} + ky = 0
$$
and write the general solution to it, in case of an under-damped system, as
$$
\eqalign{
  & f(t) = c_{\,1} e^{\,\rho \,t + i\,\omega \,t}  + c_{\,2} e^{\,\rho \,t - i\,\omega \,t}
          = \left( {c_{\,1} e^{\,i\,\omega \,t}  + c_{\,2} e^{\, - i\,\omega \,t} } \right)e^{\,\rho \,t}  =   \cr 
  &  = \left( {a\cos \,\left( {\omega \,t} \right) + b\sin \,\left( {\omega \,t} \right)} \right)e^{\,\rho \,t}  \cr} 
$$
where
$$
\omega  = \sqrt {k/m - \left( {r/\left( {2m} \right)} \right)^2 } \quad \quad \rho  = r/\left( {2m} \right)
$$
and impose the initial conditions, for instance for  $f(0)$ and $f'(0)$, you get
$$
\left\{ \matrix{
  f(0) = a \hfill \cr 
  f'(0) = \,\,b\omega  + \rho a\quad  \Rightarrow \quad b = \;{1 \over \omega }\left( {f'(0) - \,\,\rho f(0)} \right) \hfill \cr}  \right.
$$
so
$$
f(t) = \left( {f(0)\cos \,\left( {\omega \,t} \right) + {1 \over \omega }\left( {f'(0) - \,\,\rho f(0)} \right)\sin \,\left( {\omega \,t} \right)} \right)e^{\,\rho \,t} 
$$
Now, if the damping approaches the critical value, that is $\omega \to 0$, then
$$ \bbox[lightyellow] {  
\mathop {\lim }\limits_{\omega \, \to \,0} f(t) = \left( {f(0) + \left( {f'(0) - \,\,\rho f(0)} \right)t} \right)e^{\,\rho \,t} 
}$$
and when also $\rho$ (that is $r$) approaches $0$ you get the $Bt+C$.
Same if considering an over-damped system as explained in this related post.
