Discussion:
A Maxima function for solving initial value problems with adaptive step size and error control.
Panagiotis Papasotiriou
2011-10-24 21:12:39 UTC
Permalink
Dear community,

I have written a Maxima package for solving initial value problems. The
package implements a Maxima function called rkf45, which is an
implementation of the Runge-Kutta-Fehlberg method of 4th-5th order. It
provides adaptive step size and error control, which is something that is
currently missing in Maxima. The user doesn't need to care about the
integration step, as it is selected by the algorithm itself, so that the
error in solution returned should be smaller that a user-specified absolute
tolerance.
I have tested the function thoroughly, and it works very well. Although my
tries to translate the package failed so far (discussion about that is
already in the list,) the non-translated version is still very fast.
rkf45 comes with extensive documentation; in a 40-pages pdf file, the syntax
and several examples (for both non-stiff and stiff problems) are discussed
in detail.

Anyone who is interested on differential equations, please use the function,
if possible to solve difficult initial value problems (but not extremely
stiff, as the function implements an explicit method, and, as such, it is
not specifically designed for such kind of problems.) You should be able to
solve difficult problems easily. Any remarks or suggestions are more than
welcome.

I believe it would be nice if the function is added to maxima/share, as it
provides functionality not available in Maxima.

All necessary files can be found in my little website, at
https://sites.google.com/site/pjpapasot/maxima/libraries/rkf45
You will find the package itself, a demo file, and the documentation.
dlakelan
2011-10-25 04:27:03 UTC
Permalink
Post by Panagiotis Papasotiriou
Dear community,
I have written a Maxima package for solving initial value problems. The
package implements a Maxima function called rkf45, which is an
implementation of the Runge-Kutta-Fehlberg method of 4th-5th order.
...

Thank you very much for this contribution to Maxima, I hope one of the
maxima developers will include it into the standard distribution as a
shared package. However, rather than having a rkf45 specific share
package, perhaps we should create a "numode" or other package named
after the type of problem, where we can put several related numerical
differential equation codes. For example perhaps the next task someone
will take on will be some kind of implicit scheme for stiff systems, or
someone else will produce boundary value problem solvers.

Organizing shared code by the task they solve rather than the method
used helps the naive user to find the code.

Again thanks for your contribution, I'm sure I will have occasion to use
this code soon.
Raymond Toy
2011-10-25 05:15:28 UTC
Permalink
Post by dlakelan
Post by Panagiotis Papasotiriou
Dear community,
I have written a Maxima package for solving initial value problems. The
package implements a Maxima function called rkf45, which is an
implementation of the Runge-Kutta-Fehlberg method of 4th-5th order.
...
Thank you very much for this contribution to Maxima, I hope one of the
maxima developers will include it into the standard distribution as a
shared package. However, rather than having a rkf45 specific share
package, perhaps we should create a "numode" or other package named
after the type of problem, where we can put several related numerical
differential equation codes. For example perhaps the next task someone
will take on will be some kind of implicit scheme for stiff systems, or
someone else will produce boundary value problem solvers.
colnew will do boundary value problems. This is already included in maxima.

I have a translation via f2cl of odepack, which can do stiff odes. This
is not in maxima but could be.
Post by dlakelan
Organizing shared code by the task they solve rather than the method
used helps the naive user to find the code.
It's unfortunate that ?? doesn't work with share packages. Then
appropriately named share packages could be found.

