solving this second order ode

First, solve the homogeneous differential equation which is of Euler differential equation type and has a solution

$$ y \left( x \right) ={c_1}\, \left( x-k \right) ^{3}+{c_2}\, \left( x-k \right) ^{4}.$$

So, the fundamental set of solutions is given by $ \left\{ \left( x-k \right) ^{3},\left( x-k \right) ^{4} \right\}. $

You can see that the solutions are linearly independent, since the Wronskian is $-(k-x)^6$. Now just advance with the method of variation of parameters to find the particular solution.


If that is not cheating, you could try a computer algebra package, like maxima. At least to help with the "algebra mess" you mention.