mm-454 ==== Subject: : Re: Gauss - Kronrod ( I need help!)> I've to do something for school about numerical integration.> But I could really need some help understanding the method of Gauss-Kronrod> (or at least the Gauss quadrature).> It would be very nice if someone could explain it to me.> BriegGauss-Legendre quadrature since it is the most efficient (integrates agiven degree polynomial with optimal number of points.) This pagedescribes it just about as well as anything:http://mathworld.wolfram.com/ Legendre-GaussQuadrature.htmlAnd they also have a page on Gauss-Kronrod quadrature (which reusespoints)http://mathworld.wolfram.com/ Gauss-KronrodQuadrature.htmlthough not as helpful, there are some good references there.Hope that helps,John=== === Subject: : Re: Who are You Dennis ? by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2GMCl408175;>My calculus class was challenged to determine and prove which is the>greater of the two: e^pi or pi^e. I have worked on this for quite>some>time, but cannot prove my conclusion. Any suggestions?The function have the form x^y. We want to know the direction of theinequality in pi^e ? e^pi. Take the log on both side you now havelog(pi)/pi ? log(e)/e. If we look at the function log(x)/x and takethe derivative we have (log(x)/x)' = (1-log(x))/x^2. The function isdecreasing thus pi^e < e^pi.DL=== === Subject: : Re: Who are You Dennis ?>My calculus class was challenged to determine and prove which is the>greater of the two: e^pi or pi^e. I have worked on this for quite> some time, but cannot prove my conclusion. Any suggestions?> The function have the form x^y. We want to know the direction of the> inequality in pi^e ? e^pi. Take the log on both side you now have> log(pi)/pi ? log(e)/e. If we look at the function log(x)/x and take> the derivative we have (log(x)/x)' = (1-log(x))/x^2. The function is> decreasing thus pi^e < e^pi. DL===David solution is OK ! The problem ,, Which is the greater of the two: e^ pi or pi^e is attributed to Euler. An alternative solution is to investigate if there exists a positive constant A such that (1) A^x >= x^A for all positive x .By considering f:(0,infty)--->R , f(x)=ln(x)/x , it follows that (1) isequivalent to(1') f(A) >= f(x) for all positive x.It follows that A must be an extremum point (absolut maximum). One finds A=e the unique possibility. Therefore , we have followingDefinition: Napier's constant ,,e is the unique positive number A whichsatisfies A^x >= x^A for all x>0 .I remember that a similar discussion was published in The Amer.Math.Monthly in period 1950-1970.===== === Subject: : Re: Who are You Dennis ?>My calculus class was challenged to determine and prove which is the>greater of the two: e^pi or pi^e. I have worked on this for quite> some>time, but cannot prove my conclusion. Any suggestions?> The function have the form x^y. We want to know the direction of the> inequality in pi^e ? e^pi. Take the log on both side you now have> log(pi)/pi ? log(e)/e. If we look at the function log(x)/x and take> the derivative we have (log(x)/x)' = (1-log(x))/x^2. The function is> decreasing thus pi^e < e^pi.You obviously meant decreasing for log(x)>=1 i.e. x>=e. Since bothpi and e are greater than or equal to e, the desired conclusionfollows. Indeed your argument shows that e^x >= x^e for all x>0.> DLUse of tools distinguishes Man from Beast. And UNIX users from WINDOZE lusers.=== === Subject: : Help, if you can by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2GNLUE15631;What do these numbers have in common - 7, 3, 10, 11, and 12 ??=== === Subject: : Re: Help, if you can>What do these numbers have in common - 7, 3, 10, 11, and 12 ?? One of the four words in Help, if you can shares the property,as does one of the seven words in What do these numbers have in commonJohn Adams served two terms as Vice President and one as President, but lostreelection. Later his son became President despite losing the popular vote.That son lost his reelection attempt badly. Now history is repeating itself.pmontgom@cwi.nl Microsoft Research and CWI Home: San Rafael, California=== === Subject: : Re: Help, if you can> What do these numbers have in common - 7, 3, 10, 11, and 12 ??They are all positive integers.=== === Subject: : Re: Help, if you can> What do these numbers have in common - 7, 3, 10, 11, and 12 ??> They are all positive integers.except -7=== === Subject: : Re: Help, if you can>What do these numbers have in common - 7, 3, 10, 11, and 12 ??>They are all positive integers.>except -7 I assume the - is a dash, not a minus. In which case theseare the smallest nonobvious quadratic resides modulo 37: 9^2 == 7 15^2 == 3 11^2 == 10 14^2 == 11 7^2 == 12nonobvious excludes 1, 4, 9, 16. Check that 2, 5, 6, 8,13, 14, 15, 17, 18, 19, 20 are quadratic non-residues modulo 37. Look elsewhere for another of my answers.John Adams served two terms as Vice President and one as President, but lostreelection. Later his son became President despite losing the popular vote.That son lost his reelection attempt badly. Now history is repeating itself.pmontgom@cwi.nl Microsoft Research and CWI Home: San Rafael, California=== === Subject: : Re: Modelling dynamics of linked members Go to http://www3.addall.com/ type mechanism linkage For> more hits, go to Used Books there. Then visit your university library.> I think what makes the problem I'm interested in rather different from > the problems treated in robotics and mechanical machinery etc. is that > all rotational degrees of freedom exist at the junctions. Effectively > my linked chain of members is more like a string with attached weights > than a mechanical linkage system. I can't think of a mechanical system > with this character. I'm guessing that it might have chaotic behaviour.> I'm looking for suggestions on appropriate mathematical simulation methods.> Gib=== === Subject: : Re: Modelling dynamics of linked members> This may not be quite what you're looking for, but early (late 80's, early > 90's) simulations of polymers were done in a similar way, without the > external forces, usually. The method of choice was Monte Carlo. If you > techniques to minimize the energy, which should give you the correct > dynamics, even if it isn't pretty.> Cheers> SandraBeam lattice models for molecular crystals are a bit older than that:early 1960s. And they were done by spectral methods, not in the timedomain.My previous post was about something totally different: flexiblemultibodydynamics in the time domain. This includes robotics - which isrestricted to rigid body trees or chains - as a special case.=== === Subject: : Re: Help with Number PatternNext number is: 41122314can be found at link: http://www.research.att.com/~njas/sequences/index.html> What is the next number in this set??> 1> 11> 21> 1112> 3112> 211213> 312213> 212223> 114213> 31121314> ????????=== === Subject: : Re: Help with Number Pattern17, I'm sure of it.> What is the next number in this set??> 1> 11> 21> 1112> 3112> 211213> 312213> 212223> 114213> 31121314> ????????=== === Subject: : Re: How do i find the equation of this curveCherese schrieb im Newsbeitrag> Litres 1/4 1/2 3/4 1 1-1/4 1-1/2> Time (minutes) 9.85 7.83 7.52 7.42 7.02 6.98Try this solution:Polynomial Approximationy = c_0 + c_1*x + c_2*x^2 + ... + c_k*x^k + ... + c_p*x^pk = 0, 1, ... , p x y c_k 0.250000 9.850000 15.890000 0.500000 7.830000 -35.946000 0.750000 7.520000 55.380000 1.000000 7.420000 -34.240000 1.250000 7.020000 4.800000 1.500000 6.980000 1.536000Email account locked up due to spams=== === Subject: : Re: eigenvalues of large, symmetric, matrces with many zeroes. >Actually, I need to compute things like >sum_i (1/n) frac{lambda_i}{a - blambda_i} >where lambda_i, i=1ldots n are the eigenvalues, >and a and b are parameters. >Any idea ?this is trace((inverse(a*I-b*A)*A) = sum_{i=1 to n} (e_i'(inverse(a*I-b*A)*Ae_i)hence no eigenvalue computation is involved here .solve (a*I-b*A)z_i = Ae_i and sum up sum_i (e_i'z_i) hopefully you will be able to compute a sparse decomposition of a*I-b*Aof course also iterative solvers might be applicable. anyway this is cheaperthan solving the complete eigenvalue problem for such a large matrix (if it is not banded with a very small band, such that reduction to tridiagonalform is feasible using the bandwidht reduction algorithm of H.R.Schwarz.hthpeter >I need to compute the eigenvalues of a symmetric, >real, nXn matrix A where: 1. each row of A is a vector of zeroes with >at most 4 ones >2. n is very large, of order 10^5 or 10^6. >Any suggestions are greatly appreciated. >Federico Echenique > I assume you want only some ... (the largest , the smallest, some in some > interval .... , otherwise you must proceed completely different ...) > http://www.ime.unicamp.br/~chico/arpack++ > http://www.caam.rice.edu/software/ARPACK > hth > peter=== === Subject: : Re: help! power iteration for eigenvalue approximation >i've been looking around for answers to this problem but i just couldn't get >a clue: >i am using power iteration method to compute the first k dominant >eigenvalues and eigenvectors of a symmetric matrix A. here is what i do: >1. use power iteration to get the dominant eigenvalue k1 and eigenvector v1 >of matrix A >2. residueA = A - k1 * v1 * v1.transpose >3. use power iteration to get the dominant eigenvalue k2 and eigenvector v2 >of residueA >4. ... repeat the above until i have enough approximation terms >for some reason i don't know, the eigenvalue produced by this process is not >in order i want. for example, >A= >[ 0 0 0 0 1 2 3 4 > 0 0 0 1 2 3 4 3 > 0 0 1 2 3 4 3 2 > 0 1 2 3 4 3 2 1 > 1 2 3 4 3 2 1 0 > 2 3 4 3 2 1 0 0 > 3 4 3 2 1 0 0 0 > 4 3 2 1 0 0 0 0 ]; >using matlab, the first three eigenvalues are (in order of absolute value) >14.0759, -9.4306, 4.5685 >but with the power iteration method, i get them in order: 14.0759, >4.5685, -9.4306 >here is the problem picked out: >the residue matrix after first iteration >residue1=[ >-0.6592 -0.9584 -1.2071 -1.3525 -0.3525 0.7929 2.0416 >3.3408 >-0.9584 -1.3933 -1.7550 -0.9663 0.0337 1.2450 2.6067 >2.0416 >-1.2071 -1.7550 -1.2106 -0.4767 0.5233 1.7894 1.2450 >0.7929 >-1.3525 -0.9663 -0.4767 0.2251 1.2251 0.5233 > 0.0337 -0.3525 >-0.3525 0.0337 0.5233 1.2251 > 0.2251 -0.4767 -0.9663 -1.3525 > 0.7929 1.2450 1.7894 > 0.5233 -0.4767 -1.2106 -1.7550 -1.2071 > 2.0416 2.6067 1.2450 > 0.0337 -0.9663 -1.7550 -1.3933 -0.9584 > 3.3408 2.0416 > 0.7929 -0.3525 -1.3525 -1.2071 -0.9584 -0.6592]; >its eigenvalues are -9.4306, 4.5685 ... but the power iteration method gives >me 4.5685, which is not the dominant eigenvalue. >so i am confused what the power iteration is really doing, because in some >cases it finds the eigenvalue with maximum ABSOLUTE VALUE, while in others >it finds the one with maximum VALUE. did i do anything wrong? please help >me!!! >rui the only explanation I have that you might have an unlucky choice of the first eigenvector guess for the second eigenvalue and a weak terminationcriterion. often you might have the effect that seemingly, with a badly chosen initial vector, the iteration does not converge to the dominant eigenvalue, but if the termination criterion is very sharp, then finallyaccumulation of roundoff drives the iteration into the right direction.a side remark:your problem should not be solved using this simple scheme plus deflation but the simultaneous vector iteration which finds the desired eigenspace simultaneously. see golub & van loan for a description.code is in http://www.netlib.org/svdpackhthpeter=== === Subject: : Spherical Harmonics Kit by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HDlY705838;HI alldo anyone know about a spherical harmonics kitthat works on windows platform ? specialy Visual C++.i'll be glad to have some hintsThanx in advanceTarik=== === Subject: : Re: C code for finding the roots of a polynomial by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HDmCJ06132;Hi everybodydoes any one know where can I find the C programe to find the roots ofthe polynomial and the product of an expression of the form(s-2)(s-1)(s.^2+2ac-6s).............>Hi all,> Does anyone know where I can find a C function for finding>the roots of a polynomial with real coefficients? I've found>lots of fortran routines, but the folks I'm working with have >all moved to C. >Bud G.>-->Dr. William K Glunt | Are you ABNORMAL?>APSU Dept of Math and CS| Then you are probably better than mostpeople!>Clarksville TN | Are alien space monsters bringing aSTARTLING NEW>home phone 615 645 8938 | WORLD? from _The book of the SubGenius_=== === Subject: : Re: C code for finding the roots of a polynomial> Hi everybody> does any one know where can I find the C programe to find the roots of> the polynomial and the product of an expression of the form> (s-2)(s-1)(s.^2+2ac-6s).............Try looking at my web site www.hvks.com/numerical.htm click on portsand I have posted 3 general algorithm for finding roots on polynomialswith real coeeficients. The three methods are:1) Newton (By Madsen)2) Jenkins-Traub famous roots finderand finally3) Renormalized Graeffe Iteration by Malajovich.Henrik=== === Subject: : searching algo by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HDlW005746;>Dear Friend:> I use the package of ARPACK, for our project, we have to write our>own subprogram to calculate w=A*v.> I read the matrix in the Harwell-Boeing format. Then I can>calculate the w=A*v faster ( because we can use CSR format includedin>Harwell-Boeing format for this calculation).> For the serial version of ARPACK, I get my resolution easily. But>now I want to use a supercomputer IBM SP3 to resolve my problem. I>used the PARPACK. This key problem is that the examples in the>examples are hard to understand. Can you give me a example ofnormally>use (read a matrix file ,then calculate the w=A*v)?> Have someone had some exemples of parallel version to calculate>w=A*v using CSR format? SPARKIT has no such subprograms.> Thank you very much!> Best wishes to you!!=== === Subject: : Ability In MathematicsTO THE SCI.MATH.NUM-ANALYSIS NEWSGROUPI have an enquiry which people in this Mathematics newsgroupmay wish to address if they so desire:Firstly,I have to say that,personally,I have always found Mathematicsdifficult.It has hindered my understandings of Astronomy and I failedthe British 11+ examination BECAUSE of it and so, consequently,went to a British Secondary Modern School as opposed to themore academic British Grammar School.Even though I hadunderstanding and competence in every other subject I studied atschool and,later, college.So, in at least two crucial ways, Mathematicshas been a very significant subject in my life.So,given all this, have you any ideas as to why,for some people,Mathematics ability comes so naturally whilst other people find it sodifficult?Clearly some people see patterns in Mathematics whilstothers,NO MATTER HOW MUCH THEY TRY,cannot.Why is this so? Thank you. Brian Devonald=== === Subject: : Re: Ability In Mathematics> So,given all this, have you any ideas as to why,for some people,> Mathematics ability comes so naturally whilst other people find it so> difficult?Clearly some people see patterns in Mathematics whilst> others,NO MATTER HOW MUCH THEY TRY,cannot.Short answer -- different learning styles.I saw two examples of this when I was in university {engineering student}.My first year introductory calculus course was taught in sections of ~20 students by graduate degree candidates. All students (several hundred) took the same exams [all university students requiring *ANY* math took this course. ]. My section was primarily engineering students. The instructor was a pure mathematician whose teaching style was theory oriented with strong formal rigor. On the first course-wide exam, our section had dubious distinction of coming in dead last ( evidently by a significant margin). Instructor received an invitation to visit Math department chair.The following class went something like:Instructor: What is the problem?Class: We want examples.Instructor: You need theory.Instructor ( recognizing lost cause ;): ok HOWEVER, when the next exam proves you wrong, we will go back to doing it the right wayThe next exam came.I can not claim we were top section. However we were soundly above 50th percentile. I think instructor said something like Engineers are STRANGE. I will admit I did not really grasp much of what we were taught until the second semester Physics course demonstrated some of what we learned in first semester math ;/My second example comes from my sophomore year.A set of 3rd and 4th semester math courses were required of and taken ONLY by math majors and engineering majors.The course format of the 3rd semester was three lectures and one recitation (small group) per week. The course was large enough to require two lectures. The Math department provided one. The Engineering college provided one. Student assignment to lecture section was approximately random. There was a common final exam. Once again learning/teaching styles were evident.I had the misfortune to be in the mathematician lecture. Not only was he a pure mathematician, but he was also an algebraist. Our lecture hall had 2 30 ft long chalk boards which could be raised/lowered. He covered both at least TWICE per lecture. There was a math grad student in the same rooming house as I. He could not understand why I hated having his hero as a lecturer. He also could not understand why such a great man was being wasted on undergraduates when there were grad students fighting to take courses from him.The end result ;?Well, we gave new meaning to grading on the curve.For the students lectured by the engineering prof, a nice conventional Bell curve. [Class median] ~= [math major median] ~= [engineering median] ~= [historical median]My section you ask? ;{Shall, we say, we gave administrators fits ;)The math majors scored *SIGNIFICANTLY* higher than any group you might compare them to.The engineers? Well create formula to arithmetically add x points to ALL grades of engineers in that section to force the median grade to be passing. All engineering students of that lecturer session who received a passing grade were to be placed in a special ( can we say 'remedial'?) section of the following course.=== === Subject: : Re: Ability In Mathematics>So,given all this, have you any ideas as to why,for some people,>Mathematics ability comes so naturally whilst other people find it so>difficult?Clearly some people see patterns in Mathematics whilst>others,NO MATTER HOW MUCH THEY TRY,cannot.>Why is this so?Some can, some can't. Are you going to ask the same question in themusic-performance newsgroups? In the competitive-sports newsgroups?This has nothing to do with numerical analysis; Followup-To set.dave=== === Subject: : Re: Ability In MathematicsCognitive scientists have studied this to a degree. Mathematical ability is a complex of abilities, which can differ among good mathematicians. The human brain uses pointers in short term memory to reference collections of ideas, clumps. People who do mathematics well can do this more easily than others; and a substantial part of this ability is learned through practice. Einstein, although not a mathematician, is reputed to have used internal bodily sensations to help. Most mathematicians are strongly visual, but there are exceptions: I know at least one reasonably good mathematician who has very poor visual memory.I've been waiting for an opportunity to cite some wise words from my advisor, Jimmy Savage, who, although he slighted his ability, was a passable mathematician.In the first place, it cannot be too strongly emphasized that a long mathematical argument can be fully understood on first reading only when it is very elementary indeed, relative to the reader's mathematical knowledge. If one wants only the gist of it, he may read such material once only; but otherwise he must expect to read it at least once again. Serious reading of mathematics is best done sitting bolt upright on a hard chair at a desk. Pencil and paper are nearly indispensable; for there are always figures to be sketched and steps in the argument to be verified by calculation.> TO THE SCI.MATH.NUM-ANALYSIS NEWSGROUP> I have an enquiry which people in this Mathematics newsgroup> may wish to address if they so desire:> Firstly,I have to say that,personally,I have always found Mathematics> difficult.It has hindered my understandings of Astronomy and I failed> the British 11+ examination BECAUSE of it and so, consequently,> went to a British Secondary Modern School as opposed to the> more academic British Grammar School.Even though I had> understanding and competence in every other subject I studied at> school and,later, college.So, in at least two crucial ways, Mathematics> has been a very significant subject in my life.> So,given all this, have you any ideas as to why,for some people,> Mathematics ability comes so naturally whilst other people find it so> difficult?Clearly some people see patterns in Mathematics whilst> others,NO MATTER HOW MUCH THEY TRY,cannot.> Why is this so?> Thank you.> Brian DevonaldBob Wheeler --- http://www.bobwheeler.com/ ECHIP, Inc. ---Randomness comes in bunches.=== === Subject: : Network Reliability by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HGW2S28832;Does anyone know of a source for source code incorporating currentstate of the are techniques in computing network system reliability. Irealize that these are NP-hard problems but am looking for code thatimplements the current algorithmic state of the art.Al Myers=== === Subject: : ill-conditioned system of linear equations by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HGW2E28838;I have a big problem concerning the solution of an ill-conditionedsystem of linear equations. It is of the form A.x=b, where A can besquare or rectangular depending on the application. The problem isthat really small errors in the experimentally obtained values of Aand x result in absurd values of the solution x. I solve the system bytaking the inverse of the matrix A (if a is square) and thenmultiplying b by this inverse. I think this isn't the problem, sincewhen I do the calculation (A.A^-1)-(unity matrix) the resulting matrixhas elements smaller then e.g. 10^-14. So I conlude that the problemis not the inversion. If A is rectangular I use the pseudo inverse inorder to derive the least square solution of the system.Also, when I do the calculation A.x, I find b again!Does anyone has an idea how I can solve my problem? Does apre-conditioning of the matrix A can help me? Does this relax theaccuracy-needs for A and x? Can I make my calculation more robust by apllying a certain scaling ofmy rows?Please give me a suggestion, I'm quite desperate!Sam.=== === Subject: : Re: ill-conditioned system of linear equations> I have a big problem concerning the solution of an ill-conditioned> system of linear equations. It is of the form A.x=b, where A can be> square or rectangular depending on the application. The problem is> that really small errors in the experimentally obtained values of A> and x result in absurd values of the solution x. I solve the system by> taking the inverse of the matrix A (if a is square) and then> multiplying b by this inverse. I think this isn't the problem, since> when I do the calculation (A.A^-1)-(unity matrix) the resulting matrix> has elements smaller then e.g. 10^-14. So I conlude that the problem> is not the inversion. If A is rectangular I use the pseudo inverse in> order to derive the least square solution of the system.> Also, when I do the calculation A.x, I find b again!> Does anyone has an idea how I can solve my problem? Does a> pre-conditioning of the matrix A can help me? Does this relax the> accuracy-needs for A and x? > Can I make my calculation more robust by apllying a certain scaling of> my rows?> Please give me a suggestion, I'm quite desperate!You need to regularize. Try solving A^T A x = A^T b but multiplythe diagonal of A^T A by 1.0001 or a similar quantity.For more background and more sophisticated recipes if this fails,see, e.g.,http://www.mat.univie.ac.at/~neum/papers.html# regtutorialArnold Neumaier=== === Subject: : Re: ill-conditioned system of linear equations >I have a big problem concerning the solution of an ill-conditioned >system of linear equations. It is of the form A.x=b, where A can be >square or rectangular depending on the application. The problem is >that really small errors in the experimentally obtained values of A >and x result in absurd values of the solution x. I solve the system by ^ you mean b here? >taking the inverse of the matrix A (if a is square) and then >multiplying b by this inverse. I think this isn't the problem, since >when I do the calculation (A.A^-1)-(unity matrix) the resulting matrix >has elements smaller then e.g. 10^-14. So I conlude that the problem did you also try A^-1.A-I ? this may be quite different >is not the inversion. If A is rectangular I use the pseudo inverse in >order to derive the least square solution of the system. >Also, when I do the calculation A.x, I find b again! >Does anyone has an idea how I can solve my problem? Does a >pre-conditioning of the matrix A can help me? Does this relax the >accuracy-needs for A and x? >Can I make my calculation more robust by apllying a certain scaling of >my rows? >Please give me a suggestion, I'm quite desperate! > Sam. since A and b contain empirical data, it is hard to say whether scaling mighthelp.bad scaling is in most cases the result of bad modelling (e.g. representing a polynomial on an interval far from zero (say [1000,2000]) by the standard form McLaurin series a0=a1*x+a2*x^2+...a rule of thumb for scaling is 1. scale the variables acording to their importancein the model, then 2. scale every row to be of equal length. but, since you already are acquainted with the pseudoinverse:why not using the svd, setting small singular values to zero and using thepseudoinverse thereafter? (also in the square case).this is one of the most successful techniques for regularizing illconditionedsystems of linear equations where nothing else helpshthpeter=== === Subject: : Numerical integration of Laguerre polynomialsfor a while I've been stuck with the following problem and I washoping that someone here could give me some advise. It looks as if I'mhitting the limits of double precision accuracy.I need to do this triple integral numerically (physical background:matrix element between harmonic oscillator states):int_0^infty du sqrt(u) exp(-u) L_{kappa}^{1/2}(u) timesint_0^infty dv sqrt(v) exp(-v) L_{k}^{1/2}(v) timesint_{-1}^{+1} dx L_{kappa'}^{1/2}(f(u,v,x)) L_{k'}^{1/2}(g(u,v,x))where L_{k}^{1/2} is an associated Laguerre polynomial. f and g aresimple functions. They are linear in x but not in u and v.I use Gauss-Laguerre quadrature for the u- and v-integrals, andGauss-Legendre for x. This works very well for small indeces kappa,kappa', k, k'.However, already for kappa=0, kappa'=0 and k=30, k'=30, say, theresult of the triple quadrature becomes unreliable since the productof the Laguerre polynomials in the integrand becomes very large(1.D+300) whereas the quadrature weights beome very small (1.D-300)and over/underflow occurs.Neither could I write down an asymptotic formula for the integralabove. Is there a better suited way to carry out the integral (I needto it for many indeces...) in reasonable computational time?Martin Stoll=== === Subject: : Re: Numerical integration of Laguerre polynomials >for a while I've been stuck with the following problem and I was >hoping that someone here could give me some advise. It looks as if I'm >hitting the limits of double precision accuracy. >I need to do this triple integral numerically (physical background: >matrix element between harmonic oscillator states): >int_0^infty du sqrt(u) exp(-u) L_{kappa}^{1/2}(u) times >int_0^infty dv sqrt(v) exp(-v) L_{k}^{1/2}(v) times >int_{-1}^{+1} dx L_{kappa'}^{1/2}(f(u,v,x)) L_{k'}^{1/2}(g(u,v,x)) >where L_{k}^{1/2} is an associated Laguerre polynomial. f and g are >simple functions. They are linear in x but not in u and v. >I use Gauss-Laguerre quadrature for the u- and v-integrals, and >Gauss-Legendre for x. This works very well for small indeces kappa, >kappa', k, k'. >However, already for kappa=0, kappa'=0 and k=30, k'=30, say, the >result of the triple quadrature becomes unreliable since the product >of the Laguerre polynomials in the integrand becomes very large >(1.D+300) whereas the quadrature weights beome very small (1.D-300) >and over/underflow occurs. >Neither could I write down an asymptotic formula for the integral >above. >Is there a better suited way to carry out the integral (I need >to it for many indeces...) in reasonable computational time? >Martin Stollwhat if you transform the integrals from [0,infy[ to ]0,1] and use high order gauss-kronrod like quadpack does?hthpeter=== === Subject: : Re: wavelet-based spectrogram - help needed by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HGjPH30432;dear alli am implementing wavelet based spectrogram approach forisolated word recognition can any one send me the matlab code for wavelet based spectrogramsthanks in anticipationnaresh=== === Subject: : Re: Random generation of covariance matrices> This doesn't look like a natural distribution of covariance> matrices. It is more likely that your application requires> that you generate them according to a Wishart distribution.Though I am not familar with Wishart distributions I cannot imaginehow it could help.My application is as follows:The required covariance matrix represents the dependency structure ofnormal returns of divisions of a company. Dependent on such arandomly drawn covariance matrix I want to calculate variousallocations of value at risk limits for each division and analyse someproperties. Since I cannot determine a realistic distribution forthese matrices, I want to assume uniform variances and correlations.=== === Subject: : Re: Random generation of covariance matrices>This doesn't look like a natural distribution of covariance>matrices. It is more likely that your application requires>that you generate them according to a Wishart distribution.> Though I am not familar with Wishart distributions I cannot imagine> how it could help.> My application is as follows:> The required covariance matrix represents the dependency structure of> normal returns of divisions of a company. Dependent on such arandomly drawn covariance matrix I want to calculate various> allocations of value at risk limits for each division and analyse some> properties. Since I cannot determine a realistic distribution for> these matrices, I want to assume uniform variances and correlations.The Wishart distribution is for covariance matrices what the Gaussiandistribution is for real numbers. Since you don't know anything aboutyour covariance matrices, I recommend you use a Wishart distributionwhose covariance matrix is a multiple of the identity matrix.This is a much more realistic default assumption than what you hadin mind.Arnold Neumaier=== === Subject: : Re: Random generation of covariance matrices>This doesn't look like a natural distribution of covariance>matrices. It is more likely that your application requires>that you generate them according to a Wishart distribution.>Though I am not familar with Wishart distributions I cannot imagine>how it could help.>My application is as follows:>The required covariance matrix represents the dependency structure of>normal returns of divisions of a company. Dependent on such arandomly drawn covariance matrix I want to calculate various>allocations of value at risk limits for each division and analyse some>properties. Since I cannot determine a realistic distribution for>these matrices, I want to assume uniform variances and correlations.If one assumes that the X_j are n independent normalvectors of size p with mean 0 and covariance matrixC = A*A', then the sum of X_j*X_j' has the Wishartdistribution with parameters n and C (p is the sizeof C). For simplicity, let us assume that n >= p;there are some easily seen complications otherwise.Then a random covariance matrix from this can berepresented as follows:Let b_ii have a chi distribution with n-i+1 degreesof freedom, and let b_ij, j>i, be normal (0,1), andlet all of these be independent. For i>j, b_ij=0.Then A*B*B'*A' is an efficiently generated matrixwith the Wishart distribution.If you want something else, I still suggest that yougenerate is as Q*Q', as this will guarantee that itis a covariance matrix. The correlations cannot beuniformly distributed.This address is for information only. I do not claim that these viewsare those of the Statistics Department or of Purdue University.Herman Rubin, Department of Statistics, Purdue Universityhrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558=== === Subject: : Re: Fast eigenvalue/eigenvector solutions>I need a fast module for determination of the eigenvalues and>eigenvectors of a 4x4 real symmetric matrix. (It needs to be fast>because it will be running many times on a slow machine.)> One can rather quickly reduce the matrix to tridiagonal> form, using two Householder transformations (one square> root for each). Then the characteristic equation can> be obtained, and the quartic solved. Finding the > vectors from the roots is easy, but if the roots wanted> are close to each other, or to unwanted roots, there > can be considerable roundoff error. Transforming back> is also quick. > BTW, when there is bad roundoff error here, any other> method will also have it. Not necessarily. A quartic polynomial with very closezeros gives very poor accuracy for the roots, while thesymmetric eigenvalue problem is perfectly conditioned andQR gives very accurate results.Try the matrixa bb a b b a b b awith a=1/3 and b=eps.Arnold Neumaier=== === Subject: : Keeping quaternion normalizedwhat's the recommended method of keeping the unit quaternionrepresenting orientation in a rigid body model normalized if the stateequation is integrated by some numerical method?Zipfel, Modeling and Simulation of Aerospace Vehicle Dynamics,recommends adding a term k ( 1 - || q || ) qto the RHS of the state equation, which effectifly uses the ODE solverto move q back to the surface of the unit sphere as soon as it'sdeviating. But what are the reasons against the simple method of justsetting q <- 1 / sqrt( || q || ) qafter each integration time step?Kind regards-GerhardPS: Return address given is a spam trap, please see my homepage for myreal address!Gerhard Wesp o o Tel.: +41 (0) 43 5347636Bachtobelstrasse 56 | http://www.cosy.sbg.ac.at/~gwesp/CH-8045 Zuerich _/=== === Subject: : Re: Keeping quaternion normalized> what's the recommended method of keeping the unit quaternion> representing orientation in a rigid body model normalized if the state> equation is integrated by some numerical method?> Zipfel, Modeling and Simulation of Aerospace Vehicle Dynamics,> recommends adding a term> k ( 1 - || q || ) q> to the RHS of the state equation, which effectifly uses the ODE solver> to move q back to the surface of the unit sphere as soon as it's> deviating. But what are the reasons against the simple method of just> setting> q <- 1 / sqrt( || q || ) q> after each integration time step?> Kind regards> -Gerhard> PS: Return address given is a spam trap, please see my homepage for my> real address!> -- > Gerhard Wesp o o Tel.: +41 (0) 43 5347636> Bachtobelstrasse 56 | http://www.cosy.sbg.ac.at/~gwesp/> CH-8045 Zuerich _/You're thinging q <- q/||q||, right?Adding a term k(1 - sum(q_i ^ 2))q has the advantage that you don't have totake a square root -- doing the four multiplies is bad, but taking a squareroot is really going to add to your execution time.=== === Subject: : Re: solution of non-linear dynamical system? by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HIZdO12018;cute... really cute... ;-)but doesn't help a bit! :(cheers,pedro>greetings!>i'm a biologist interested in the dynamical systemu[t]=1-exp(u[t-1])>starting from u[0]=1, in case it matters. >Yes it matters! What would've happened if you'd started with u[0]=0?>Nothing? (Couldn't resist!)>-- >Surendar Jeyadev jeyadev@wrc.xerox.bounceback.com> Remove 'bounceback' for email address=== === Subject: : Re: solution of non-linear dynamical system?> dave,> thanx for your reply :-)> i feel really stupid, though :-( after reading your reply, i realized> that i left a minus sign out. the real equation is> u[t]=1-exp(-u[t-1]) , so u is always positive, and decreasing. would> that make things any easier?Mathematica's power series calculation, with a lot of additional work, suggestsu[t] = 2/n - 2 log(n)/(3 n^2) + (2 log(n)^2 - 2 log(n) + 1)/(9 n^3) - (10 log(n)^3-25 log(n)^2+25 log(n)-7)/(135 n^4) + O(n^(-5+eps)),where n = t+C, for some C. Does this help?=== === Subject: : Re: solution of non-linear dynamical system? by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2I0Etf19326;arthur,this helps an awful lot! thanx very much! :-)did you by any chance save your work? is there any way you couldemail me your mathematica notebook, so i could try and learn how youdid it, please? oh, and... any chance of bounds on C, or is that asking for too much?;-)cheers, and thanx again,pedro>the real equation is>u[t]=1-exp(-u[t-1]) , so u is always positive, and decreasing. would>that make things any easier?>Mathematica's power series calculation, with a lot of >additional work, suggests>u[t] = 2/n - 2 log(n)/(3 n^2) + (2 log(n)^2 - 2 log(n) + 1)/(9 n^3) -> (10 log(n)^3-25 log(n)^2+25 log(n)-7)/(135 n^4) +O(n^(-5+eps)),>where n = t+C, for some C. Does this help?=== === Subject: : Re: solution of non-linear dynamical system?I never do it the same way twice, and I didn't save the notebook.Outline of method:1. Guess form of solution as Sum(i=1..infinity n^-i, a[i][Log[n]])2. Write Onn = (Series[n,{n,Infinity,1}]-n)/nComment: You can't just write O[1/n], even though it displays that way.3. Write un (for u_n) = Sum[a[i][Ln]n^-i,{i,5}] + Onn^6Comment: You need one more term in the expressions than you can evaluate in the final result.4. Evaluate the corresponding series for u(n+1) as:un1 = (Normal[un] /. {n->n+1,Ln->Ln+Log[1+1/n]}) + Onn^65. eqn = un1 == 1-Exp[-un];6. LogicalExpand[eqn]7. Manually solve the 4 differential equations for a[1],...,a[4],noting that any solution that grows exponentially is invalid.8. After substituting the solutions of the equations into un, replace Ln by Log[n].No idea about bounds on C. If the series converges, or ifyou could approximate the sum by an integral....> arthur,> this helps an awful lot! thanx very much! :-)> did you by any chance save your work? is there any way you could> email me your mathematica notebook, so i could try and learn how you> did it, please?> oh, and... any chance of bounds on C, or is that asking for too much?> ;-)> cheers, and thanx again,> pedro> the real equation is> u[t]=1-exp(-u[t-1]) , so u is always positive, and decreasing.> would> that make things any easier?>Mathematica's power series calculation, with a lot of>additional work, suggests>u[t] = 2/n - 2 log(n)/(3 n^2) + (2 log(n)^2 - 2 log(n) + 1)/(9 n^3) -> (10 log(n)^3-25 log(n)^2+25 log(n)-7)/(135 n^4) +> O(n^(-5+eps)),>where n = t+C, for some C. Does this help?=== === Subject: : Re: To prove a connection between 26 & 666 by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i2HK6iC22917;Because Google cherishes all her Forum and discussion links (andlikewise this oldie!) it seems reasonable to add my (final?)evaluation of the question, for which I created some web pages:http://geocities.com/delfiden/text/sss6.htmhttp:// geocities.com/freezotic/deo/s2s108s.htmlhttp://geocities.com/ freezotic/deo/s109s1000s.htmlhttp://geocities.com/freezotic/ deo/s1001s12000s.htmlhttp://geocities.com/freezotic/deo/s666. htmlGreetingsFreezotic=== === Subject: : Numerical integration of Laguerre polynomialsI'm stuck with the following problem which arose during a physicsproject: Three-dimensional integration of a product of four associatedLaguerre polynomials of the formint_0^inf du sqrt(u) exp(-u) LaguerreL(kappa,1/2,u) timesint_0^inf dv sqrt(v) exp(-v) LaguerreL(k,1/2,v) timesint_{-1}^{+1} dx LaguerreL(kappa',1/2,f(u,v,x)) LaguerreL(k',1/2,g(u,v,x)) (sorry for the mixed LaTeX/Maple notation). The functions f and g inthe innermost integrand are linear in x but, unfortunately, not in uand v.I used nested Gauss-Laguerre integrations for u and v, andGauss-Legendre for x. This works very well for small values of theindeces kappa, kappa', k, k' <= 30.For larger indices, kappa, kappa', k, k' >= 30, however, I run into thetrouble that the integrand becomes extremely large (1.D+300) whereasthe Gauss integration weights become extremely small (1.D-299),leading to a terrible loss in accuracy when summing them up.Since I'm unexperienced with this kind of problem I was hoping thatsomeone could give me a good hint.Martin Stoll=== === Subject: : Numerical integration of Laguerre polynomialsHello (I'm re-sending this since my first message seems to have got lost),I've been stuck for a while with the following problem: I need tocalculate a matrix element between 3D harmonic oscillator states. Itlooks as follows:int_{0}^{infty} du u^{1/2} exp(-u) L_{kappa}^{1/2}(u) timesint_{0}^{infty} dv v^{1/2} exp(-v) L_{k}^{1/2}(v) timesint_{-1}^{+1} dx L_{kappa'}^{1/2}(f(u,v,x)) L_{k'}^{1/2}(g(u,v,x))where L_{k}^{1/2) is the associated Laguerre polynomial of order kwith upper index 1/2 and f and g are simple functions of theirvariables (but not linear). For low excitation indeces (kappa,kappa',k,k' <= 30) I can useGauss-Laguerre integration on the u- and v-integrals, andGauss-Legendre on the x-integral. This works very well. For larger indeces, however, the Gauss-Laguerre weights at large meshpoints u, v become extremely small (~1.E-300) and even underflowwhereas the integrand itself becomes very large (~1.E+299), althoughtheir product is, in principle, still of the order unity . Whensumming up the Gauss-Laguerre integration formula this leads to a hugenumerical inaccuracy. On the other hand I don't know of anotherintegration scheme to do the triple integral (and I need to do many ofthem) in reasonable computer time.Perhaps a rewrite of the integrand as exp(-u + ln L{kappa}^{1/2})etc. would help, but I don't know of any formulas for the logarithm ofthe Laguerre polynomials...As I'm unexperienced with this kind of problem I was hoping thatsomeone could give me some better ideas :) Martin Stoll Martin Stoll Institut f.9fr Theoretische Physik, Uni G.9attingen f: +49-551-39-7687 Tammannstrae 1, 37077 G.9attingen, Germany