Ray
Panagiotis Papasotiriou
2011-10-25 06:36:13 UTC
Permalink
Post by Raymond Toy
I have a translation via f2cl of odepack, which can do stiff odes. This
is not in maxima but could be.
Odepack is an excellent package. It would be really useful if we could use
it in Maxima, but a simplifying interface would also be needed, as Odepack
subroutines accept a big amount of arguments, but many of them can be set
automatically, so the user doesn't need to bother about them. Interface
should also provide optional arguments for full functionality. I am very
familiar with Odepack and I think I can implement the interfacing function,
if needed.
Panagiotis Papasotiriou
2011-10-26 07:51:49 UTC
Permalink
Yes, an easy-to-user interface is needed. I've never used odepack for
anything so your experience will help a lot in getting a nice interface.
When I get around to adding this to maxima, I'll ask you to help with
designing a nice interface and with testing if you don't mind.
I don't mind at all. I've already written a Fortran 90 interface for
DLSODAR, the most powerful subroutine included in Odepack; optional
arguments are used for many things, and error messages, if any, are printed
in text form, instead of the "flag" integer returned by Odepack Converting
that interface to a Maxima function should be easy. Interfaces for other
subroutines included in Odepack should be easy to implement as well.
Panagiotis Papasotiriou
2011-10-25 06:25:04 UTC
Permalink
Post by dlakelan
Post by Panagiotis Papasotiriou
Dear community,
I have written a Maxima package for solving initial value problems. The
package implements a Maxima function called rkf45, which is an
implementation of the Runge-Kutta-Fehlberg method of 4th-5th order.
...
Thank you very much for this contribution to Maxima, I hope one of the
maxima developers will include it into the standard distribution as a
shared package. However, rather than having a rkf45 specific share
package, perhaps we should create a "numode" or other package named
after the type of problem, where we can put several related numerical
differential equation codes. For example perhaps the next task someone
will take on will be some kind of implicit scheme for stiff systems, or
someone else will produce boundary value problem solvers.
These are actually in my plans for the near future. Specifically, I am
planning to implement:

(1) An improved function for cubic spline interpolation (this is more or
less necessary after solving differential equations.) It should support
"not-a-knot", "quadratic", "prolonged", "clamped", and "natural" splines
(the latter is not really useful in most cases, but it is traditionally used
a lot, although it shouldn't be.) this function should also be able to
differentiate or integrate the interpolating functions. This task will also
need a numerical method for solving tridiagonal systems of equations.

(2) An easy-to-use function for solving boundary value problems by the
shooting method. This would also need several other things, such as LU
decomposition, Brent's method for computing the root of a function, and
Broyden's method for solving systems of non-linear equations (mnewton could
be used for that task, but I think Broyden's method is more appropriate. I'm
not a big fan of Newton methods, for several reasons.)

(3) A function for computing all the roots of a function within a given
interval, using the Kronecker-Picard theory. This would not be restricted to
polynomials.

Many other things are also in my plans, but with lower priority.
Post by dlakelan
Organizing shared code by the task they solve rather than the method
used helps the naive user to find the code.
I agree completely.
Post by dlakelan
Again thanks for your contribution, I'm sure I will have occasion to use
this code soon.
Thank you for your kind words.
Post by dlakelan
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
Robert Dodier
2011-10-25 15:05:28 UTC
Permalink
Post by Panagiotis Papasotiriou
I have written a Maxima package for solving initial value problems. The
package implements a Maxima function called rkf45, which is an
implementation of the Runge-Kutta-Fehlberg method of 4th-5th order.
I believe it would be nice if the function is added to maxima/share, as it
provides functionality not available in Maxima.
All necessary files can be found in my little website, at
https://sites.google.com/site/pjpapasot/maxima/libraries/rkf45
You will find the package itself, a demo file, and the documentation.
Panagiotis, thanks for your work on this topic.

I recommend that you put a copyright notice on each file and a
license statement. I recommend that the license be GPL (version
unstated), which is the same license under which Maxima is
distributed. These notices are important for any kind of distribution,
whether the package is included in Maxima or not.

Also, if the package is to be included in Maxima, it is very helpful
to have a list of test cases which can be evaluated by run_testsuite
or batch(..., test).

I am inclined to include the package in Maxima. Would others
care to chime in?

best

Robert Dodier
Stavros Macrakis
2011-10-25 15:11:23 UTC
Permalink
Panagioti,

Though I admit that I'm not a user of numerical integration routines, I do
want to thank you for your contribution!

I agree with Robert that we should add this functionality to share; a test
suite would indeed be a useful .

But I would recommend that you license the package under the LGPL, not the
GPL. LGPL is compatible with GPL, and protects *your* contribution, while
not constraining what other software it can be used with (e.g. commercial
Macsyma -- though the legal status of Maxima packages in GPL is somewhat
unclear).

