highsciguy

75 Reputation

7 Badges

13 years, 205 days

MaplePrimes Activity


These are replies submitted by highsciguy

@Alejandro Jakubi Well, any solution would be fine. For example, in Mathematica this could be done from within a worksheet. Could there be such commands/packages for Maple?

@Carl Love Thanks. This is what I have been searching for. There is one thing which disturbs me a bit: It generates a lot of useless "1." factors which I would prefer to avoid or to remove. Any ideas?

Yes, that's what I do in the full code. For the example it was not important. Found how to provide more ranges (without list/set brackets). Counterintuitive ... and, I think, in dissagreement with the online help.

Yes, that's what I do in the full code. For the example it was not important. Found how to provide more ranges (without list/set brackets). Counterintuitive ... and, I think, in dissagreement with the online help.

The symmetry is exact at a level of about 1e-16. The sulution above is actually not valid because I have further condition but I can use it for renewed runs of fsolve with the avoid argument.

Is there a working way to provide startvalues and ranges for all variables to fsolve?

The symmetry is exact at a level of about 1e-16. The sulution above is actually not valid because I have further condition but I can use it for renewed runs of fsolve with the avoid argument.

Is there a working way to provide startvalues and ranges for all variables to fsolve?

Thanks. There is an almost symmetry which leads to the value of Pi/2. Analytic solutions could exist in the sense of an expansion, but I will need to go to parameters for which the situation will be worse ... The simultaneous specification of a range is interesting. Before I tried to provide "{alpha11=0..4*Pi,....}" in addition. But then fsolve complains if I specify startvalues in addition. 

Thanks. There is an almost symmetry which leads to the value of Pi/2. Analytic solutions could exist in the sense of an expansion, but I will need to go to parameters for which the situation will be worse ... The simultaneous specification of a range is interesting. Before I tried to provide "{alpha11=0..4*Pi,....}" in addition. But then fsolve complains if I specify startvalues in addition. 

with(LinearAlgebra):
assume(alpha11::real,alpha12::real,alpha22::real,theta::real);

val_M0:=Vector[column](2,{1 = .33333333333333333333, 2 = .33333333333333551493},datatype = anything,storage = rectangular,order = Fortran_order,shape = []);
mat_hh0:=Matrix(2,2,{(1, 1) = .16835970026949430840e-11, (1, 2) = .13753240884725158839e-12+.19829374389558973202e-12*I, (2, 1) = .13753240884725158839e-12-.19829374389558973202e-12*I, (2, 2) = .32897770467652390902e-12},datatype = anything,storage = rectangular,order = Fortran_order,shape = []);
mat_M0:=Matrix([[vec_M0[1],0],[0,vec_M0[2]]]):
# parametrization of general unitary 2x2 matrix
mat_V_V:=Matrix([[cos(theta)*exp(I*alpha11),sin(theta)*exp(I*alpha12)],[-sin(theta)*exp(I*(alpha11-alpha12+alpha22)),cos(theta)*exp(I*alpha22)]]):
# unit matrix
mat_Unity:=Matrix([[1,0],[0,1]]):

mat_deltaZ_T:=subs(mu=(mat_M0[1,1]+mat_M0[2,2])/2,mat_hh0*1/(6*mu^2));
mat_Z_V:=Multiply(mat_V_V,(mat_Unity+mat_deltaZ_T));

mat_M_V:=Multiply(Transpose(mat_Z_V),Multiply(mat_M0,mat_Z_V));

myresult:=timelimit(10*time_max,fsolve({mat_M_V[2,1]=0,mat_M_V[1,2]=0,Im(mat_M_V[1,1])=0,Im(mat_M_V[2,2])=0},{alpha11=0,alpha22=0,alpha12=0,theta=0},'fulldigits'));


Clever solution. It tells me that I guessed correctly: bin.X86_64_LINUX/X8664SSE2 .

Clever solution. It tells me that I guessed correctly: bin.X86_64_LINUX/X8664SSE2 .

One of the subdirectories of bin.X86_64_LINUX needs to be added to the path to avoid this error. E.g.:

    export LD_LIBRARY_PATH=$HOME/maple16/bin.X86_64_LINUX/X8664SSE2:$LD_LIBRARY_PATH

However I still do not know which one is most appropriate for my CPU. Does anybody know a resource where these libraries are descirbed.

I thought of something more comfortable which allows me to address different ini-file sections separately or which would return a Maple table. Probably it would be easiest to work only with *.mpl files. But unfortunately they are vastly more difficult to work with in a C-Programm (assuming that I dont want to use OpenMaple) since there are libraries which allow me to read and write ini files. Maybe the way to go is to write such a C-programm and to execute it using maples ExternalCalling. Or maybe I should use XML-files but then I need to change my existing codes and the configuration files will not be very readable. 

I thought of something more comfortable which allows me to address different ini-file sections separately or which would return a Maple table. Probably it would be easiest to work only with *.mpl files. But unfortunately they are vastly more difficult to work with in a C-Programm (assuming that I dont want to use OpenMaple) since there are libraries which allow me to read and write ini files. Maybe the way to go is to write such a C-programm and to execute it using maples ExternalCalling. Or maybe I should use XML-files but then I need to change my existing codes and the configuration files will not be very readable. 

I am using Maple 12 on ubuntu Linux. Path variables to Maple directories are set and it works with the java interface.

1 2 Page 1 of 2