rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

Potential in polar coordinates #792

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 11:27:55 Created by danielvolinski on 2021-01-01 10:02:36 Original: https://sourceforge.net/p/maxima/bugs/3692


The following code ends up in an error:

load(vect)$ assume(r>0)$ scalefactors(polar)$ F:[1/r^2,0]$ potential(F); expt: undefined: 0 to a negative exponent. defint: integral is divergent. #0: myint(fun=-1/%dum^2,var=%dum,low=0,high=r) #1: potential1(gr=[-1/r^2,0]) (vect.mac line 359)

But there is a potential:

ev(express(grad(1/r)),diff); => [-1/r^2,0] is(F=%); => true

Daniel Volinski

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 11:27:56 Created by willisbl on 2021-01-11 08:27:34 Original: https://sourceforge.net/p/maxima/bugs/3692/#fa7f


A workaround is to set the value of potentialzeroloc; for example

(%i15)  potential(F), potentialzeroloc : inf;
(%o15)  -1/r

The user documentation for potential mentions something about potentialzeroloc. The documentation could be improved, but I'm not sure I'd say this is a bug.