-s
Post by Robert Dodier
Post by Panagiotis Papasotiriou
I have written a Maxima package for solving initial value problems. The
package implements a Maxima function called rkf45, which is an
implementation of the Runge-Kutta-Fehlberg method of 4th-5th order.
I believe it would be nice if the function is added to maxima/share, as
it
Post by Panagiotis Papasotiriou
provides functionality not available in Maxima.
All necessary files can be found in my little website, at
https://sites.google.com/site/pjpapasot/maxima/libraries/rkf45
You will find the package itself, a demo file, and the documentation.
Panagiotis, thanks for your work on this topic.
I recommend that you put a copyright notice on each file and a
license statement. I recommend that the license be GPL (version
unstated), which is the same license under which Maxima is
distributed. These notices are important for any kind of distribution,
whether the package is included in Maxima or not.
Also, if the package is to be included in Maxima, it is very helpful
to have a list of test cases which can be evaluated by run_testsuite
or batch(..., test).
I am inclined to include the package in Maxima. Would others
care to chime in?
best
Robert Dodier
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
Panagiotis Papasotiriou
2011-10-25 15:40:58 UTC
Permalink
Post by Stavros Macrakis
Panagioti,
Though I admit that I'm not a user of numerical integration routines, I do
want to thank you for your contribution!
Thank you Stavro.
We all have our favorite domain of interest. Personally, I like Maxima's
symbolic capabilities, both for research and for teaching (students seem to
get familiar with Maxima way easier than with Mathematica, for example.)
However, I would like to be able to use numerical methods within Maxima, and
I believe I can do something for it, as Numerical Analysis is my main domain
of interest.
Post by Stavros Macrakis
I agree with Robert that we should add this functionality to share; a test
suite would indeed be a useful .
Working on it.
Post by Stavros Macrakis
But I would recommend that you license the package under the LGPL, not the
GPL. LGPL is compatible with GPL, and protects *your* contribution, while
not constraining what other software it can be used with (e.g. commercial
Macsyma -- though the legal status of Maxima packages in GPL is somewhat
unclear).
I am confused now... LGPL or GPL?
Stavros Macrakis
2011-10-25 16:28:05 UTC
Permalink
Re GPL vs. LGPL etc.

It depends on your attitude towards your code.

If your primary goal is that the code be widely used, and you don't care
what others do with it (including incorporating it into proprietary
products), then you should use the least restrictive license that is
compatible with GPL, e.g. BSD, Apache, etc.

If your primary goal is to promote free software, and you want to discourage
people from using proprietary software (commercial Macsyma, Mathematica,
etc.) then you should use GPL.

If your primary goal is to keep your code and any improvements to it made by
anyone available to the community, then you should use LGPL.

I think that the above statements would be agreed to by the proponents of
any of the licenses I mention. The difference is what your goals are.

-s

On Tue, Oct 25, 2011 at 11:40, Panagiotis Papasotiriou <
Post by Panagiotis Papasotiriou
Post by Stavros Macrakis
Panagioti,
Though I admit that I'm not a user of numerical integration routines, I do
want to thank you for your contribution!
Thank you Stavro.
We all have our favorite domain of interest. Personally, I like Maxima's
symbolic capabilities, both for research and for teaching (students seem to
get familiar with Maxima way easier than with Mathematica, for example.)
However, I would like to be able to use numerical methods within Maxima, and
I believe I can do something for it, as Numerical Analysis is my main domain
of interest.
Post by Stavros Macrakis
I agree with Robert that we should add this functionality to share; a test
suite would indeed be a useful .
Working on it.
Post by Stavros Macrakis
But I would recommend that you license the package under the LGPL, not the
GPL. LGPL is compatible with GPL, and protects *your* contribution, while
not constraining what other software it can be used with (e.g. commercial
Macsyma -- though the legal status of Maxima packages in GPL is somewhat
unclear).
I am confused now... LGPL or GPL?
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
Panagiotis Papasotiriou
2011-10-25 17:18:03 UTC
Permalink
Post by Stavros Macrakis
Re GPL vs. LGPL etc.
It depends on your attitude towards your code.
If your primary goal is that the code be widely used, and you don't care
what others do with it (including incorporating it into proprietary
products), then you should use the least restrictive license that is
compatible with GPL, e.g. BSD, Apache, etc.
If your primary goal is to promote free software, and you want to
discourage people from using proprietary software (commercial Macsyma,
Mathematica, etc.) then you should use GPL.
If your primary goal is to keep your code and any improvements to it made
by anyone available to the community, then you should use LGPL.
I think that the above statements would be agreed to by the proponents of
any of the licenses I mention. The difference is what your goals are.
Stavro, very useful explanations, thank you. To be honest, I dislike
proprietary software, and strongly. On the other hand, I don't mind much
what others will do with my code. I guess I would follow the Maxima
"standard" license, although it seems a bit unclear what exactly it is.
Robert Dodier
2011-10-25 19:41:37 UTC
Permalink
I guess I would follow the Maxima "standard" license,
although it seems a bit unclear what exactly it is.
Bill Schelter requested from US Dept of Energy permission to
distribute Maxima under terms of GPL and received from them
a letter granting permission to do so; that is the DOE letter
linked on the Maxima web site.
So I think it is fair to say that the GPL is the standard
license for Maxima, although if we go into details, it is probably
not strictly necessary for non-compiled stuff.

