jccorreu

24 Reputation

4 Badges

18 years, 246 days

MaplePrimes Activity


These are replies submitted by jccorreu

I think i might be causing some confusion... I have a program I am working on with a complex quartic. have not got correct output so am debugging. as such have created a 2nd program, a simpified version to run through a very specfic case. I have set a number of components of the big quartic to zero case to arrive at the abbreviated equation i have supplied here. In the test program I supply the values first and just plug straight through inline code. In my real program its more object-oriented, with many functions that are defined and evaluated as symbolic, and only near then end of the program are the numerals applied. that is why i am trying to get these variations of the issue above. and acer pointed out efficiency. i've been looking for ways to improve the speed, and found a few. i hope this helps, and thank you
I think i might be causing some confusion... I have a program I am working on with a complex quartic. have not got correct output so am debugging. as such have created a 2nd program, a simpified version to run through a very specfic case. I have set a number of components of the big quartic to zero case to arrive at the abbreviated equation i have supplied here. In the test program I supply the values first and just plug straight through inline code. In my real program its more object-oriented, with many functions that are defined and evaluated as symbolic, and only near then end of the program are the numerals applied. that is why i am trying to get these variations of the issue above. and acer pointed out efficiency. i've been looking for ways to improve the speed, and found a few. i hope this helps, and thank you
quarticRoots := [allvalues(RootOf(quarticEQ,NZ))]; this is session dependant afterall... tho it does run faster than the other way... course I cant use it like that so it becomes obvious that maple functions behave differently if they are evaulated symbollically, vs if they are given values prior to evaluation and I can not find any help on `RootOf/sort`... not in maple, nor on this forum, in fact when I serach here I get an error, with and without the ` and regardless of case
quarticRoots := [allvalues(RootOf(quarticEQ,NZ))]; this is session dependant afterall... tho it does run faster than the other way... course I cant use it like that so it becomes obvious that maple functions behave differently if they are evaulated symbollically, vs if they are given values prior to evaluation and I can not find any help on `RootOf/sort`... not in maple, nor on this forum, in fact when I serach here I get an error, with and without the ` and regardless of case
ok i see what you both mean now i have a clarifying question still >quarticEQ := E1*NZ^4-NZ^2*(2*E1^2)+E1^3-E1*E2^2=0; > quarticRoots := [allvalues(RootOf(quarticEQ,NZ))]; if i leave E1 and E2 as symbolic then I can use the above 2 statements, and later fillin their values, by calling a function. I tried adding RootOf/sort to it but it doesn't like it. It doesn't automatically keep them in that kind of order does it? I mean is it session-dependant this way or not? I tried using the `RootOf/sort`([fsolve(P,NZ)]); when I left the variables as symbolic and it didn't like that either. maple seems to be pretty powerful, but it has been difficult learning its idiosyncracies thanks again james
ok i see what you both mean now i have a clarifying question still >quarticEQ := E1*NZ^4-NZ^2*(2*E1^2)+E1^3-E1*E2^2=0; > quarticRoots := [allvalues(RootOf(quarticEQ,NZ))]; if i leave E1 and E2 as symbolic then I can use the above 2 statements, and later fillin their values, by calling a function. I tried adding RootOf/sort to it but it doesn't like it. It doesn't automatically keep them in that kind of order does it? I mean is it session-dependant this way or not? I tried using the `RootOf/sort`([fsolve(P,NZ)]); when I left the variables as symbolic and it didn't like that either. maple seems to be pretty powerful, but it has been difficult learning its idiosyncracies thanks again james
the reason i use rootof is for the index property, because each solution has a specific physical interpretation, and therefore specfic placement in later calculations. the problem with solve (and many functions in maple) is that the output is order by memory address, and can therefore change order each subsequent run. i know that this particular quartic is a very simple one and can easily be solved analytically, but I have much more complex instances where maple cant solve analytically, though can do numerically. what i find works tho is... e1 := e1r -I*e1i; e2 := e2r -I*e2i; nz1 := evalf(subs(E1=e1,E2=e2,RootOf(E1*NZ^4 - NZ^2*(2*E1^2) + E1^3 - E1*E2^2=0,NZ,index=1))); it just seems strange to me that it has to be done this way, and does not support the more intuitive method. thanks
the reason i use rootof is for the index property, because each solution has a specific physical interpretation, and therefore specfic placement in later calculations. the problem with solve (and many functions in maple) is that the output is order by memory address, and can therefore change order each subsequent run. i know that this particular quartic is a very simple one and can easily be solved analytically, but I have much more complex instances where maple cant solve analytically, though can do numerically. what i find works tho is... e1 := e1r -I*e1i; e2 := e2r -I*e2i; nz1 := evalf(subs(E1=e1,E2=e2,RootOf(E1*NZ^4 - NZ^2*(2*E1^2) + E1^3 - E1*E2^2=0,NZ,index=1))); it just seems strange to me that it has to be done this way, and does not support the more intuitive method. thanks
I see. Thanks :>)
I see. Thanks :>)
ok i did find another thread that gave how to linear interplate C1 := CurveFitting[Spline](testfile[1..-1,1..2], x, degree=1): # linear interpolation but I am still curious about the poly interp questions I have. james
ok i did find another thread that gave how to linear interplate C1 := CurveFitting[Spline](testfile[1..-1,1..2], x, degree=1): # linear interpolation but I am still curious about the poly interp questions I have. james
Page 1 of 1