A weekend quickie  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: A weekend quickie (/thread237726.html) 
A weekend quickie  Valentin Albillo  01252013 Hi, all:
A nice quickie for the weekend (though I don't think it will take most of you more than a few minutes to solve):
Oh, and the correct value for d is somewhat surprising ! ... 8)
Best regards from V.
Re: A weekend quickie  Paul Dale  01252013 Using the 34S and its standard library triangle solver kind of makes this one easy, although the keystroke count is high:
XEQ'TRI' I don't however recognise the surprise :(
Re: A weekend quickie  Valentin Albillo  01252013 Quote: Thanks for your interest, Pauli. If you don't see the "surprise" it might be the case that your value for "d" isn't the correct one. Perhaps some slightly wrong assumption on your part ? ... 8)
Best regards from V. Re: A weekend quickie  Paul Dale  01252013 Ahhh, I see the mistake now :(
Re: A weekend quickie  Paul Dale  01252013 And I managed to guess & then verify the correct answer :)
 Pauli
Re: A weekend quickie  JeanMichel  01252013 Hello,
perhaps should you mention that the figure is not contractual in its current state, somewhat confusing. Re: A weekend quickie  Valentin Albillo  01252013 Quote:
Have a nice weekend, Pauli !
Best regards from V. Re: A weekend quickie  Gerson W. Barbosa  01252013 Hello Valentin,
I've resorted to Heron's formula:
p_{1} = (27 + 23 + d)/2The respective areas are A_{1} = 1/4*sqrt(2516*d^{2}  d^{4}  40000)Then, using the equality A_{4} = A_{1} + A_{2} + A_{3}on the hp 50g in exact mode we get this equation %%HP: T(3)A(R)F(,);which can easily be solved for d, giving a surprising result indeed! Thanks and Best regards, Gerson.
Edited: 25 Jan 2013, 9:49 a.m.
Re: A weekend quickie  C.Ret  01252013 Hi,
Here my humble contribution to this W.E. Quickie.
« 30 > ab // ab is base length (distance frrom point A to point B)
I am just curious of versions for others calculators, especially RPN ones as well as the HP39gII ! Have a nice WeekEnd.
Edited: 27 Jan 2013, 9:28 a.m. after one or more responses were posted
Re: A weekend quickie  JeanMichel  01252013 Hi, here is an HP41 version:
Re: A weekend quickie  Walter B  01252013 Using good old Euklidian and Pythagorean mathematics, I get:
The height of the small (bottom) triangle is h_{s}= 23 x 16 / 30.
The height of the big (outer) triangle is h_{b}= 27 x 22 / 30. Thus I have two points (c_{s}; h_{s}) and (c_{b}; h_{b}), and d is the distance of those.
Using my WP 34S (what else?) I calculate: CL[Sigma]... and get d but don't get a surprise :? Re: A weekend quickie  fhub  01252013 Result with Derive:
Franz
Re: A weekend quickie  fhub  01252013 Quote:That would only be true for rightangled triangles. That's why you don't get a surprise ... ;)
Franz
Re: A weekend quickie  Walter B  01252013 Oooh  rats! That's the consequence of my blind belief in Euklid :(
Re: A weekend quickie  Gerson W. Barbosa  01252013 I used to believe in Euclides myself. He was my math teacher in highschool for two years :)
Re: A weekend quickie  Walter B  01252013 ... I should have used TRI for the triangular calculations :I F... ambition :( OK, with the angle alpha and the side c of the bottom triangle I get x and y for point s via >REC returning (19.550; 12.116). Put it into statistic registers via [Sigma]+.
Same for the outer triangle, returning (19.083 ; 19.100) for point b. Calculating the distance via [Sigma] , SUM, and >POL returns 7.
Re: A weekend quickie  Walter B  01252013 :)
Re: A weekend quickie  Maximilian Hohmann  01252013 Quote:
I cheated and used this website to get the same result: http://www.mathepower.com/dreieck.php Maybe the website is hosted on an HPcomputer ;)
Re: A weekend quickie  Gerson W. Barbosa  01252013 Hi Franz, The old saying "there is more than a way to skin a cat" still holds :)
When the images above are eventually gone, just submit solve [1/4*sqrt(d^4+1480*d^251984)+1/4*sqrt(d^4+2516*d^240000))+69/4*sqrt(111)5/4*sqrt(52535)==0] for dto WolframAlpha.
Re: A weekend quickie  fhub  01252013 Quote:That's right, Gerson. ;) But I guess that more people would know the cosinerule than Heron's area formula, and it's certainly easier to give a solution with a simple formula instead of having to solve a quartic equation. Of course your equation gives the same solution, but the exact WolframAlpha result is much more complicated than the one I get with Derive  I know why Derive is still my favourite CAS (at least for daily use). :)
Franz
Re: A weekend quickie  Gerson W. Barbosa  01252013 You're right! I didn't mean to say "mineisbetter" :)
One of these days I was reading about Heron's formula (and Brahmaguta's) in a book written by a local electrical engineer, so it was the first thing I thought of when I saw the problem. The quadratic equation would be really somewhat difficult to solve by hand, but that's an easy job for the HP solver. Best regards,
Gerson.
Re: A weekend quickie  Dieter  01252013 It can be done with three "TRI" calls ...and virtually no mathematical knowledge at all. ;) XEQ"TRI"Et voilà... Dieter
Edited: 25 Jan 2013, 3:27 p.m.
Re: A weekend quickie  fhub  01252013 Quote:Well, that's exactly the method I showed with my Derive output. And the 'mathematical knowledge' needed is already packed into my program "TRI". ;) Franz
Edited: 25 Jan 2013, 3:37 p.m.
Re: A weekend quickie + Similar Problems  JeanMichel  01252013
Re: A weekend quickie  Gilles Carpentier  01252013 Here is a solution for HP39GII which use the TRIANGLE "Apps" :
EXPORT TRI(a,b,c,d,f) TRI(30,23,16,27,22) returns ... the answer ;)
SSS Uses the lengths of the three sides of a triangle to
SAS Uses the length of two sides and the measure of
Nota : There is a mistake in the documentation. these functions doesn't returns a list all 6 values but only the 3 unknows. But I like the "integrated" help (in french ;) on this calculator
Edited: 25 Jan 2013, 5:44 p.m.
Re: A weekend quickie + Similar Problems  fhub  01262013 Quote:
Franz
Re: A weekend quickie + Similar Problems  Gerson W. Barbosa  01262013 Quote:
Let the Cartesian coordinates of the points A, B, C and M be A(0,0), B(0,x), C(x/2,x*sqrt(3)/2), M(a,b)Then AM = sqrt(a^2 + b^2) = 57 => a^2 + b^2 = 3249 (1)Expanding (2) a^2  2*a*x + x^2 + b^2 = 4225and replacing a^2 + b^2 with 3249, from (1), gives x^2  2*a*x  976 = 0From (1) b = sqrt(3249  a^2) (5)Plugging (4) and (5) into (3) gives (a  (a+sqrt((a^2 + 976)))/2)^2 + (sqrt(3249  a^2)  (a + sqrt((a^2 + 976)))*sqrt(3)/2)^2  5329 = 0When solving %%HP: T(3)A(R)F(,);on the HP 50g we get a = 51.6428571428The fractional part suggests this is the rational number 723/14
Replacing it in (4) finally gives x = 723/14 + sqrt((723/14)^2 + 976)This is actually a numerical solution in disguise, however.
Gerson.
Re: A weekend quickie  C.Ret  01262013
Good catch Gilles !
Re: A weekend quickie  Mike Reed  01262013 This is only absolutely true IF the figure is two dimensional (all 4 points lie in the same plane) If the figure is 3 dimensional (a tetrahedron) then the correct length has a range where the minimum is 7. What is the maximum? :o)
mike
Re: A weekend quickie  Dave Shaffer (Arizona)  01262013 If you have complete freedom to move one of the apexes around, you should move it to the other side  in other words, flip one of the triangles top to bottom (or, rotate 180 degrees around the length 30 side). The result is planar again, but I think that will maximize d.
I get a value of 31.219918836 for that (with my HP35S, using Heron's rule to find the areas and then the heights of the triangles to ascertain the coordinates of the two corners connected by d).
Re: A weekend quickie  George Litauszky  01272013 Here is a geometry solution.It's true: The calculator isn't a HP. It's a TI92Plus with the Geometer's Sketchpad flash application. Re: A weekend quickie  Walter B  01272013 Interesting solution. How large is the quantisation error in this context?
Re: A weekend quickie  George Litauszky  01272013 It seems in this case nothing. I can move the cursor pixel by pixel horizontally and vertically and I get integer coordinate values. In diagonal direction these values are decimal fractions but I can't write a needed exact value directly from the keyboard. :(
Re: A weekend quickie + Similar Problems  JeanMichel  01272013
Hi, very good solutions ! Re: A weekend quickie + Similar Problems  Gerson W. Barbosa  01272013
Quote:n [ (a1)^4 + ........ + (an)^4 + x^4 ] = [ (a1)^2 + ......... + (an)^2 + x^2 ]^2 It works also when n = 2:
2*(a^4 + (x  a)^4 + x^4) = (a^2 + (x  a)^2 + x^2)^2 = 4*a^4  8*a^3*x + 12*a^2*x^2  8*a*x^3 + 4*x^4 When n = 8 and the point M is located in the center we should expect x = a_{i}. I have no idea what a 7simplex looks like, however. Best regards, Gerson.  P.S.: The latter is is not correct. made a mistake when testing the original equation on the HP50g (I used n = 8 when it should have been 7). The ration between x and a_{i} is 1.5275 in this case (it appears to tend to sqrt(2) when n increases). Here are my RPN programs for three calculators: HP41:
01 LBL 'SXExample:
Let's find x when a(1) = 56, a(2) = 59, a(3) = 69, a(4)= 79, as in your second problem. 1) It is assumed the statistical registers are at their default locations (Otherwise SIGMAREG 11 is necessary); 2) In case one a_{i} = 0 then is has to be entered first.
HP42S:
Edited: 28 Jan 2013, 9:59 a.m. after one or more responses were posted
Re: A weekend quickie + Similar Problems  JeanMichel  01282013 Hi Gerson, you're right: the formula also works if n = 2
Re: A weekend quickie + Similar Problems  Gerson W. Barbosa  01282013 Hello JeanMarc, I've made a mistake (Please see my edited post above). I believe your conjecture is true, but proving it is certainly beyond my limited stills. But I have added my own version of the program (which can be of course improved :) Best regards, Gerson.
Edited: 28 Jan 2013, 10:05 a.m.
Re: A weekend quickie + Similar Problems  JeanMichel  01282013 Hi Gerson Re: A weekend quickie  George Litauszky  01282013 This is an other solution for HP 15C. (DM15CC)
First I calculated an angle with the solver from 2 eqations.
 Edited: 28 Jan 2013, 4:33 p.m.
Re: A weekend quickie + Similar Problems  Paul Dale  01282013 Quote: hshift 0 (zero) in alpha mode.
Re: A weekend quickie + Similar Problems  Walter B  01282013 Please see pp. 61 and 123 in the manual.
d:)
Re: A weekend quickie + Similar Problems  Gerson W. Barbosa  01282013 Please count me in for the printed manual, if still available :)
Re: A weekend quickie + Similar Problems  Walter B  01282013 Don't be afraid, sales didn't start yet.
d:)
Re: A weekend quickie + Similar Problems  Gerson W. Barbosa  01282013 A shorter HP42S version:
00 { 61Byte Prgm } Re: A weekend quickie + Similar Problems  Gerson W. Barbosa  01282013 Thanks, Pauli & Walter :)
Re: A weekend quickie + Similar Problems  Paul Dale  01282013 I almost wrote that the space is clearly printed on the overlay :)
 Pauli
