Question: Solving an ODE with `if`statement

I have the following terms: >

a := .178131; 0.178131 >

e := -0.6814e-1*`if`(t = 0, 6, `if`(t = 1, 10, `if`(t = 2, 15, `if`(t = 3, 20, NULL))));

 f := 0.16242e-1*`if`(t = 0, 6, `if`(t = 1, 10, `if`(t = 2, 15, `if`(t = 3, 20, NULL))))^1.5;

The ODE is:

sol1 := eval(('dsolve')([diff(Log10S(t), t) = -(a+b+c)*n*(-Log10S(t)/(a+b+c))^((n-1)/n), Log10S(0) = -0.1e-3], numeric), [a = .178131, e = -0.6814e-1*`if`(t = 0, 6, `if`(t = 1, 10, `if`(t = 2, 15, `if`(t = 3, 20, NULL)))), f = 0.16242e-1*`if`(t = 0, 6, `if`(t = 1, 10, `if`(t = 2, 15, `if`(t = 3, 20, NULL))))^1.5])

When I try to solve I get:

Error, invalid input: diff received 2, which is not valid for its 2nd argument

sol1(1); Error, (in sol1) cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up. I appreciate your help.

Please Wait...