Post Reply 
subscripts in CAS?
12-15-2016, 07:45 AM
Post: #5
RE: subscripts in CAS?
Replacing makelist by seq seems to work:
Code:

p(x,n):=sum(a[k]*x^k, k, 1, n)+a[0];
coefs(n):=seq(a[k],k,0,n);
eqs(n):=seq(y[k]=p(k*h,n),k,0,n);
sol:=linsolve(eqs(n),coefs(n));
...
If you teach Lagrange polynomial interpolation before teaching Newton-Cotes methods, you can enter :
Code:

n:=2; 
p:=lagrange(seq(k*h,k,0,n),seq(y[k],k,0,n));
factor(int(p,x,0,n*h)/n)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
subscripts in CAS? - Wes Loewer - 12-12-2016, 06:40 PM
RE: subscripts in CAS? - Han - 12-12-2016, 08:57 PM
RE: subscripts in CAS? - compsystems - 12-13-2016, 02:40 AM
RE: subscripts in CAS? - Wes Loewer - 12-15-2016, 04:53 AM
RE: subscripts in CAS? - parisse - 12-15-2016 07:45 AM
RE: subscripts in CAS? - Wes Loewer - 12-15-2016, 06:40 PM
RE: subscripts in CAS? - compsystems - 12-17-2016, 12:21 PM



User(s) browsing this thread: 1 Guest(s)