Re: A weekend quickie  Gerson W. Barbosa  01302013 Quote:
You're quite right, Franz! h_{1}^2 = 23^2  (30  a)^2Likewise, h_{2}^2 = 27^2  (30  b)^2
Now, d can be calculated as: d = sqrt((h_{2}  h_{1})^2 + (b  a)^2) Regards, Gerson.
Re: A weekend quickie  Gerson W. Barbosa  01302013 Quote:This is one of the positive roots of
900*x^4  921315*x^2 + 42983536 = 0 The other is the answer to the original problem. Re: A weekend quickie  Valentin Albillo  01312013 Quote:
Actually, the minimal polynomial for d is:
The root of this polynomial near 7 is:
Just for the record, this polynomial has 6 real roots and two complex conjugate ones, which can be readily found to full 12digit accuracy with this HP71B code snippet:
>LIST
Best regards from V.
Re: A weekend quickie  Dave Shaffer (Arizona)  01312013 Quote:
Other than being so close to 7, is there something else surprising?
Re: A weekend quickie  Gerson W. Barbosa  01312013 Hello Valentin,
Quote: Another root is d when the outer triangle is turned 180 degrees along the common base. I fail to see what the other the other positive real roots might be, however. Any idea? Best regards, Gerson.
Re: A weekend quickie  Valentin Albillo  02012013 Quote:
What would it take to surprise you, Dave ?
Have a nice weekend. Re: A weekend quickie  Valentin Albillo  02012013 Quote:
Should the closedform expression have included three nested square roots, a 16th degree minimal polynomial would have been likely and then you'd have 15 spurious roots, several of them complex. Surely you wouldn't expect all of them to be geometrically significant for the simple original problem. When mathematically modeling physical or geometrical problems it's frequently the case that the resulting equations do have a number of spurious solutions and only one (or a few of them) are physically relevant.
Thanks for your interest, Gerson, have a nice weekend.
Re: A weekend quickie  fhub  02012013 Quote:I don't understand how you got an 8thdegree minimal polynomial!? Gerson's formula was this: d = sqrt((61421  23*sqrt(5831385))/120)
1) squaring this equation removes the first sqrt:
2) isolating the sqrt on the right side gives:
3) now squaring again removes the last sqrt:
Simplifying this equation results in: So I get only a 4thdegree minimal polynomial  in fact it's even simpler, because it's only a biquadratic polynomial (I hope it's called so also in English), and thus there are only 4 solutions: d = +/7.000000085736748 and d = +/31.21991883610556
Franz
Re: A weekend quickie  Walter B  02012013 Using the WP 34S solver, I get d = ±7.000000085736749 ±1 ULP and d = ±31.21991883610557 ±1 ULP, FWIW.
d:)
Re: A weekend quickie  fhub  02012013 20digit precision:
d = +/7.0000000857367483285 or d = +/31.219918836105561685 Edited: 1 Feb 2013, 12:19 p.m.
Re: A weekend quickie  Walter B  02012013 OK, this is equivalent within the error limits stated :) But how about extending the competition to 34 digits precision? The WP 34S results are: d = ± 7.000 000 085 736 748 328 572 881 969 310 250 and d = ± 31.219 918 836 105 560 168 517 182 990 245 632
d:)
Re: A weekend quickie  fhub  02012013 Quote:No problem, how about 100 digits?
d = +/7.000000085736748328572881969310250391260161759083199434052434930386213592541808806752093242226512477
Not enough? Well, how many do you want? ;)
Re: A weekend quickie  Thomas Klemm  02012013 Quote: 900x^{8}  3600x^{7}  924915x^{6} + 3682560x^{5} + 46667896x^{4}  169170199x^{3}  171012829x^{2}  128950608x  42983536 = (x^{4}  4x^{3}  4x^{2}  3x  1) (900x^{4}  921315 x^{2} + 42983536)
Cheers Re: A weekend quickie  Dave Shaffer (Arizona)  02012013 Quote:
I thought maybe we were after something like e^pi or pi^e or some other exotic combination of various constants!
Re: A weekend quickie  fhub  02012013 Quote:Hi Thomas, that doesn't answer my question. I wanted to know why Valentin got an 8thdegree minimal polynomial, when in fact a 4thdegree is enough?
Franz
Re: A weekend quickie  Walter B  02012013 I guess you're cheating and using unfair means like PCs or other appalling stuff ;)
Re: A weekend quickie  Thomas Klemm  02012013 True. It just shows how the two equations are related.
Quote: My assumption is, that he used a different set of equations than Gersons solution:
d = sqrt((61421  23*sqrt(5831385))/120)
Quote:
I don't understand why he insisted on that when it's obviously wrong. The degree of the minimal polynomial of But yes, I'd be interested in the answer to your question as well.
Cheers Re: A weekend quickie  Valentin Albillo  02012013 Quote:
I used an online PSLQ algorithm on a 100digit approximation to the value and though it correctly found an integer relation regrettably it wasn't the lowestdegree, minimal polynomial I expected it to find. Your biquadratic polynomial is a factor of the 8thdegree one I gave, of course, and it does contain the correct value as a root. So much for trusting free online tools without checking ... :)
Thanks for pointing it out and have a nice weekend. Re: A weekend quickie  Gerson W. Barbosa  02012013 The answer to the problem in the OP belongs in the realm of the nearinteger (or almost integer). I've found this one involving pi only: And another involving e: Surprising, interesting, futile? You decide :)
Gerson.