Disclaimer: I am not a lawyer.

best, Robert Dodier
Stavros Macrakis
2011-10-25 20:47:51 UTC
Permalink
I disagree.

GPL is presumably the license for the things that Schelter added to DOE
Maxima; this is the meaning of the "Copyright ...by William Schelter" line
he added to the source files. Clearly he didn't hold the copyright to DOE
Maxima itself. DOE Maxima itself was made available by the DOE under the
GPL. It may or may not be available under other licenses as well (it may
even be in the public domain given copyright law at the time it was
originally written), but let's leave that aside for the moment.

In any case, there is absolutely no requirement that new share packages
which are not derived from existing code follow GPL. In fact, legally they
probably don't even need to be "free software" as long as they are simply
distributed along with Maxima, and not incorporated into distributed
binaries. As the maintainers of Maxima, we can certainly decide that we
will only publish in share code which has a free or open-source license; we
can even decide that we require a license which is compatible with GPL. But
this includes not just LGPL, but also many others. Code can also be
multi-licensed under both GPL *and* other licenses which can be incompatible
with GPL. Whether the code is compiled or not is irrelevant.

Robert likes GPL and considers it the "standard license" for share files,
but Robert does not decide for the developer community. In particular, I
would object to requiring share code to be licensed under GPL.

-s
Post by Robert Dodier
I guess I would follow the Maxima "standard" license,
although it seems a bit unclear what exactly it is.
Bill Schelter requested from US Dept of Energy permission to
distribute Maxima under terms of GPL and received from them
a letter granting permission to do so; that is the DOE letter
linked on the Maxima web site.
So I think it is fair to say that the GPL is the standard
license for Maxima, although if we go into details, it is probably
not strictly necessary for non-compiled stuff.
Disclaimer: I am not a lawyer.
best, Robert Dodier
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
Dan
2011-10-25 22:50:33 UTC
Permalink
Post by Stavros Macrakis
In any case, there is absolutely no requirement that new share packages
which are not derived from existing code follow GPL. In fact, legally they
probably don't even need to be "free software" as long as they are simply
distributed along with Maxima, and not incorporated into distributed
binaries.
... except that this creates some extra work to do, explaining to
recipients what they can and can't include in binaries that they later
redistribute.
Stavros Macrakis
2011-10-25 23:34:34 UTC
Permalink
Does anyone distribute Maxima binaries with share files preloaded? Seems
like a bad idea, since some share files change default behavior our are
incompatible among themselves...

-s
Post by Stavros Macrakis
In any case, there is absolutely no requirement that new share packages
Post by Stavros Macrakis
which are not derived from existing code follow GPL. In fact, legally they
probably don't even need to be "free software" as long as they are simply
distributed along with Maxima, and not incorporated into distributed
binaries.
... except that this creates some extra work to do, explaining to
recipients what they can and can't include in binaries that they later
redistribute.
______________________________**_________________
Maxima mailing list
http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>
Panagiotis Papasotiriou
2011-10-26 07:32:53 UTC
Permalink
Debian distributes Maxima without share files preloaded. However, share
files are destributed in a separate package, called "maxima-share", which is
marked as "recommended" by Debian's main maxima package. By default,
"recommended" packages are considered as dependencies, unless the user
chooses otherwise. So, for most users, installing maxima means that
maxima-share will be installed automatically, even if they are not aware of
it. Technically, share files are not preloaded though. You still need to
load a shared package before using it.

