schzan

130 Reputation

5 Badges

9 years, 349 days

MaplePrimes Activity


These are questions asked by schzan

Hello all,

I am trying to create a matrix throgh a procedure but unfortunately I could not find how to define an empty matrix in Maple. This is how my procedure looks like,

Initial_Matrix := proc (BC::list, n, BP::list)
local M::Matrix, i;
M:=[][];
for i from 1 to numelems(BC) do
M:= <M,function_coeffs(BC[i], n, BP)>;
end do;

where the procedure function_coeffs returns a row vector. Logically, it should keep adding rows function_coeffs(BC[i], n, BP) to the emty matrix, but its not happening. Please help me out.

Thank you for your time.

Suppose we are given a matrix M[n*2n] of n linearly independent row vectors. Then I am trying to create a procedure to add n more linearly independent row vectors to this matix resulting in to a matrix M[2n*2n].

Consider this easy example, if the given matrix $M_{2*4}$ is

Matrix(2, 4, {(1, 1) = 4, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 4, (2, 4) = 1}) 
then we can add $[0,0,0,1]$ and $[0,0,1,0]$ to obtain the matrix $M_{4*4}$

Matrix(4, 4, {(1, 1) = 4, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 4, (2, 4) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 1, (4, 4) = 0})

 

Can I use rref form?Thank you for your help.

 

Hello everyone!

Suppose, we have a differential polynomial

P := u(x) + (D@@2)(u)(x)

Given this, I am looking for a procedure which gives coefficients depending on the order given as input, for example, lets say, procedure name is fun_coeff which depends on two parameters, original polynomial P and the order n, then

fun_coeff(P, 3) should give [1, 0, 1, 0]

where each entry corresponds to the coeff of

 [u(x), (D@@1)(u)(x), (D@@2)(u)(x), (D@@3)(u)(x)]

in the polynomial, similarly

fun_coeff(P,4) should give [1, 0, 1, 0, 0]

corresponding to

 [u(x), (D@@1)(u)(x), (D@@2)(u)(x), (D@@3)(u)(x), (D@@4)(u)(x) ]

Thank you all for your time :)

Hello everyone,

 

I am trying to extract the coefficients from a differential poynomial. In general, this poynomial is in two variables, say u and v along with their differentials, i.e D(u) or D@@2(u) or so on. 

Coefficients of this polynomials are rational funcitons.

For instance- consider the following example:

a(x)*v*u+v*D(u)-D(v)*u

then output should be [a(x), 1, -1].

 

Thanks for your help.

Dear Feinds,

How can I compute a double summation of the following form in Maple.

                                                      ∑5m=1  ∑j+k=m-1 (2m (Dk(a_m*f)) (Dj(f)))

where Drepresents nth order derivative.

Thank you for your help!

EDIT 1

Summand added

EDIT 2

Function "f" in the first derivative is changed to "a_m*f" where a_m (variable coefficients) represents any function of x.

First of all thank you so much for all the nice answers.

Here, the notation a_m doesn't work as I was expecting and then I thought let's just make it a(m) for simplicity, it seemed to work fine but unfortunatelyassumes it as a constant function. How can I rectify this problem?

 

1 2 3 4 Page 3 of 4