Hi derivians,
I had a problem with pade.mth that appears in DNL #49. Apparently
it does not work properly on rational functions for some initial value of
the variable (x=0 in my example), but it does if you change the expansion
point. You may say that it is foolish to look for a rational approximation
to a rational function, but I was just testing the program.
Best regards,
Marcelo
Francisco M. Fernández,
CEQUINOR, Departamento de Química, Facultad de Ciencias Exactas,
Universidad Nacional de La Plata, Calle 47 y 115, Casilla de Correo 962,
1900 La Plata, Argentina.
Phone/fax: (54-221) 482-2643/424-0172
E-mail [log in to unmask]
[log in to unmask]
[log in to unmask]
http://www.conicet.gov.ar/webue/cequinor/mick.htm
pade(y,x,x0,n,d,j_:=0,t_:=0):=PROG(LOOP(t_:+LIM(y,x,x0)*x^j_,j_:+1,IF(j_>n+d,~
exit),y:=DIF(y,x)/j_),y:=t_*(SUM(STRING(k_+n)*x^k_,k_,1,d)+1),y:=REVERSE(TERM~
S(y-SUM(STRING(k_)*x^k_,k_,0,n),x)),y:=LIM(y SUB [1,...,n+d+1],x,1),y:=FIRST(~
SOLUTIONS(y,STRING([0,...,n+d]))),SUM(y SUB (k_+1)*(x-x0)^k_,k_,0,n)/(SUM(y S~
UB (k_+n+1)*(x-x0)^k_,k_,1,d)+1))
pade((1+x)/(1+x^2),x,0,1,2)
;Simp(#2)
(x*[] SUB 1 SUB 2+[] SUB 1 SUB 1)/(x^2*[] SUB 1 SUB 4+x*[] SUB 1 SUB 3+1)
pade((1+x)/(1+x^2),x,1,1,2)
;Simp(#4)
(x+1)/(x^2+1)
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24/04/03
|