10-25-2019, 07:21 PM
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.
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.