|
From: Dimiter P. <dim...@gm...> - 2021-02-28 20:32:36
|
Hi Robert, The issue arose in multiple indefinite integration, which I then converted programmatically to definite integrals So I think that if ic1 is changed to signature ic(z(x)=%c-expr(x),x=x0,z(x)=0, [%c]) the problem will be solved. best regards, Dimiter On Sat, Feb 27, 2021 at 5:41 PM Robert Dodier <rob...@gm...> wrote: > On Sun, Feb 21, 2021 at 11:34 AM Dimiter Prodanov <dim...@gm...> > wrote: > > > ic1(z(x)=%c1-'integrate((z(u607)^2*(x-u607))/u607,u607,x,M),x=M,z(x)=0); > > crashes > > > however > > ic1(z(x)=%c-'integrate((z(u607)^2*(x-u607))/u607,u607,x,M),x=M,z(x)=0); > > > > returns > > z(x)=z(M)-integrate((z(u607)^2*x-u607*z(u607)^2)/u607,u607,x,M) > > > > So in my view, the symbol %c should not be hardcoded in ic1. > > Hi Dimiter, by the way, from where did %c1 appear? > > I've looked at this problem for a bit, and what I'm seeing is that the > ode2 code assumes throughout that constants are only named %c, %k1, or > %k2. It wouldn't be too hard to change that to numbered constants; > there is already a mechanism (integration_constant and > integration_constant_counter) to generate numbered constants in the > integration code. > > There are at least two problems introduced by that. The smaller one is > that the presence of numbered constants would probably make it harder > to check results automatically. OK, that can be fixed up without much > trouble. > > The larger one is that the results might seem messy to users. After a > while you'll get stuff like %k67*sin(x) + %k68*cos(x) and if you want > "nice" constants you'll have to reset integration_constant_counter. > That sounds painful. > > In some sense creating new constants is the right thing to do. Is it > sufficiently right to overcome the clumsiness of it? What does anyone > think about any of this stuff? > > best, > > Robert Dodier > |