[VA] SRC #007 - 2020 April 1st Ramblings
|
04-09-2020, 11:46 PM
(This post was last modified: 04-10-2020 12:18 AM by Valentin Albillo.)
Post: #13
|
|||
|
|||
RE: [VA] SRC #007 - 2020 April 1st Ramblings
Hi all: Thanks for your appreciation and your excellent inputs to my 9 ramblings. As stated, I'll give here my original comments on them: 1) Re solving the system: u + [ v ] + { w } = 200.0 { u } + v + [ w ] = 190.1 [ u ] + { v } + w = 178.8 Both solutions posted are fully correct, namely u = 94.65, v = 105.45, z = 84.35. 2) Re solving the equation: x2 - 10 [x] + 12.75 = 0 Again, the posted solution is correct and the equation has indeed four real roots, namely √29/2, √189/2, √229/2 and √269/2. It's somewhat funny that simply adding a [] doubles the number of real roots. 3) Solving the matricial equation: X2 + 2 X + 5 I = 0 The equivalent scalar equation, x2 + 2 x + 5 = 0, has the two conjugate complex roots (-1, 2) and (-1, -2). Now, a complex scalar (x,y) can be represented as a 2x2 matrix, | x -y | | y x | so, for instance, the complex scalar root (-1, 2) can be represented as | -1 -2 | | 2 -1 | and this 2x2 matrix is indeed a root of the matricial equation. The same goes for the matrix corresponding to the conjugate scalar root (-1, -2) and if desired, this simple HP-71B code can be used to check them: 1 DESTROY ALL @ OPTION BASE 1 @ DIM A(2,2),B(2,2),C(2,2) 2 MAT INPUT A 3 MAT B=A*A @ MAT B=B+A @ MAT B=B+A @ MAT C=IDN @ MAT C=(5)*C @ MAT B=B+C 4 MAT DISP B; >RUN A(1,1)=? -1, -2, 2, -1 [END LINE] 0 0 0 0 4) Re finding the matricial equation which has this 3x3 matrix as a root:: 2 3 5 7 11 13 17 19 23 As Bernd Grubert posted, by the Cayley–Hamilton theorem, a matrix is always a root of its own characteristic polynomial (which can be found using the 5-liner program featured in page 6 of my article "HP Article VA012 - HP-71B Math ROM Bakers Dozen (Vol. 2).pdf"), which for this matrix happens to be: P(x) = x3 - 36*x2 - 32*x + 78 and indeed the given matrix is a root of this polynomial equation in its matricial form: P(X) = X3 - 36*X2 - 32*X + 78 I = 0. As an aside, the eigenvalues are the roots of the characteristic polynomial, namely 1.10530, -1.91703 and 36.81173. As a check, - their sum is 36, which equals the trace (sum of the main diagonal elements) of the matrix: 2 + 11 + 23 = 36 - their product is -78, which equals the determinant of the matrix, which indeed is -78. 5) Finding some simple way to express the Nth Fibonacci number using them, perhaps as simple as a few lines of RPN/RPL code or a short single-line user-defined function, used like this: FNF(1) = 1, FNF(2) = 1, FNF(3) = 2, ..., FNF(10) = 55, ... Regrettably no one posted anything about this one so, as usual, I won't comment anything either. 6) Finding exceptions to the following near-identity (where N > 0 is an integer and log2 is the natural logarithm of 2 = 0.693+): Ceil(2/(21/N - 1)) = [2*N/log2] As it happens, the following one is a true identity: [(1/(exp(sqr(2)/n)-1)] = [n/sqr(2)-1/2] but the one given above is only a near-identity with infinite exceptions, the first being n = 777451915729368, as we'll see below. The near-identity may fail only for those n which are denominators of the num/dem convergents to 2/log(2) so it suffices to generate said convergents and check their denominators. The following generic UBASIC code lists the convergent's numerators num, denominators den and resulting values num/den for any given positive real number x, with max. err = 10-40 and num, den being limited to a maximum of 20 digits (all these limits can be trivially modified in the code below): 10 point 8 : input X : W=10^(-40) : Md=10^20 : gosub 40 20 print : print N,D : print N/D : print Z : end 30 ' 40 V=1 : N=1 : D=0 : Y=10^99 : Z=X 50 C=int(X) : Fp=X-C : if Fp=0 then N=N*C+U : D=D*C+V : return 60 X=1/Fp : S=N : T=D : N=N*C+U : U=S : D=D*C+V : V=T : R=N/D : print N; D, R 70 if abs(R/Z-1)<=W then return 80 if R=Y or max(N,D)>Md then N=U : D=V : return else Y=R : goto 50 run ? 2/log(2) 2 1 2.0 3 1 3.0 23 8 2.875 26 9 2.88888888888888888888888888888888888888 75 26 2.88461538461538461538461538461538461538 101 35 2.88571428571428571428571428571428571428 176 61 2.88524590163934426229508196721311475409 277 96 2.88541666666666666666666666666666666666 1007 349 2.8853868194842406876790830945558739255 2291 794 2.88539042821158690176322418136020151133 10171 3525 2.88539007092198581560283687943262411347 73488 25469 2.88539008206054419097726648081982017354 377611 130870 2.88539008176052571253916099946511805608 1206321 418079 2.88539008177880257080599599597205312871 7615537 2639344 2.88539008177789632575367212458853412059 31668469 10975455 2.88539008177793084660271487605753018895 39284006 13614799 2.88539008177792415444399876928039848403 70952475 24590254 2.88539008177792714137885684304033622426 323093906 111975815 2.88539008177792677820652611459001213788 394046381 136566069 2.88539008177792684359978172909114049405 717140287 248541884 2.88539008177792681413809513087942956125 ... The following 4-line particularized code finds and outputs the first three exceptions almost instantly: list 1 point 11 : X=2/log(2) : Z=X : V=1 : N=1 : D=0 : repeat : C=int(X) : F=X-C 2 if F=0 then end else X=1/F : S=N : T=D : N=N*C+U : U=S : D=D*C+V : V=T 3 if ceil(2/(2^(1/D)-1))<>floor(Z*D) then print D 4 until D>10^19 run 777451915729368 140894092055857794 1526223088619171207 OK Let's check them: point 10 n=777451915729368:?ceil(2/(2^(1/n)-1)),floor(2*n/log(2)) 2243252046704767 2243252046704766 n=140894092055857794:?ceil(2/(2^(1/n)-1)),floor(2*n/log(2)) 406534415799078269 406534415799078268 n=1526223088619171207:?ceil(2/(2^(1/n)-1)),floor(2*n/log(2)) 4403748962482230453 4403748962482230452 and indeed all three are exceptions, as the left and right sides of the near-identity differ by 1. 7) Finding the minimum warp factor Kirk should engage in order to meet the deadline and avoid massive loss of life: As has been pointed out by Paul Dale, the ore planet is 504 lighthours away, i.e. 504/24/7 = 3 lightweeks away, and as the USS Enterprise is travelling at half impulse (1/2 lightspeed) it will take her 3/(1/2) = 6 weeks to arrive there so, as the deadline is precisely 6 weeks, it will have zero time to make the return trip to the dangerous star and thus Kirk would need to order an infinite warp factor to (just!) meet the deadline, which his starship of course can't achieve. The conundrum seems hopeless but Cpt. Kirk's has always distinguished himself (among many other things) for not believing in the unwinnable scenario, as he always does whatever is needed to get the problem solved. He demonstrated as much early in his career, when solving the training "Kobayashi Maru" unwinnable scenario by blatant cheating, reprogramming the simulation so that he could win it alright. Same here. By the time Kirk arrives at the ore there's no time to meet the deadline but there's a canon maneuver Kirk has used several times in both the TV series and the movie "Star Trek IV: The Voyage Home", consisting in time-traveling to the past by performing the so-called "slingshot around the sun" maneuver, defined by Dr. Leonard "Bones" McCoy as "You pick up enough speed, you're in time warp. If you don't – you're fried." In essence, the maneuver consists in going very close around a star at high warp speed and its main result (if you don't get fried) is that the starship time-travels (even several centuries in the past/future if needed), so Kirk, which has consistently performed this maneuver a number of times using both the USS Enterprise and a Klingon Bird of Prey, would simply arrive at the ore planet in 6 weeks, beam the ore aboard, and then order high warp towards and around the ore planet's sun (it has one as it's not a rogue planet, it belongs to a system). The carefully calculated (by Spock) maneuver would succeed in getting the Enterprise a sufficient amount of time in the past, then order whatever achievable warp speed is needed to make it to the potentially-exploding star in time. Thus, once in the past, assuming Kirk orders maximum warp (14) the USS Enterprise will be back in just 504/143 ~ 11 minutes. It's cheating, I know, but it's perfectly canon and entirely consistent with Kirk's attitude towards "unwinnable" scenarios: he doesn't believe in them. 8) On whether the function exp(exp(z)) appears to contradict Picard's Little Theorem by missing two values in the complex plane, namely 0 and 1: As J-F Garnier's post makes it perfectly clear, Picard's LT is safe because while exp(something) can never take the value 0 it sure can take the value 1 for (complex) nonzero arguments. 9) As for the final spread of misc ramblings: - the equation Gamma(x) = Gamma(y) has trivial solutions x = y but surely nontrivial solutions can be found as well ? Yes, infinitely many. For instance, both Gamma(-1.33980199358) and Gamma(-1.78118797146) evaluate to 3.00000000000, give or take a few ulps. - the Gamma function grows faster than the exponential function, and we find the positive value of x for which their graphics cross for the last time, like this (HP-71B code): >FNROOT(1,10,GAMMA(FVAR)-EXP(FVAR)) 7.46360328378 >X=RES @ GAMMA(X),EXP(X) 1743.41878559 1743.41878559 >GAMMA(LN(RES)) 1743.41878559 ( = RES) - Gamma(Pi) and Gamma(-Pi/2) are surprisingly close when rounded to 2 decimal places >FIX 2 @ GAMMA(PI);GAMMA(-PI/2) @ STD 2.29 2.30 but slightly changing Pi to Pi+(2/52)2 above makes both expressions agree to no less than 8 places when truncated. >X=PI+(2/5^2)^2 @ GAMMA(X);GAMMA(-X/2) 2.30241003575 2.30241009575 - the equation sin(x)+(7*x+1)*cos(x+1) = x has a surprising root in the interval [12, 14], namely: >FNROOT(12,14,SIN(FVAR)+(7*FVAR+1)*COS(FVAR+1)-FVAR) 12.9999999016 which is a near-integer very close to 13. Indeed, 13 almost satisfies the equation: >SIN(13)+(7*13+1)*COS(13+1) 12.9999911119 (i.e.: ~13) As for the nice square roots and to answer EdS2 question, yes, I did use brute-force to find such patterns (and many more !) but I didn't keep a count of how many square roots did I have to search, surely quite a lot. However, the search is quite fast so finding patterns up to, say, 10 digits while looking at (say) 100-decimal square roots didn't take long and I could indulge in it without wasting undue amounts of time, That's all, Have a nice weekend and take care ! V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)