desolve() with decimals
|
10-25-2019, 07:21 PM
Post: #1
|
|||
|
|||
desolve() with decimals
When solving differential equations, this works:
desolve((y' = a*(b-y)^2-c) AND (y(0) = 0),x,y)|a>0,b>0,c>0 or when using specific values desolve((y' = a*(b-y)^2-c) AND (y(0) = 0),x,y)|a=3,b=5,c=7 but if decimals are used (in physics), desolve((y' = a*(b-y)^2-c) AND (y(0) = 0),x,y)|a=3.1,b=5.2,c=7.3 then no solution is found. For some Diff Eq, using decimals works fine, such as this (with no square term) desolve((y' = a*(b-y)-c) AND (y(0) = 0),x,y)|a=3.1,b=5.2,c=7.3 but for others it does not. Is using decimals something that should be avoided, or is this suppose to work? I know I can work around the issue by either converting to exact fractions such as 3.1=31/10 or 0.12345=12345/100000 but that can get awkward for longer decimals. Or I can take the result of desolve((y' = a*(b-y)^2-c) AND (y(0) = 0),x,y)|a>0,b>0,c>0 and evaluate the result at a=3.1,b=5.2,c=7.3, but I was wondering if there was a better way of handling this. |
|||
10-26-2019, 06:32 AM
Post: #2
|
|||
|
|||
RE: desolve() with decimals
If you are using floating point coefficients, solving for initial conditions is not the same as with exact coefficients. And unfortunately, using | interfers with desolve auto-quote mechanism for a,b,c evaluation.
I'll try to improve this, but I'm not certain it will work. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)