Solve equations linear with graphs