|
From: Richard F. <fa...@gm...> - 2021-02-28 21:18:41
|
I suppose there is a better mathematical approach to this.
Let us say, solve(sin(y)=0,y) returns
y=%k1*%pi
[right now it returns y=0, with a warning about arctrig functions]
a better solution might be some kind of set notation
{ k*%pi | k in Integers}
or some kind of quantified phrase like
for every k in Integers, k*%pi
the downside of producing such expressions is that they would not be
handled by the
rest of Maxima without lots of additional programming. Like figuring
out sums and products etc.
Another thought, is we already have expressions with bound variables
that might confuse testing.
For instance, sum(f(i),i,1,inf) is "equal" to sum(f(j),j,1,inf)
mathematically, but not to Maxima.
RJf
On 2/28/21 6:49 AM, Gunter Königsmann wrote:
> If it is different constants I would prefer it to have a different
> name. %k67 is therefore fine to me even though I know that this means
> my code has to be prepared that a change at the beginning of the file
> might make it a %k68.
>
> Am 27. Februar 2021 17:41:32 MEZ schrieb Robert Dodier
> <rob...@gm...>:
>
> 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
> ------------------------------------------------------------------------
> Maxima-discuss mailing list
> Max...@li...
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss <https://lists.sourceforge.net/lists/listinfo/maxima-discuss>
>
>
> --
> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
>
>
> _______________________________________________
> Maxima-discuss mailing list
> Max...@li...
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
|