Joerg Picard

20 Reputation

5 Badges

13 years, 104 days

MaplePrimes Activity


These are replies submitted by Joerg Picard

Doh! I thought I've searched through all the obvious places, but still missed it.

 

Thanks for your help!

Doh! I thought I've searched through all the obvious places, but still missed it.

 

Thanks for your help!

Like Mac Dude mention before: you can use

a[0] := 0; a[2] := 0;

or use the assign command like this:

w := (x)->a[0]+sum(a[i]*x^i, i=1..4);     # define the polynom

sol := solve([w(0), w(1), D(D(w))(0), D(D(w))(1)]);   # solve system of equations, D() is the differential operator

assign(sol);     # assign solution to parameters a[0]-a[4]

 

 

Like Mac Dude mention before: you can use

a[0] := 0; a[2] := 0;

or use the assign command like this:

w := (x)->a[0]+sum(a[i]*x^i, i=1..4);     # define the polynom

sol := solve([w(0), w(1), D(D(w))(0), D(D(w))(1)]);   # solve system of equations, D() is the differential operator

assign(sol);     # assign solution to parameters a[0]-a[4]

 

 

Got it, thanks! Didn't think that . works for outer product as well.

Got it, thanks! Didn't think that . works for outer product as well.

Thanks for your response. I'm looking to apply the outer product on the two vectors. I've played with it a little bit more and here's a better example:

f := a^2 * <x*y,x+y>;

df := diff(f,a); # --> column vector

df f^+; # --> outer product gives 2x2 matrix

diff(f,a) f^+; # --> Error, (in rtable/Product) invalid arguments

'diff(f,a)' f^+; # --> delaying evaluation pretty prints expression with no derivates taken

%; # --> evaluates expression above and displays same outer product 2x2 matrix

 

Looks like I need to delay evaluation so the outer product function can properly 'see' that diff(f,a) is a column vector.

I'm knew to this stuff, if somebody knows a good tutorial about how Maple evaluates expressions, that'll help.

Thanks for your response. I'm looking to apply the outer product on the two vectors. I've played with it a little bit more and here's a better example:

f := a^2 * <x*y,x+y>;

df := diff(f,a); # --> column vector

df f^+; # --> outer product gives 2x2 matrix

diff(f,a) f^+; # --> Error, (in rtable/Product) invalid arguments

'diff(f,a)' f^+; # --> delaying evaluation pretty prints expression with no derivates taken

%; # --> evaluates expression above and displays same outer product 2x2 matrix

 

Looks like I need to delay evaluation so the outer product function can properly 'see' that diff(f,a) is a column vector.

I'm knew to this stuff, if somebody knows a good tutorial about how Maple evaluates expressions, that'll help.

Page 1 of 1