By the way, Debian still distributes Maxima 5.24.0, even in Debian "testing"
version, where they usually have up-to-date software. Not sure why they
didn't upgrade to 5.25, I guess it's because Maxima official site still
mentions 5.24 as the latest release. Does Maxima versioning system follows
the old convention (odd minor version numbers to denote development releases
and even minor version numbers to denote stable releases)?
Post by Stavros Macrakis
Does anyone distribute Maxima binaries with share files preloaded? Seems
like a bad idea, since some share files change default behavior our are
incompatible among themselves...
-s
Post by Stavros Macrakis
In any case, there is absolutely no requirement that new share packages
Post by Stavros Macrakis
which are not derived from existing code follow GPL. In fact, legally they
probably don't even need to be "free software" as long as they are simply
distributed along with Maxima, and not incorporated into distributed
binaries.
... except that this creates some extra work to do, explaining to
recipients what they can and can't include in binaries that they later
redistribute.
______________________________**_________________
Maxima mailing list
http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
Dan
2011-10-26 15:28:04 UTC
Permalink
Post by Stavros Macrakis
Does anyone distribute Maxima binaries with share files preloaded? Seems
like a bad idea, since some share files change default behavior our are
incompatible among themselves...
I don't know. I spoke because there was a mention of distributing, as
part of a generally free package, some chunks of source code which, if
compiled into a binary, would make it unlawful to distribute that
binary. That reminded me of the contortions Debian used to go through
to distribute Pine:
<http://lists.debian.org/debian-user/1999/11/msg00377.html>.
--
Kind regards,

Dan
Panagiotis Papasotiriou
2011-10-26 18:52:19 UTC
Permalink
I have added a copyright notice in rkf45, as requested. GPL license is
adopted, as I dislike proprietary software, so GPL seems a better choice
than LGPL (not to mention Maxima itself seems to be released in GPL.)
Also added a testsuite for rkf45. Expected results are obtained on a 64-bit
Debian GNU/Linux system, but I have tested it on a 32-bit system as well;
results differ slightly (I expected that), but the all tests are passed (I
needed to set float_approx_equal_tolerance to 2e-12 for that.)
The demo file was also upgraded, according to Maxima standards, and I took
the opportunity to do minor changes in the pdf documentation as well.

I think it is ready now. If it is going to be added in Maxima, I think the
best place is in share/numeric/. There is already a package there, called
"diffeq" which implements some simple numerical methods for solving
differential equations, but I think rkf45 should be put on a separate
package because implementation is completely different than that in diffeq.
It's up to you though.

I was told that the LaTeX source file for the pdf documentation will be
needed as well. If rkf45 is going to be added in share, I will post the
LaTeX source file as soon I will know where it is going to added (might need
to do minor changes depending on that.)

