public Equation parseEquation(String input) throws IncorrectODEEquationException
{
input = input.replace(" ", "");
String[] parts = input.split(",");
Equation equation = new Equation(parts[0]);
equation.setOrder(longestRun(parts[0], '\'', 1));
if (equation.getOrder() < parts.length - 1)
throw new IncorrectODEEquationException("lack of initial values");
List<String> init = new ArrayList<String>(parts.length - 1);
for (int i = 1; i < parts.length; i++)
init.add(parts[i]);
equation.setInitValues(parseInitialValues(init));
equation.setFunctionVariable(parseFunctionVariable(parts[0]));
equation.setIndependentVariable(parseIndependentVariable(parts[0], equation.getFunctionVariable()));
return equation;
}