Little explorations with HP calculators (no Prime) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Little explorations with HP calculators (no Prime) (/thread-7955.html) Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 RE: Little explorations with the HP calculators - Gerson W. Barbosa - 04-08-2017 09:17 PM (04-08-2017 05:19 PM)Han Wrote:  For anyone who is curious about the tedious algebra using Heron's formula as shown by Gerson, here is a text output from Maple 17: Code: > restart: > eq1:=a^2=b^2+c^2-2*b*c*cosA;                            2                  2    2                           a  = -2 b c cosA + b  + c  > eq2:=b^2=a^2+c^2-2*a*c*cosB;                            2                  2    2                           b  = -2 a c cosB + a  + c  > eq3:=c^2=a^2+b^2-2*a*b*cosC;                            2                  2    2                           c  = -2 a b cosC + a  + b  > s1:=1/2*(a+b+c);                                1     1     1                                  - a + - b + - c                                2     2     2   > solve({eq1,eq2,eq3},{cosA,cosB,cosC});       /          2    2    2          2    2    2          2    2    2\        |         a  - b  - c          a  - b  + c          a  + b  - c |       < cosA = - ------------, cosB = ------------, cosC = ------------ >       |            2 b c                2 a c                2 a b    |        \                                                               /  > cosA := -(1/2)*(a^2-b^2-c^2)/(b*c); cosB := (1/2)*(a^2-b^2+c^2)/(a*c); cosC := > (1/2)*(a^2+b^2-c^2)/(a*b);                                    2    2    2                                   a  - b  - c                                  - ------------                                      2 b c                                       2    2    2                                  a  - b  + c                                   ------------                                     2 a c                                       2    2    2                                  a  + b  - c                                   ------------                                     2 a b     > b:=2*r; c:=3*s; a:=4*t;                                      2 r                                      3 s                                      4 t > eq5:=u^2=s^2+(b-r)^2-2*s*(b-r)*cosA;                            2     1  2   1  2   8  2                           u  = - - s  + - r  + - t                                   2      3      3    > eq6:=v^2=t^2+(c-s)^2-2*t*(c-s)*cosB;                            2     5  2   5  2   2  2                           v  = - - t  + - s  + - r                                   3      2      3    > eq7:=w^2=r^2+(a-t)^2-2*r*(a-t)*cosC;                            2     1  2      2   27  2                           w  = - - r  + 3 t  + -- s                                   2             8     > s2:=1/2*(u+v+w);                                1     1     1                                  - u + - v + - w                                2     2     2   >  >  > H1:=expand(s1*(s1-a)*(s1-b)*(s1-c));                  2  2       2  2   9  2  2       4    4   81  4               8 t  r  + 18 t  s  + - r  s  - 16 t  - r  - -- s                                     2                      16    > H2:=expand(s2*(s2-u)*(s2-v)*(s2-w));              1  2  2   1  2  2   1  2  2   1   4   1   4   1   4              - u  v  + - u  w  + - v  w  - -- u  - -- v  - -- w               8         8         8         16      16      16    > u2:=-1/2*s^2+1/3*r^2+8/3*t^2; v2:=-5/3*t^2+5/2*s^2+2/3*r^2; > w2:=-(1/2)*r^2+3*t^2+(27/8)*s^2;                                1  2   1  2   8  2                              - - s  + - r  + - t                                 2      3      3                                   5  2   5  2   2  2                              - - t  + - s  + - r                                 3      2      3                                  1  2      2   27  2                             - - r  + 3 t  + -- s                                2             8     > H2:=expand(-1/16*u2^2-1/16*v2^2-1/16*w2^2+1/8*u2*v2+1/8*u2*w2+1/8*v2*w2);           49  2  2   49  2  2   49   2  2   49  4   49   4   441   4           -- t  r  + -- t  s  + --- r  s  - -- t  - --- r  - ---- s            72         32         128         36      576      1024    > simplify(H1/H2);                                      576                                      ---                                      49  > Good idea leaving the square roots aside until the last step! I did this on the two Heron's formula results only and got a better simplified expression for the ratio between the areas:   Sabc                   a b c  ------ = -----------------------------------   Sdef    a(b - r)(c - s) + t(c r + b(s - c)) Making r = b/2, s = c/3 and t = a/4 per the original problem, the expression easily evaluates to 24/7. Perhaps r should be associated with side a, s to side b, t to side c and the expression rewritten accordingly for mnemonic purposes. This is exactly the approach I thought of since the beginning. I decided to use a triangle with sides proportional to 2, 3 and 4 as I realized the shape didn't matter (so did SlideRule as well). This simplified the solution, but required Heron's formula twice, the one for the inner triangle being a bit more laborious to solve by hand. Since the shape was irrelevant, why not to choose an even more convenient one? Indeed this allowed for an even more immediate solution. I still don't understand all the fuss about the use of these particular shapes, since they would have spared lots of tedious calculations as we've seen :-) RE: Little explorations with the HP calculators - Han - 04-08-2017 10:16 PM (04-08-2017 09:17 PM)Gerson W. Barbosa Wrote:  I still don't understand all the fuss about the use of these particular shapes, since they would have spared lots of tedious calculations as we've seen :-) For me, it had to do with the fact that without the most recent part being included as part of the solution, the special case is just that -- a special case. You may very well have done the general calculations for your own, and hence for you the special case was a shorter way to show the calculations. Mathematical proofs will sometimes leave out details and simply assert that a certain property is true. Usually, though, such assertions tend to be very simple to deduce. Granted, "simple" is very relative (a certain property may be obvious to one person with a lot of mathematical background; yet to others it may be difficult to see why the property is true). Nevertheless, "simple" is generally understood as "can be readily deduced after making a few quick observations that are either explicitly stated in the solution/proof or in the problem itself." However, when a solution only presents a special case without presenting how the general case can be reduced to the special case, many would consider such special cases to be an incomplete solution -- even more so when the seemingly missing pieces require a series of steps that are not obvious. In this case, one could reasonably argue that the tediousness of the algebra in using Heron's formula and in the law of cosines makes the reduction of the general case to the specific case a non-obvious (i.e. not "simple") statement that requires clear exposition. (Not to mention that Heron's formula was not used in the original solution to the special cases.) I think that (in your first solution) if you had at least mentioned that the relative ratio of the areas remains the same regardless of the shape by considering the law of cosines and using Heron's formula (and thereby leaving the details as "an exercise for the diligent reader"), then your original solution would very well have been complete. (That was why I was repeatedly asking how you decided the shape did not matter -- because I myself and perhaps several others did not see the connection of the law of cosines and Heron's formula. I did use the law of cosines, but mainly to get the corresponding sine values, and certainly not the same way you did.) RE: Little explorations with the HP calculators - Gerson W. Barbosa - 04-08-2017 10:53 PM (04-08-2017 10:16 PM)Han Wrote:  I think that (in your first solution) if you had at least mentioned that the relative ratio of the areas remains the same regardless of the shape by considering the law of cosines and using Heron's formula (and thereby leaving the details as "an exercise for the diligent reader"), then your original solution would very well have been complete. (That was why I was repeatedly asking how you decided the shape did not matter -- because I myself and perhaps several others did not see the connection of the law of cosines and Heron's formula. I did use the law of cosines, but mainly to get the corresponding sine values, and certainly not the same way you did.) Very likely I didn't make myself clear, although I thought I did. Anyway no problem about the questionings. They appeared somewhat disturbing to me because I failed to understand where I had gone wrong. From my point of view I haven't used any forbidden shortcut to get to the solution, but I understand there was some lack of rigor in my statements. If it weren't for these questionings, I'd probably still be pleased with my first solution. Also, the discussions have prompted you, much more than me, to work out really professional contributions for the thorough understanding of the problem. Thank you very much for your patience! Gerson. RE: Little explorations with the HP calculators - pier4r - 04-09-2017 07:55 AM (04-08-2017 10:16 PM)Han Wrote:  Mathematical proofs will sometimes leave out details and simply assert that a certain property is true. Usually, though, such assertions tend to be very simple to deduce. Granted, "simple" is very relative (a certain property may be obvious to one person with a lot of mathematical background; yet to others it may be difficult to see why the property is true). This remembered me of this link: http://staffhome.ecm.uwa.edu.au/~00043886/humour/invalid.proofs.html Although the 9.7 hurts. RE: Little explorations with the HP calculators - SlideRule - 04-09-2017 02:18 PM (04-08-2017 10:16 PM)Han Wrote:  Mathematical proofs will sometimes leave out details and simply assert that a certain property is true. Usually, though, such assertions tend to be very simple to deduce. "Postulate. A statement, also known as an axiom, which is taken to be true without proof. Postulate -- from Wolfram MathWorld mathworld.wolfram.com/Postulate.html" BEST! SlideRule RE: Little explorations with the HP calculators - Gerson W. Barbosa - 04-09-2017 03:40 PM (04-08-2017 09:17 PM)Gerson W. Barbosa Wrote:    Sabc                   a b c  ------ = -----------------------------------   Sdef    a(b - r)(c - s) + t(c r + b(s - c)) Making r = b/2, s = c/3 and t = a/4 per the original problem, the expression easily evaluates to 24/7. Perhaps r should be associated with side a, s to side b, t to side c and the expression rewritten accordingly for mnemonic purposes. A more compact formula in terms of the relationships between the segments and the sides of the outer triangle is better: Given the triangles ABC and DEF, where BC = a BF = r = a/x CF = a - r AC = b CE = s = b/y AE = b - s AB = c AD = t = c/z BD = c - t Then     SΔABC              x y z  ------ = --------------------------   SΔDEF     z + (x y - x - y)(z - 1) Examples: 1) x = 2, y = 3, z = 4  SΔABC/SΔDEF = (2*3*4)/(4 + (2*3 - 2 - 3)*(4 - 1) = 24/7 2) x = 2, y = 3, z = 2  SΔABC/SΔDEF = (2*3*2)/(2 + (2*3 - 2 - 3)*(2 - 1) = 4 RE: Little explorations with the HP calculators - pier4r - 04-09-2017 05:44 PM On a side note, Gerson, I like your handwriting. Way more clear than mine. RE: Little explorations with the HP calculators - Gerson W. Barbosa - 04-09-2017 07:17 PM (04-09-2017 05:44 PM)pier4r Wrote:  On a side note, Gerson, I like your handwriting. Way more clear than mine. Only because I was not in a hurry :-) Yet to my technical lettering professor at college (more than 25 years ago), those would not have looked any more clear than this one. RE: Little explorations with the HP calculators - Gerson W. Barbosa - 04-10-2017 12:37 AM A more useful formula might be one for the area of the inscribed triangle. Given the triangles ABC and DEF, where D, E and F lie on AC, AB and BC, respectively, and defining $$x = \frac{\overline{AB}}{\overline{AE}}$$, $$y = \frac{\overline{BC}}{\overline{BF}}$$ and $$z = \frac{\overline{AC}}{\overline{DC}}$$ Then the area of the inscribed triangle DEF will be $$S_{\Delta DEF}=\frac{((x y-x-y) (z-1)+z)\sqrt{(a+b+c)(-a+b+c) (a-b+c) (a+b-c)}}{4xyz}$$ In this formula $$\frac{\sqrt{(a+b+c)(-a+b+c) (a-b+c) (a+b-c)}}{4}$$ is the area of the triangle ABC. Notice that the order in which x, y and z have been defined is not important, but the line segments in the denominators must not be adjacent to any other. These have been derived using the law of cosines and Heron's formula, as shown elsewhere in this thread. We can use this to compute the area of the triangle DEF inscribed in a right-trangle ABC with sides a = 4, b = 2, c = 2√3, CD = 1, AE = 2/3*√3 and BF = 1: $$S_{\Delta DEF}=\frac{((2\times 3-2-3) (4-1)+4)\sqrt{(4+2+2\sqrt{3})(-4+2+2\sqrt{3}) (4-2+2\sqrt{3}) (4+2-2\sqrt{3})}}{4\times 2\times 3\times 4}=\frac{7\sqrt{3}}{12}$$ Here we have defined x = 2, y = 3 and z = 4, but x = 3/2, y = 4/3 and z = 2 might also have been chosen, among four other possible sets. The area of the triangle ABC is implicit in the formula above, (√192)/4 = 2√3, but can be determined more trivially by just multiplying the length of side c by half the length of side b. Incidentally, the ratio between the larger and the smaller areas is exactly 24/7. Edited for grammar. RE: Little explorations with the HP calculators - brickviking - 04-10-2017 02:22 AM (04-09-2017 07:17 PM)Gerson W. Barbosa Wrote:   (04-09-2017 05:44 PM)pier4r Wrote:  On a side note, Gerson, I like your handwriting. Way more clear than mine. Only because I was not in a hurry :-) Yet to my technical lettering professor at college (more than 25 years ago), those would not have looked any more clear than this one. ... unless you're good at reading Shorthand. I can't recognise which one this is—it's been far too long since I picked up any shorthand (35 years ago, when I was 14), and I don't remember whether I learned Greggs or Pitman 2000 (I suspect the former). About as unrecognisable as the various mathematical formulae I'm seeing tossed so casually around. (Post 61) RE: Little explorations with the HP calculators - Gerson W. Barbosa - 04-10-2017 03:39 AM (04-10-2017 02:22 AM)brickviking Wrote:   (04-09-2017 07:17 PM)Gerson W. Barbosa Wrote:   Yet to my technical lettering professor at college (more than 25 years ago), those would not have looked any more clear than this one. ... unless you're good at reading Shorthand. I can't recognise which one this is—it's been far too long since I picked up any shorthand (35 years ago, when I was 14), and I don't remember whether I learned Greggs or Pitman 2000 (I suspect the former). About as unrecognisable as the various mathematical formulae I'm seeing tossed so casually around. That's an adaptation of Taylor shorthand to Portuguese. I borrowed a book from the local public library when I was 15 (40 years ago) and studied it intensively for ten days or so. I used it only occasionally at school to take notes but I still haven't forgotten it. Never got really fast at it though. Good for writing cryptic messages :-) Regards, Gerson. RE: Little explorations with the HP calculators - pier4r - 04-10-2017 08:00 AM new day, new problem (trivial for all of you but me). Now I did solve this iteratively (and I checked the f(3) with the two combinations that I could build, the result is a "small" prime number). Is there a way to solve it in a more general way, without computing every single step? Also what happens if I ask for f(1.5) ? I do not have ways to compute this, like information is missing. Is there a way to solve it on the 50g (or other non-prime calculators?)? I could not identify any useful built in procedure. RE: Little explorations with the HP calculators - Dieter - 04-10-2017 09:30 AM (04-10-2017 08:00 AM)pier4r Wrote:  new day, new problem (trivial for all of you but me). ... Now I did solve this iteratively (and I checked the f(3) with the two combinations that I could build, the result is a "small" prime number). Is there a way to solve it in a more general way, without computing every single step? Sure. And it's very simple indeed: f(1+3) = 33 · f(1) + 21 · f(3) = 27 · 1 + 2 · f(3) f(3+1) = 31 · f(3) + 23 · f(1) = 3 · f(3) + 8 · 1 Since f(1+3) = f(3+1): 27 + 2 · f(3) = 3 · f(3) + 8 f(3) = 19 That's all. (04-10-2017 08:00 AM)pier4r Wrote:  Also what happens if I ask for f(1.5) ? I do not have ways to compute this, like information is missing. Why not generalize this for any f(z): f(1+z) = 3z · f(1) + 21 · f(z) = 3z · 1 + 2 · f(z) f(z+1) = 31 · f(z) + 2z · f(1) = 3 · f(z) + 2z · 1 3z + 2 · f(z) = 3 · f(z) + 2z f(z) = 3z – 2z So f(1,5) = √27 – √8 = 2,3677... Dieter RE: Little explorations with the HP calculators - pier4r - 04-10-2017 09:51 AM Thanks Dieter, I did not think about using one of the terms as variable and solving for it. in the past I could have done it, I'm really rusty. I need to try some thousands times more RE: Little explorations with the HP calculators - Dieter - 04-10-2017 10:05 AM (04-10-2017 09:51 AM)pier4r Wrote:  Thanks Dieter, I did not think about using one of the terms as variable and solving for it. in the past I could have done it, I'm really rusty. I need to try some thousands times more Simply use the information you got. You have f(x+y) defined by x, f(x) and y, f(y). Now you know x=1 and f(x=1). The rest is trivial. Dieter RE: Little explorations with the HP calculators - Dieter - 04-10-2017 10:53 AM By the way... (04-10-2017 08:00 AM)pier4r Wrote:  Is there a way to solve it on the 50g (or other non-prime calculators?)? I could not identify any useful built in procedure. There is this proverb, saying "If you got a hammer everything looks like a nail". ;-) You have a new 50g and you now want to use it for every problem that comes around. That's not a good idea. Better analyze the problem and then pick the right tool. Which in most cases is your brain. Maybe a calculator is useful for the final step. You can even think one step further: The problems you have been posting are intended to be solved by hand (err... brain). So they are designed in a way that does not require a calculator. For exploring your 50g's capabilities other problems may be more useful. For instance those presented at the yearly meetings. Dieter RE: Little explorations with the HP calculators - pier4r - 04-10-2017 12:11 PM (04-10-2017 10:53 AM)Dieter Wrote:  By the way... There is this proverb, saying "If you got a hammer everything looks like a nail". ;-) You have a new 50g and you now want to use it for every problem that comes around. That's not a good idea. Better analyze the problem and then pick the right tool. Which in most cases is your brain. Maybe a calculator is useful for the final step. You can even think one step further: The problems you have been posting are intended to be solved by hand (err... brain). So they are designed in a way that does not require a calculator. For exploring your 50g's capabilities other problems may be more useful. For instance those presented at the yearly meetings. Dieter I do believe I replied on this once. Short answer: what you say is surely valid in several cases but not in this one, I set the idea to use the 50g as much as I can, and I do it. The problem is when I'm not able to find out ways to "cast" the problem in an algorithmic problem either due to time limit or due to skill limit. Like in the case of the functional equation. Long answer (we do really need a sort of "hide/show" myBB block): I am aware that, whatever helper system is chosen according to the problem (50g, hammer, a truck, a pen, etc.), it cannot do the job without the "brain". I can yell at the computer to solve a certain problem and it will always remain indifferent. Nevertheless I do also believe that there may exist several approaches that can lead to a solution of the same problem. Furthermore in some cases the approach has to be fun, otherwise it does not work. There may be plenty of approaches to refresh, relearn or just learn techniques to solve problems, some more efficient some less, but the point is that they have to be sustainable for the individual. Sustainable in terms of "activity that can be done without getting tiresome". So, as a rough analogy, if I decide to do a certain training that let me advance 10 "points" per day, but I can maintain it only for 3 weeks and then I decide to stop (1) then I'm at loss compared to an approach that let me advance maybe 0.1 points per day, but I can apply it for years. Forcing a sentence of Epicurus in this analogy, I would say "the approach that lead to the higher cumulative result at the end, is the best one". (Epicurus actually said something like "Do not seek the action that procures you the highest short term happiness, seek the action that procures you the happiness that lasts longer") Said that, since I know myself (not totally, one always discovers something new about himself, but surely better than everyone else), I do know the approach that is likely leading me to an higher result at the end between the ones that I am aware of. Of course I may miss approaches that I'm not aware of, but I have limited time so ending in the loop "do I investigate if there is another approach to do what I want to do or do I choose between the ones that I know so far?" is not an option for the moment. In this particular case, I can ensure you that if I start to dive deep down to math problems without thinking about "how can I somehow involve the 50g to let it burn" , I would likely stop doing it after few days or weeks. I would enjoy the process, but likely I would not be able to sustain it. Not because I do not like mathematics, I do really appreciate the skills of you, Han, Gerson and a lot of other people. Just there are approaches more sustainable than others according to the context. Plus I do know really well that even if one takes a side approach to a problem, slowly one starts to realize patterns and get better (also with the help of comments like yours). As one knows from mathematics, there are plenty of ways to solve a problem, therefore I do reject the idea that there should be only one way to train oneself in a specific subject. So I do appreciate the tip, but believe me that I already considered it (2) and it does not mean that I do not apply myself on the problem, just I do it in a way that is different from your "standard", with poor results at first, but it is a long journey so I'm optimistic. If I wouldn't, I wouldn't even start the journey. (1) no, if someone is thinking "but then you lack discipline!", that's a wrong answer in my opinion. I can argue about this for days, the problem is that it may be a not fruitful discussion. (2) I have a plan for a big overhaul of my math knowledge, I do have the manuals but the other conditions are not satisfied yet. Side notes: - I have the hp 50g since December 2010. Just the last time I used it was in September 2013 as you can see on the wiki4hp.com - I do think that packing (I mean, taking care of this) your suggestion in a less direct way would help the community. I can understand the idea. "Look you are doing pretty bad, I do know way more, please follow this way as I did", but a community thrive when there is diversity (and respect for everyone that is not harmful), otherwise it starts to be newbie (newbie, not newcomer!) unfriendly and on the long run it shrinks or does not get larger. People starts to think twice before posting because they were criticized already enough and so on. It is a pretty old pattern in communities. Even Gauss was so hurt that did not publish much after his first major publication, due to not well packed critics. RE: Little explorations with the HP calculators - SlideRule - 04-10-2017 01:01 PM (04-10-2017 12:11 PM)pier4r Wrote:  ... People starts to think twice before posting because they were criticized already enough and so on. It is a pretty old pattern in communities. Even Gauss was so hurt that did not publish much after his first major publication, due to not well packed critics... Suggestion - start a NEW thread for NEW problems? These loonnnnnggg threads tend to foster a small antinomy as they come across as an exegitical epistomolgy {a sermon}. They are enjoyable and do fulfill the authors' intent of jiggling those little grey cells. BEST! SlideRule RE: Little explorations with the HP calculators - pier4r - 04-10-2017 02:30 PM (04-10-2017 01:01 PM)SlideRule Wrote:  Suggestion - start a NEW thread for NEW problems? These loonnnnnggg threads tend to foster a small antinomy as they come across as an exegitical epistomolgy {a sermon}. They are enjoyable and do fulfill the authors' intent of jiggling those little grey cells. I thought about it and , as I explained in the first post, starting a new thread for every new problem would be to me too much littering. Or at least I would not like that a forum member would continuously open new topics if the argument is exactly the same and not enough time - a week? - passed between the last topic and the new one. Instead if I collect my "spam" (for surely for some it is spam) in one unique thread, one that is not interested can just ignore it. Let's say the amount of scrolling needed is minimized. So I would prefer to continue what for me are little/clumsy explorations here. And I do enjoy a lot of eye opening answers, from Gerson, Han, Joe, DavidM, Dieter, etc.. RE: Little explorations with the HP calculators - telemachos - 04-10-2017 03:22 PM To solve the two-triangles problem (pier4r's Post 122, above), I assumed that ABC was equilateral and had side length 12 units. That made its area 36√3 square units and made (x, y, z) = (6, 4, 3) units. The law of cosines yielded side lengths (d, e, f) = (3√7, 7, 2√7) units for DEF. With an HP 50g in Exact mode (–105 CF) and with Rigorous mode on (–119 CF), Heron's formula then gave 21√3/2 square units for the area of DEF. Finally, I scaled the areas of ABC and DEF by the factor 24/36√3 = 2/3√3, making those areas 24 (as required) and 7 square units respectively. I did all of that with pencil and paper as well, but I was glad to have learned something about Rigorous mode, and to have written the little UserRPL program embodying Heron's formula.