Bessel function differential equation



Hi Barton,

That did the trick!  I am now able to use contrib_ode, and odelin, to 
solve this problem.  I really appreciate all the help you've given me, 
and I will work on improving my Lisp skills.  Perhaps with a little 
time, I can assist others as you have with me.  Thanks again!


Cheers,
Carl

Barton Willis wrote:
> Here is the fix; you can paste this into odelin.lisp (over write the old
> polynomial-filter).
> Just appending this to your init.lisp file will not work).
>
> It seems that GCL isn't as careful as it should be?
>
> After some testing, I'll commit the fix. Thanks for the bug report and the
> help in locating it.
>
> (defun polynomial-filter (p x f)
>   (let (($gcd '$spmod) ($algebraic t) ($ratfac nil)
>  ($ratprint nil) ($radexpand nil))
>     (setq p (sratsimp p)) ;; Get rid of terms like sqr(5)^2, %i^2...
>     (setq p ($mysqfr p x))
>     (setq p (if (mtimesp p) (margs p) (list p)))
>     (let ((q 1) (n))
>       (dolist (pj p q)
>  (cond ((mexptp pj)
>         (setq n (nth 2 pj))
>         (setq pj (nth 1 pj)))
>        (($freeof x pj)
>         (setq n 0))
>        (t
>         (setq n 1)))
>  (setq n (funcall f n))
>  (setq q (mult q (power pj n)))))))
>
> Barton
>
> -----maxima-bounces at math.utexas.edu wrote: -----
>
>   
>> To: Barton Willis <willisb at unk.edu>
>> From: Robert Dodier <robert.dodier at gmail.com>
>> Sent by: maxima-bounces at math.utexas.edu
>> Date: 02/14/2009 12:52PM
>> cc: maxima at math.utexas.edu, Carl Krauthauser <carl at udel.edu>
>> Subject: Re: [Maxima] Bessel function differential equation
>>
>> On 2/14/09, Barton Willis <willisb at unk.edu> wrote:
>>
>>     
>>>  I used 5.17.0; using CVS Maxima + SBCL 1.0.22, loading odelin gives an
>>>   error.
>>>
>>>   (%i1) load(odelin);
>>>   ; in: LAMBDA NIL
>>>   ;     (MAXIMA::SRATSIMP MAXIMA::P MAXIMA::X)
>>>   ;
>>>   ; caught STYLE-WARNING:
>>>   ;   The function was called with two arguments, but wants exactly one.
>>>       
>> Looks like SRATSIMP is defined with 1 argument in src/simp.lisp
>> but called with 2 arguments in share/contrib/diffequations/odelin.lisp
>> at line 295. Haven't look at how to fix it.
>>
>> best
>>
>> Robert Dodier
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>     
>
>
>