<

## 40 Reputation

6 years, 163 days

## Vector equation: generate matrix for sub...

Maple 2015

I have the following problem consisting of multiple seteps.

I have a vector equation consisting of n equations with n parameters (a[n]). Usually the n <= 15. As example data I will use the case n=4.

equations := Vector[column]([ a, a, a,a])-Vector[column]([ b, b, b,b])=0;

The first thing I want to create is a matrix with a format 2^n x n (here: rows=16 by columns=4). The matrix only consists of ones and zeros which contains all possible combinations of ones and zeros. E.G. for n=4

subsMatrix := Matrix([[ 0 , 0 , 0 , 0 ],[ 1 , 0 , 0 , 0 ],[ 0 , 1 , 0 , 0 ],[ 0 , 0 , 1 , 0 ],[0 , 0 , 0 , 1],[1, 1 , 0 , 0],[1, 0 , 1 , 0],[1, 0 , 0 , 1],[0, 1 , 1 , 0],[0, 1 , 0 , 1],[0,0,1,1],[1, 1 , 1 , 0],[1, 1, 0 , 1],[1, 0 , 1 , 1],[0, 1 , 1 , 1],[1, 1 , 1 , 1]]);

Question 1: How do I create such a matrix for the general case? I have absolutely no idea how to achieve this with Matple

The next thing I want to do is to use the rows as substitution equations for the a[i] values, only if the value of the subsMatrix is 0. E.G. in the first case I want to set a=a=a=a=0, then a=a=a=0, then a=a=a=0, and so forth and save the equation as a new equation

I tried the following:

rows:=RowDimension(subsMatrix);

columns:=ColumnDimension(subsMatrix);

for i from 1 by 1 while  i<=rows do

subsEquations[i]:=equations

for j from  1 by 1 while  j<=columns do

if subsMatrix[i,j] =0 then

subsEquations[i]:= subs(a[j]=subsMatrix[i,j],subsEquations[i])

else

#do nothing if the value in the subsMatrix[i,j]=1

end if

end do:

end do:

Question 2: What is my error? Maple says the loop is indeterminate. But I don't see why it is not working.

I would be thankful if someone could help me out. I am open to other kind of strategies to this problem :).

## Aymptotic expansion for hypergeometric f...

Maple

I want to approximate the following hypergeometric function for large values of Y. The variables c and R are complex parameters.

hypergeom([-I*(c+sqrt(c^2-1)), I*(-c+sqrt(c^2-1))], [-I*(2*c+I), -I*(c+I+I*c/R)], exp(Y)*c/R)

I allready tried asympt(f,Y), but maple failed.

## Symmetries of strange PDE...

Maple

I thought about the following PDE:

EDIT: The u(0,t) is not a typo! It is really meant to be part of the PDE!

Latex/Matjax: $$\dfrac{\partial u(x,t)}{\partial t}=\alpha \dfrac{\partial^2 u(x,t)}{\partial x^2}+u(x=0,t).$$

﻿