cobyla.texi.m4: Add hyperlinks and DOI to references. Hyperlink maxima files.
Remove stray comment string from colnew example 5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> No problem. Please follow up on the maxima-discuss list. On 2/09/2025 18:04, David J. López via Maxima-bugs wrote: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> Thank you for your quick and detailed answers, and for the article as well. Apologies for opening this ticket as a bug. [bugs:#4604] Floating point errors Status: not-a-bug Group: None Created: Mon Sep 01, 2025 08:07 AM UTC by David J. López Last Updated:...
Floating point errors
This is not a bug. It is the expected behavior of floating point arithmetic on any computer. maxima has a number of ways to address the issue you have reported. I suggest you ask specific questions on the Maxima discussion list You can refer to What every computer scientist should know about floating-point arithmetic for some background.
Fix malformed hyperlinks in "Examples for colnew"
I just tried on cygwin/clisp/windows11 with 5.47.0 and git head. Same results as Robert. (%i2) build_info(); (%o2) Maxima-version: "5.47.0" Maxima build date: "2023-06-25 17:16:51" Host type: "x86_64-pc-cygwin" Lisp implementation type: "CLISP" Lisp implementation version: "2.49+ (2010-07-17) (built on Walter [192.168.178.24])" User dir: "/home/dabilling/.maxima" Temp dir: "/tmp" Object dir: "/home/dabilling/.maxima/binary/5_47_0/clisp/2_49___2010_07_17___built_on_Walter__192_168_178_24__" Frontend:...
archive/configure is error by ubuntu20.04
I will close this as not-a-bug. If you still have problems ask on the maxima-discuss mailing list https://sourceforge.net/p/maxima/mailman/
Ignore everything in archive/. archive/configure dates from 2000-12-09 Follow the build instructions in INSTALL. Specifically try the "UNIX GNU AUTOTOOLS BUILD AND INSTALL" recipe cd to root of maxima source tree sh bootstrap ./configure make make check make install You will need a number of prerequisites installed to build the documentation, including recent texinfo and latex.
I will do this today. I am already making some small changes to the minpack documentation.
I will add a References section to the minpack section of the manual.
Corretly sort entry for bug #4355
Add A&S and DLMF links to Package contrib_ode documentation.
The function `antid` is listed in the category for derivatives
This is fixed in git master. Don't know when.
[bugs:#4355] documentation for trigvalue etc
documentation for trigvalue etc. should mention load(trigtools)
Fixed. There is, of course, more that could be done. Commit [e526957d0]
[bugs:#4355] documentation for trigvalue etc
[bugs:#4355] documentation for trigvalue etc
Add note that trigeval is preferred over trigvalue. Mention trigtools in the section Introduction to Trigonometric. Commits [e73da8f77] and [1d1373cb4]
Partially addressed with Commit: [9c531d]
[bugs:#4355] documentation for trigvalue etc
I added an example of this to the algsys documentation as 20.2.3 Example 2: Equations with irrational coefficients. Not much of a solution.
Trivial changes to documentation for Package Levin.
Annotate references for Package Levin.
Extend Example 1 for levin package documentation.
Rework Example 1 for Levin transforms so that update_examples script works.
Document contrib/share/levin package
problem with calculation of eigenvalues/eigenvectors
Need to improve the documentation to link between eigenvalue() and LAPACK routines. I thought we had done that.
Pavel, The eigenvalue() and eigenvector() functions in maxima solve the characteristic equation symbolically. Even a 4x4 matrix is a challenge. I can expand on this if you are interested. For floating-point inputs use the dgeev() function from the lapack package. The manual has examples.
Modified Bessel differential equation
Feature added with commit [106905]
ode2 now solves Modified Bessel differential equations.
Add routine to solve Modified Bessel differential equation to ode2.
Arfken, Weber and Harris, Mathematical Methods for Physicists 7th ed (2012) Section 14.5 covers the modified Bessel equation pretty well. I see the last line of function modifiedbessel2 should be return(y = %k1*bessel_i(nu,x-pt) + %k2*bessel_i(-nu,x-pt))))$ This is closer to the bessel2 function and eliminates the issue with ode_check - probably because it is correct. I will commit this in a day or two.
The last line of function modifiedbessel2 should read return(y = %k1*bessel_i(nu,x-pt) + %k2*bessel_k(nu,x-pt))))$ Case n=3/2 now works. It isn't simplified to zero by ode_check, but the result simplifies to zero numerically. This ode_check issue is [bug:#4392] (%i32) eq:mbde,n=3/2; (%o32) x^2*'diff(y,x,2)+x*'diff(y,x,1)+(-x^2-9/4)*y = 0 (%i33) s:ode2(eq,y,x); (%o33) y = bessel_k(3/2,x)*%k2+bessel_i(3/2,x)*%k1 (%i34) [method,r:ode_check(eq,s)]; (%o34) [modifiedbessel, (bessel_k(7/2,x)*%k2*x^2)/4-(bessel_k(3/2,x)*%k2*x^2)/2...
The last line of function modifiedbessel2 should read return(y = %k1*bessel_i(nu,x-pt) + %k2*bessel_k(nu,x-pt))))$ Case n=3/2 now works. It isn't simplified to zero by ode_check, but the result simplifies to zero numerically. This ode_check issue is [bug:4392] (%i32) eq:mbde,n=3/2; (%o32) x^2*'diff(y,x,2)+x*'diff(y,x,1)+(-x^2-9/4)*y = 0 (%i33) s:ode2(eq,y,x); (%o33) y = bessel_k(3/2,x)*%k2+bessel_i(3/2,x)*%k1 (%i34) [method,r:ode_check(eq,s)]; (%o34) [modifiedbessel, (bessel_k(7/2,x)*%k2*x^2)/4-(bessel_k(3/2,x)*%k2*x^2)/2...
bessel_simplify failure with modified Bessel function expression
Modified Bessel differential equation
The last line of function modifiedbessel2 should read return(y = %k1*bessel_i(nu,x-pt) + %k2*bessel_k(nu,x-pt))))$ Case n=3/2 now works. It isn't simplified to zero by ode_check, but the result simplifies to zero numerically. (%i32) eq:mbde,n=3/2; (%o32) x^2*'diff(y,x,2)+x*'diff(y,x,1)+(-x^2-9/4)*y = 0 (%i33) s:ode2(eq,y,x); (%o33) y = bessel_k(3/2,x)*%k2+bessel_i(3/2,x)*%k1 (%i34) [method,r:ode_check(eq,s)]; (%o34) [modifiedbessel, (bessel_k(7/2,x)*%k2*x^2)/4-(bessel_k(3/2,x)*%k2*x^2)/2 +(bessel_k(1/2,x)*%k2*x^2)/4...
Ah. I forgot I could add attachments. Edit. ode2.mac updated with one-line patch below.
Ah. I forgot I could add attachments.
Here is an initial implementation. Works for simple cases, but not for n=3/2. Enough for tonight. Here is a patch to ode2.mac. Introduce new function modifiedbessel2.mac and call it. Evert: I can send you a complete patched ode2.mac if you aren't familiar with the patch utility. $ diff -c /usr/local/src/maxima/share/diffequations/ode2.mac ode2.mac *** /usr/local/src/maxima/share/diffequations/ode2.mac Mon Sep 12 21:21:58 2016 --- ode2.mac Tue Oct 22 21:54:59 2024 *************** *** 11,17 **** declare_translated(boundtest,noteqn,nlxy,nly,nlx,xcc2,bessel2,euler2,...
Modified Bessel differential equation
This looks "trivial" to implement: clone the function bessel2, flip a couple of signs, change the Bessel function names, call the new function and fix the testsuite. I may have time to investigate later this week.
The function of interest is maxima code - the nine-line function bessel2 in file share/diffequations/ode2.mac.
I don't understand why solveradcan:true returns implicit solutions. This isn't mentioned in the manual. Given the effect of solverradcan:true the effect of solveexplicit:true inhibiting implicit solutions is as documented, Maxima 5.47.0 https://maxima.sourceforge.io using Lisp CLISP 2.49+ (2010-07-17) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d:false$ (%i2)...
Update solution for ODE Murphy 1.34
Fixed with commit [1be377]
Add assumptions for tests Kamke 2.3 and 2.4
Maxima can't differentiate beta function
Fixed with commit [1be3779a]
Bug #4325: Maxima can't differentiate beta function
The following works. I am not familiar with MQAPPLY and would welcome guidance on style. ;; Derivative of beta function ;; https://functions.wolfram.com/GammaBetaErf/Beta/ ;; https://en.wikipedia.org/wiki/Beta_function (defprop %beta ((a b) ; derivative wrt a ((mtimes) (($beta) a b) ((mplus) ((mqapply) (($psi array) 0) a) ((mtimes) -1 ((mqapply) (($psi array) 0) ((mplus) a b))))) ; derivative wrt b ((mtimes) (($beta) a b) ((mplus) ((mqapply) (($psi) 0) b) ((mtimes) -1 ((mqapply) (($psi array) 0)...
See the thread https://sourceforge.net/p/maxima/mailman/maxima-discuss/thread/CAMTHLKj1zk9G8H%3Dfpqi5Mx63jfXt4tH7FSHXQsvM7ubNCh1h1Q%40mail.gmail.com/#msg58730878 In particular https://sourceforge.net/p/maxima/mailman/message/58731017/ where Stavros says domain:real/complex sounds like a really powerful global setting -- am I working in the reals or in the complex numbers? But in fact, it has a very narrow meaning -- it (together with m1pbranch and radexpand) simply controls the simplification of...
Three solutions are returned when domain:complex . (%i1) display2d:false$ (%i2) eq1:x^3+x^2-x+%pi-1$ (%i3) domain:complex$ (%i4) algsys([eq1],[x]); (%o4) [[x = (4*(54/(9*sqrt((27*%pi^2-32*%pi)/3)-27*%pi+16))^(1/3) +9*((9*sqrt((27*%pi^2-32*%pi)/3)-27*%pi+16)/54)^(1/3)-3) /9], [x = -((4*(-(54/(9*sqrt((27*%pi^2-32*%pi)/3)-27*%pi+16)))^(1/3) +9*(-((9*sqrt((27*%pi^2-32*%pi)/3)-27*%pi+16)/54))^(1/3)+3) /9)], [x = ((4*sqrt(3)*%i-4)*(54/(9*sqrt((27*%pi^2-32*%pi)/3)-27*%pi+16)) ^(1/3) +(-(3^(5/2)*%i)-9)*((9*sqrt((27*%pi^2-32*%pi)/3)-27*%pi+16)/54)...
sqrtdenest cannot denest sqrt(sqrt(3)*%i-1))
rectform can do this if domain:complex. That will do for now. (%i1) display2d:false$ (%i2) eq1:sqrt(sqrt(3)*%i-1)$ (%i3) domain:complex$ (%i4) rectform(eq1); (%o4) (sqrt(3)*%i)/sqrt(2)+1/sqrt(2)
raddenest improper argument
raddenest - in git HEAD of 2024-01-22 - gets this wrong. This would be unacceptable for algsys/solve. (%i1) load("raddenest")$ (%i2) eq1:sqrt(sqrt(3)*%i-1)$ (%i3) sqrtdenest(eq1); (%o3) sqrt(sqrt(3) %i - 1) (%i4) eq2:raddenest(eq1); 1 sqrt(6) (%o4) ─────── - ─────── sqrt(2) 2 (%i5) rectform(float(eq1)); (%o5) 1.224744871391589 %i + 0.7071067811865476 (%i6) rectform(float(eq2)); (%o6) - 0.5176380902050415 Reported as bug [#4256] as fix is independent.
raddenest failure with sqrt(sqrt(3)*%i-1)
The sqrtdenest enhancement is now bug [#4255]. It is worthwhile enhancement independently of this
sqrtdenest cannot denest sqrt(sqrt(3)*%i-1))
sqrtdenest cannot denest sqrt(sqrt(3)*%i-1))
I haven't found too many references to denesting complex expressions . There is https://brownmath.com/alge/nestrad.htm
After removing the call to $rectform from SIMPLIFY-AFTER-SUBST algsys returns three solutions. (%i9) eq1:x^3+x^2-x+%pi-1$ (%i10) sa:algsys([eq1],[x]); (%o10) [[x = -((2^(2/3)*(3^(9/2)*sqrt(27*%pi^2-32*%pi)+729*%pi-432)^(1/3) -3*2^(2/3)*(3^(3/2)*sqrt(27*%pi^2-32*%pi)-27*%pi+16)^(1/3)+6) /18)], [x = ((2^(2/3)*sqrt(3)*%i+2^(2/3)) *(3^(9/2)*sqrt(27*%pi^2-32*%pi)+729*%pi-432)^(1/3) +(2^(2/3)*3^(3/2)*%i-3*2^(2/3)) *(3^(3/2)*sqrt(27*%pi^2-32*%pi)-27*%pi+16)^(1/3)-12) /36], [x = -(((2^(2/3)*sqrt(3)*%i-2^(2/3))...
simplify-after-subst tries two approaches 1) ratsimp 2) if $constantp(e) sqrtdenest + rectform + rootscontract + ratsimp then takes smallest expression rectform is causing problems. p1 and p2 are expressions from above (%i2) display2d:false$ (%i3) p1:((sqrt(3)*%i)/2-1/2)*((sqrt(%pi)*sqrt(27*%pi-32))/(2*3^(3/2)) +(-(3*(%pi-1))-1)/6+(-1)/27) ^(1/3)$ (%i4) rectform(float(p1)); (%o4) 0.16342849479571833-0.28306645639069*%i (%i5) r1:rectform(p1); (%o5) -(-((sqrt(%pi)*sqrt(27*%pi-32))/(2*3^(3/2)))-(-(3*(%pi-1))-1)/6+1/27)^(1...
Picking apart the solution finds two subexpressions with the same problem. Expressions p1 and p2 below have different floating point values after processing with lisp function simplify-after-subst (%i2) display2d:false$ (%i3) s2:((sqrt(3)*%i)/2+(-1)/2)*((sqrt(%pi)*sqrt(27*%pi-32))/(2*3^(3/2)) +(-(3*(%pi-1))-1)/6+(-1)/27) ^(1/3) +(4*(-1/2-(sqrt(3)*%i)/2))/(9*((sqrt(%pi)*sqrt(27*%pi-32)) /(2*3^(3/2)) +(-(3*(%pi-1))-1)/6+(-1)/27) ^(1/3))+(-1)/3$ /* Here is the problem. simplify\-after\-subst changes...
Looks similar to bug [#4163]
raddenest failure
OK. The issue is with the second solution found by solve. (%i1) display2d:false$ (%i2) expr:((sqrt(3)*%i)/2+(-1)/2)*((sqrt(%pi)*sqrt(27*%pi-32))/(2*3^(3/2)) +(-(3*(%pi-1))-1)/6+(-1)/27) ^(1/3) +(4*(-1/2-(sqrt(3)*%i)/2))/(9*((sqrt(%pi)*sqrt(27*%pi-32))/(2*3^(3/2)) +(-(3*(%pi-1))-1)/6+(-1)/27) ^(1/3))+(-1)/3$ (%i3) rectform(float(expr)); (%o3) 0.8945133161601935*%i+0.5099711601368959 The lisp simplifying function within algsys simplify-after-subst converts this to the third solution found by solve....
Add "Examples for algsys" section to "Equations" chapter of manual.
Correct trivial typo
Correct anchor for reference (Gawain&Ball 1978)
Fix itemized list in "References for colnew"
Regenerate examples
Correct comment in code for colnew Example 2: Deformation of a spherical cap
Renable test for bug #1106 that no longer crashes
Deep in the bowels of algsys, function callsolve returns 3 solutions. One of them gets lost on the way back. Maxima 5.47.0 https://maxima.sourceforge.io using Lisp CLISP 2.49+ (2010-07-17) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d:false$ (%i2) eq1:x^3+x^2-x+%pi-1$ (%i3) ?trace(?callsolve)$ ;; Tracing function CALLSOLVE. (%i4) algsys([eq1],[x]); 1. Trace:...
Another related bug. algsys only finds two solutions of the cubic x^3+x^2-x+%pi-1. Solve returns three, as expected. This is now bug [#4252] Maxima 5.47.0 https://maxima.sourceforge.io using Lisp CLISP 2.49+ (2010-07-17) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d:false; (%o1) false (%i2) eq1:x^3+x^2-x+%pi-1$ (%i3) algsys([eq1],[x]); (%o3) [[x = -((2^(2/3)*(3^(9/2)*sqrt(27*%pi^2-32*%pi)+729*%pi-432)^(1/3)...
algsys only returns 2 (of 3) solutions of a cubic
Another related bug. algsys only finds two solutions of the cubic x^3+x^2-x+%pi-1. Solve returns three, as expected. Maxima 5.47.0 https://maxima.sourceforge.io using Lisp CLISP 2.49+ (2010-07-17) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d:false; (%o1) false (%i2) eq1:x^3+x^2-x+%pi-1$ (%i3) algsys([eq1],[x]); (%o3) [[x = -((2^(2/3)*(3^(9/2)*sqrt(27*%pi^2-32*%pi)+729*%pi-432)^(1/3)...
Another related bug. algsys only finds two solutions of the cubic x^3+x^2-x+%pi-1. Solve returns three. Maxima 5.47.0 https://maxima.sourceforge.io using Lisp CLISP 2.49+ (2010-07-17) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d:false; (%o1) false (%i2) eq1:x^3+x^2-x+%pi-1$ (%i3) algsys([eq1],[x]); (%o3) [[x = -((2^(2/3)*(3^(9/2)*sqrt(27*%pi^2-32*%pi)+729*%pi-432)^(1/3)...
I have had a quick look at this. The problem is in the back-substitution phase of algsys - probably while checking that potential solutions satisfy the equations. We can eliminate y to obtain the cubic equation x^3+x^2-x+%pi-1 (%i1) display2d:false$ (%i2) eq1:x = 1-%pi*y$ (%i3) eq2:1 = (x+1)^2*y$ (%i4) solve(eq1,y); (%o4) [y = -((x-1)/%pi)] (%i5) eq2,%; (%o5) 1 = -(((x-1)*(x+1)^2)/%pi) (%i6) %pi*%; (%o6) %pi = -((x-1)*(x+1)^2) (%i7) expand(lhs(%)-rhs(%)); (%o7) x^3+x^2-x+%pi-1 A trace on ?algsys...
solve can't solve polynomial system of 4 eqs
Unsure which lisp is giving this error. The code in question is around line 663 of https://sourceforge.net/p/maxima/code/ci/master/tree/share/contrib/diffequations/odelin.lisp (defun hypergeo21-xi-denom-filter (n) (declare (ignore n)) 0) (defun hypergeo21-xi-degree-bound (q v x) (declare (ignore q v x)) 1)
Last post moved to new bug [#4242 ] as it is not related.
STYLE-WARNING in share/contrib/diffequations/odelin.lisp
STYLE-WARNING in share/contrib/diffequations/odelin.lisp
missing sign functions
zeroequiv(jacobi_dn(x,1/2),x) crashes with stack overflow
bessel_simplify error
Fixed with commit [1d63a5]
[bugs:#4184] function f is local in ode_check_tidy and bessel_simplify
contrib_ode testsuite issue addressed in commit [80b8f1]
{bugs:#4186] Adjust assumption for Kamke 2.405 due to changes elsewhere