All necessary files can be downloaded from
https://sites.google.com/site/pjpapasot/maxima/libraries/rkf45
Robert Dodier
2011-10-29 18:22:06 UTC
Permalink
Post by Panagiotis Papasotiriou
All necessary files can be downloaded from
https://sites.google.com/site/pjpapasot/maxima/libraries/rkf45
Thanks a lot for your work. I;m sorry to keep harping on this,
but can you please put a copyright and license notice on each file?
(and in the text of documents such as pdf's, if there are any.)

Think of it this way. Suppose someone who wants to follow the
rules comes across a file that you created. If there is no copyright
or license notice, there are only limited things that person can do.
But if you inform that person of the greater rights you are granting
them, they can do much more. It is better to clearly state such
rights, rather than making the user try to guess what you meant.

It's probably true that there are some files in Maxima which don't
have proper notices on them. That is a defect to be corrected,
not something we want to extend to other works.

best

Robert Dodier
Panagiotis Papasotiriou
2011-10-29 21:07:54 UTC
Permalink
Post by Robert Dodier
Thanks a lot for your work. I;m sorry to keep harping on this,
but can you please put a copyright and license notice on each file?
(and in the text of documents such as pdf's, if there are any.)
Package file rkf45.mac already had a copyright notice in the beginning, as
you suggested a few days ago. I 've added a copyright notice in the pdf
documentation, as well.
Not sure what about the demo file and test suite. I had a look in share and
it seems no demo file or test suite there has any copyright notice, so I
guess it is not necessary, but correct me if I am wrong.

As usual, updated files are in
https://sites.google.com/site/pjpapasot/maxima/libraries/rkf45
Post by Robert Dodier
I recommend pretty strongly that you leave the foo=bar options as they are.
I don't think the location of the package matters in this respect.
I agree. Optional argument syntax is still foo=bar. Besides, that is what is
used by most packages, for example quad_qags.

Robert Dodier
2011-10-29 17:11:06 UTC
Permalink
I think we're mostly in agreement. I have some minor comments.
At this time, I don't have any recommendations to change what
we're doing. Disclaimer: I am not lawyer.
Post by Stavros Macrakis
In any case, there is absolutely no requirement that new share packages
which are not derived from existing code follow GPL.
Agreed.
Post by Stavros Macrakis
In fact, legally they probably don't even need to be "free software"
as long as they are simply distributed along with Maxima,
and not incorporated into distributed binaries.
I don't mean to go into a long discussion about this (since we are not
actually distributing such packages) but the question of whether or not
the license of the Maxima binary (GPL) pertains to the distribution of
Maxima + associated packages is quite murky: there are no clear
principles, no decided cases to refer to, and I've yet to come across
any qualified commentator who is willing to make a statement more
definite than "I don't know, you should hire a lawyer to figure it out."

Note that the situation of Maxima + packages is very similar
to Python + packages. Given that Python is more widely used, there
has been more discussion about licenses for Python packages;
that could be a source of inspiration and/or confusion for Maxima.
(Same goes for other interpreted languages.)
Post by Stavros Macrakis
As the maintainers of Maxima, we can certainly decide that we
will only publish in share code which has a free or open-source license; we
can even decide that we require a license which is compatible with GPL. But
this includes not just LGPL, but also many others.
Well, as long as we're using Sourceforge as a hosting service,
we are obligated to release stuff under a license which conforms to
their definition of free software. So given that, it's not entirely our choice.
But even so, there are several licenses to choose from.
Post by Stavros Macrakis
Code can also be multi-licensed under both GPL *and* other licenses
which can be incompatible with GPL.
Agreed, but I would recommend against it ... the situation is confusing
enough as it is.
Post by Stavros Macrakis
Whether the code is compiled or not is irrelevant.
Agreed, but (and again here is a point which is probably undecidable,
but luckily not in need of decision) the manner in which the compiled
code is distributed might be relevant. If all compiled bits are bound
into one image, the license for distribution of that image would be
(I suppose) somewhere in the intersection of each bit's license.
But otherwise, perhaps the collection could be considered a "mere
aggregation".
Post by Stavros Macrakis
Robert likes GPL and considers it the "standard license" for share files,
but Robert does not decide for the developer community.
Agreed. Let me add, though, that I don't have any absolute devotion
to GPL; it just seems like the most comprehensible thing to do in this
situation.
Post by Stavros Macrakis
In particular, I would object to requiring share code to be licensed under GPL.
OK by me. We just have to conform to the Sourceforge requirement
for free software licenses.

best

Robert Dodier
Richard Fateman
2011-10-25 21:40:50 UTC
Permalink
Post by Robert Dodier
I guess I would follow the Maxima "standard" license,
although it seems a bit unclear what exactly it is.
Bill Schelter requested from US Dept of Energy permission to
distribute Maxima under terms of GPL and received from them
a letter granting permission to do so; that is the DOE letter
linked on the Maxima web site.
So I think it is fair to say that the GPL is the standard
license for Maxima, although if we go into details, it is probably
not strictly necessary for non-compiled stuff.
Disclaimer: I am not a lawyer.
best, Robert Dodier
_______________________________________________
Maxima mailing list
http://www.math.utexas.edu/mailman/listinfo/maxima
This does not tell you how to declare ownership of your code. It just
says that for convenient source code distribution with Maxima, it should
be possible to redistribute your code under GPL.

Other agreements such as BSD, are less restrictive and essentially say
that you can distribute this stuff any way you want, to anyone. I find
GPL to be annoying because commercial entities sometimes refuse to take
such code.

I can give code to Maxima under BSD and it can be redistributed under
GPL, but I could also then give the code to (say) Boeing and they can
use it too. If I declare my code to be available ONLY under GPL then
Boeing (or some other company) may refuse it.

It is possible to say your code is available under BSD or GPL, I
suppose. But I am not a lawyer either.

RJF
Stavros Macrakis
2011-10-25 21:44:14 UTC
Permalink
...It is possible to say your code is available under BSD or GPL, I
suppose. But I am not a lawyer either.
I am not a lawyer either, but multi-licensing is perfectly fine. You are
simply saying: "I license this to you under license A, B, or C -- your
choice".

-s
Hugo Coolens
2011-10-26 09:12:14 UTC
Permalink
I thought the following expression would evaluate as U_B, but it doesn't

limit((1/T)*integrate(U_B*(1-e^(-t/tau)), t, 0, T),T,inf,plus);

maybe someone here can tell me how to proceed correctly.

thanks in advance
hugo
Panagiotis Papasotiriou
2011-10-26 09:53:36 UTC
Permalink
Post by Hugo Coolens
I thought the following expression would evaluate as U_B, but it doesn't
limit((1/T)*integrate(U_B*(1-**e^(-t/tau)), t, 0, T),T,inf,plus);
maybe someone here can tell me how to proceed correctly.
thanks in advance
hugo
You are missing a "%" before "e^(-t/tau)", and thus Maxima treats e as an
arbitrary variable, not the mathematical constant e=2.71828... Use

limit((1/T)*integrate(U_B*(1-%e^(-t/tau)), t, 0, T),T,inf,plus);

Maxima will then ask you if tau is positive or negative; Answer "positive",
and you will get the result you are looking for. Another way is to type:

assume(tau>0);
limit((1/T)*integrate(U_B*(1-%e^(-t/tau)), t, 0, T),T,inf,plus);

so that you won't asked about tau.
Panagiotis Papasotiriou
2011-10-26 11:49:47 UTC
Permalink
Welcome to Maxima.
Thank you very much for the help offered
sincerely,
hugo
Post by Hugo Coolens
I thought the following expression would evaluate as U_B, but it doesn't
limit((1/T)*integrate(U_B*(1-**e^(-t/tau)), t, 0,
T),T,inf,plus);
maybe someone here can tell me how to proceed correctly.
thanks in advance
hugo
You are missing a "%" before "e^(-t/tau)", and thus Maxima treats e as an
arbitrary variable, not the mathematical constant e=2.71828... Use
limit((1/T)*integrate(U_B*(1-%**e^(-t/tau)), t, 0, T),T,inf,plus);
Maxima will then ask you if tau is positive or negative; Answer
"positive", and you will get the result you are looking for. Another way
assume(tau>0);
limit((1/T)*integrate(U_B*(1-%**e^(-t/tau)), t, 0, T),T,inf,plus);
so that you won't asked about tau.
Panagiotis Papasotiriou
2011-10-25 15:32:00 UTC
Permalink
Post by Robert Dodier
I recommend that you put a copyright notice on each file and a
license statement. I recommend that the license be GPL (version
unstated), which is the same license under which Maxima is
distributed. These notices are important for any kind of distribution,
whether the package is included in Maxima or not.
In my website it is already stated that this package (and all future
packages I am planning to implement) are released under GPL (unstated
version) and the accompanying pdf documentation is under GFDL (also unstated
version.) I didn't put a copyright notice on each file, because I saw other
packages, already included in maxima/share, without any particular notice.
However, I'll do as you said. Thank you for your kind words and the
information.
Post by Robert Dodier
Also, if the package is to be included in Maxima, it is very helpful
to have a list of test cases which can be evaluated by run_testsuite
or batch(..., test).
I've already added the file rkf45.dem, demonstrating the use of rkf45 in
four representative cases. More examples are included in the pdf
documentation, where they are discussed in detail. A testsuite sounds good
though. I will need to figure out how exactly such a testsuite is
implemented, but I guess it won't take long.
Post by Robert Dodier
I am inclined to include the package in Maxima. Would others
care to chime in?
I would be happy to contribute in Maxima.
Jaime Villate
2011-10-25 15:57:26 UTC
Permalink
Post by Robert Dodier
I am inclined to include the package in Maxima. Would others
care to chime in?
It could be added to the current rk package in which it is based. If
Panagiotis agrees, I could incorporate it as part of rk, to be used when
an option adaptive45 (or something similar) was given.

One thing I would change though, is the "option = value" syntax. I find
it confusing for the users to mix the two different option syntaxes
"[option, value]" and "option: value" in the same package.

Also, the documentation is very nice, but in order to be incorporated
into Maxima, we would need the LaTeX source file.

Thanking Panagiotis for his contribution,
best regards,
Jaime
Panagiotis Papasotiriou
2011-10-25 17:09:30 UTC
Permalink
Post by Jaime Villate
It could be added to the current rk package in which it is based. If
Panagiotis agrees, I could incorporate it as part of rk, to be used when an
option adaptive45 (or something similar) was given.
Actually, rkf45 is not based on rk; I tried to keep it compatible with rk's
syntax to avoid confusion for new users, and of course both rk and rkf45 are
implementing Runge-Kutta methods, but otherwise their implementation has
little in common.
If rkf45 is included in share, rk could still be useful for educational
purposes (teaching students about the original Runge-Kutta method of fourth
order, and using rk for examples of use.) Otherwise, rkf45 should be used
for real work. I believe we should keep them separated, as it is the case in
most Numerical Analysis packages I am aware of. If, however, you decide
otherwise, I think rkf45 should be the default, and rk should be used if an
option "nonadaptive" (or something similar) was given.
Post by Jaime Villate
One thing I would change though, is the "option = value" syntax. I find it
confusing for the users to mix the two different option syntaxes "[option,
value]" and "option: value" in the same package.
rk itself has no optional arguments, but other functions in dynamics.mac do.
I have seen other packages using the "option=value" syntax, instead of
[option,value]. Although I personally like the "option=value" syntax, this
is indeed confusing for new users, considering that one of the most used
functions, plot2d, adopts the "[option,value]" syntax. It depends on where
rkf45 will be put, I guess. If rkf45 is to be included in dynamics.mac, then
I should definitely change the syntax for optional arguments, as Jaime
suggested. To be honest though, I think that a more appropriate place for
putting rkf45 would be share/numeric. It's up to you anyway.
Post by Jaime Villate
Also, the documentation is very nice, but in order to be incorporated into
Maxima, we would need the LaTeX source file.
No problem about the LaTeX source file, I will post it as soon as we fix the
details (might need minor changes, depending on how rkf45 will be included
in /share.)
Post by Jaime Villate
Thanking Panagiotis for his contribution,
Thank you Jaime.
Jaime Villate
2011-10-26 08:18:54 UTC
Permalink
Post by Panagiotis Papasotiriou
Actually, rkf45 is not based on rk; I tried to keep it compatible with
rk's syntax to avoid confusion for new users, and of course both rk
and rkf45 are implementing Runge-Kutta methods, but otherwise their
implementation has little in common.
If rkf45 is included in share, rk could still be useful for
educational purposes (teaching students about the original Runge-Kutta
method of fourth order, and using rk for examples of use.) Otherwise,
rkf45 should be used for real work. I believe we should keep them
separated, as it is the case in most Numerical Analysis packages I am
aware of.
OK, I do not have any objections then.
I should also point out at that in future releases rk and plotdf will be
more related to each other, once I figure out an efficient way to pass
data among themselves. plotdf already uses an adaptive step-size and it
can also use Adams-Moulton instead of Runge-Kutta (even though it is
currently disabled due to some upstanding bugs).

Regards,
Jaime
Robert Dodier
2011-10-29 16:30:48 UTC
Permalink
Post by Panagiotis Papasotiriou
Post by Jaime Villate
One thing I would change though, is the "option = value" syntax. I find it
confusing for the users to mix the two different option syntaxes "[option,
value]" and "option: value" in the same package.
The use of [foo, bar] options in plot2d is an unfortunate relic
which I won't try to change at this time, but let's keep it from
infiltrating other code.
Post by Panagiotis Papasotiriou
rk itself has no optional arguments, but other functions in dynamics.mac do.
I have seen other packages using the "option=value" syntax, instead of
[option,value]. Although I personally like the "option=value" syntax, this
is indeed confusing for new users, considering that one of the most used
functions, plot2d, adopts the "[option,value]" syntax. It depends on where
rkf45 will be put, I guess. If rkf45 is to be included in dynamics.mac, then
I should definitely change the syntax for optional arguments, as Jaime
suggested. To be honest though, I think that a more appropriate place for
putting rkf45 would be share/numeric. It's up to you anyway.
I recommend pretty strongly that you leave the foo=bar options as they are.
I don't think the location of the package matters in this respect.

best,

Robert Dodier
Loading...