On 10/4/10 4:28 AM, k t wrote:
> Hello.
>
> I'll try to use lbfgs and got this:
> ===================[cut]============================================
> (%i2) V: 0.75$
> a: 24$
> b: 68$
> C(r) := 2*%pi*b*r^2 + 4*a*%pi*r + 2*b*V/r + a*V/(%pi*r^2)$
> lbfgs(C(r), [r], [1.0], 1e-4, [1,0]);
> (%i3)
> (%i4)
> (%i5)
> (%i6) *************************************************
> N= 1 NUMBER OF CORRECTIONS=25
> INITIAL VALUES
> F= 8.365790735841403D+02 GNORM= 1.042646940618427D+03
> *************************************************
>
> I NFN FUNC GNORM STEPLENGTH
>
> Maxima encountered a Lisp error:
>
> Error in NTH [or a callee]: T is not of type SYSTEM::PROPER-LIST.
>
> Automatically continuing.
> To enable the Lisp debugger set *debugger-hook* to nil.
> (%i7)
> ===================[cut]============================================
>
> What am I doing wrong?
Nothing, except that your initial starting point causes the lbfgs
algorithm to try to compute the derivative at r = 0, which causes a
division by zero. If you choose a different starting point, say, 0.8,
lbfgs converges to 0.436.
Maxima should check for that possible error condition and return a noun
form.
Ray