I did not write a separate function for almost linear. If you see this is implemented in ode_1st_linear, so there has to be a match. I just added another term u in match, since it will be a linear diff equation in u . Ive just extended the support provided by 1st_linear equations to almost-linear equations.