Solving an ODE with `if`statement

March 12 2010 by cactus 14
false
Maple

0


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.

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account