Formulas for the HP "Solver"

    The "Solver" in some HP calculators, such as the HP 19BII, allows you to write your own little time-saving programs that store in the calculator and can be called up at any time. Here are a few small formulas that I have been using in mine.  If you don't have the HP Solver, you might be able to still adapt some of these for whatever you use to run formulas.

    Note:  On this page, I'm showing the division sign as "/" because  my computer doesn't use the division sign that the calculator does for these formulas, which looks like a dash with a dot above and below it.  I also started using the angle symbol from the calculator's keypad -- instead of "ANG" -- for these formulas in the Solver..


Input Latitude and Longitude for Distance from Your Home

MILES=69.0466xACOS(SIN(47.60146)xSIN(LAT)+COS(47.60146)xCOS(LAT)xCOS(122.33708-LONG))

(Just the "MILE," "LAT," and "LONG" appear on the screen as labels.)

    In this formula, the “47.60146” is the latitude for Seattle, Washington, and “122.33708” is its longitude. Just change these to what your latitude and longitude are.

    NOTE: When running the program and inputting latitudes and longitudes, you'll find that using just two places to the right of the decimal point will probably be accurate enough for you, such as a latitude and longitude of “41.90” and “87.64,” respectively, instead of “41.90182” and “87.63583.” The differences in these two sets is less than 0.2 of a mile.

    I like this formula for calculating distances from my home, such as in keeping track of how far away a hurricane is. It saves me from having to look up my own co-ordinates and inputting them. But if you want to be able to input two sets of co-ordinates, then you could make the program like this:

    MILES=69.0466xACOS(SIN(LT1)xSIN(LT2)+COS(LT1)xCOS(LT2)xCOS(LG1-LG2))

(Just the "MILE," "LT1," "LT2," "LG1," and "LG2" will appear on the screen as labels.)


Calculate Observable Heights and Distances

HT=DISTxTAN(ANG)

(The screen will display the labels "HT," "DIST," and "ANG."
You might prefer using the angle symbol instead of "ANG.")

    NOTE: This is for determining the height of objects, such as a flag pole, radio tower, etc. The “DIST” stands for the distance you are from the base of that object. The “ANG” is for the angle to the top of the object, and the “HT” is for the height.  (Of course, even though "DIST" will determine unknown distances, you can also think of the triangle on its side, so that the "HT" can be used for distances, too, as shown in the last example for this one.)

    For instance, if you were 45 feet from the base of a flagpole, and the angle from that position to the flagpole's top were 23 degrees, and you inputted these values, pressing the button for “HT” would then show the flagpole at a height of 19.10 feet.


    For a different usage, if you already know the height of the object and the angle of elevation, you can input that in the HT and ANG, respectively, and then pressing the DIST button will give you the distance.  So, for example, if a particular tower were 75 feet tall, and you were viewing the top of it at an angle of 15 degrees, then pressing the “DIST” button would show your distance away from the base of it to be 279.90 feet.

    Furthermore, if you know the height and distance from the base of an object, you can also use this formula to determine the angle. For example, if you were standing 50 feet from the base of a radio antennae, which you know to be 100 feet tall, pressing the “ANG” button will show the angle to be at 63.43 degrees to the tip of that antennae.

    And, lastly, instead of thinking of the "right triangle" as upright, we can also "place it on its side" in order to measure horizontal distances -- instead of heights -- with the "HT."  For instance, if you were standing on one side of a river and looking directly across at a particular object, such as a tower or telephone pole, you could form a right angle to that by walking away (at a right angle) from your observation point to 50 yards away, for example. Now instead of being straight across from that object on the other side of the river, you'll be down from it at an angle. Just input that angle into the formula, along with the distance you walked from the initial observation spot (the vertex of the right angle), and press the HT button. Of course, it won't be height in this case; but, rather, distance. And that distance will be how wide the river is.  Say for example, you do walk 50 yards down from your initial observation spot.   After you walk those 50 yards, keeping at a right angle, you then see (with a small engineer's compass) that the angle to that tower is 83 degrees.  You can then determine that the river is 407.22 yards wide in that area..



Calculate Nautical Miles to Horizon and Shore

N/MI=SQRT(H/FT)x1.17

(Just "N/MI" and "H/FT" appear on the screen as labels.)

    “N/MI” is standing for “nautical miles”; and not "N" divided by "MI"; “H/FT” is simply showing in the label that the height is to be in feet.


    Simply input the height to your eye-level. For example, if you were sitting in a small boat with an eye-level of 3 feet above the water, you'd be able to see 2.03 miles to the horizon. If sitting on the end of a pier, however, at 30 feet above the water, you could see out for 6.41 miles.

Calculating Distances for the Other Side of the Horizon

    Suppose, though, that you were out on a boat, looking toward shore, with an eye-level of about 9 feet above the water, and saw the peak of a lighthouse beginning to arise on the horizon. You could then include that in your calculation, if you knew its height. For instance, suppose you know the lighthouse to be 85 feet. First calculate the distance from you to the horizon by inputting the “9” feet, which will result in 3.51 nautical miles. Then figure for the lighthouse the same way, but with the 85 feet, which will give you an answer of 10.79 nautical miles. So adding the two together will total 14.30 nautical miles to the light house.

    NOTE: You need to figure these separately and then add the results, or else you'll come up with a wrong answer. For if you were to first total the numbers (85 + 9) for 94 feet, it would show a distance of 11.34 nautical miles – 2.96 nautical miles shorter.



    Calculate the Speed of a Boat (in Knots)

USE42.2FT:KNOTS=25/SEC

(Just "KNOT" and "SEC" are displayed on the screen as labels.)


      
The "USE42.2FT:" is only part of the title and not necessary to run this.  It reminds me that the measurement needs to be made between two marks on the boat that would be 42.2 feet apart.  Just throw out some floatable object on a thin line (such as a fishing bobber on a line),  and then clock how many seconds it takes the boat to pass it, through the 42.2-foot section.  (The float should be stationary.)   For instance, if it takes 8 seconds, the boat is moving at 3.13 knots per hour.  If 4 seconds, then it is going 6.25 knots per hour; and at  2 seconds, 12.5 knots per hour.


Convert MPH to FPS or FPS to MPH

MPHx5280/3600=FPS

(Only "MPH" and "FPS" are displayed as labels.)

    If you need to convert miles per hour to feet per second, this will do it for you.   For example, 60 MPH = 88 FPS.

    Of course, you can also convert FPS to MPH with it as well.  For instance,  100 FPS = 68.18 MPH.


Convert MPH to Meters Per Second
(and Vice Versa)

MPS=MPH/2.2360248447205

A runner, in a 200-meter race, is clocked at 10.21 meters per second.  What would that be in miles per hour?

Examples: 45 meters per second = 100.62 mph;  42 mph = 18.783 meters per second



Calculate Time Required to Download from the Internet

MIN=(MBx1048576)/(KBPSx1048)/60

(This formula will display the labels of "MIN," "MB," and "KBPS.")

    Using just a regular dial-up can take a while to download large files, and at some sites the download progress isn't given.   .    So if you are downloading a file that is 22.8 MB, and your download speed is just 5.6 KBPS, this little program can quickly show you that that is going to take you 67.89 minutes.


Compare Pizza-Slices from Different Size Pizzas

PIZZA:SQIN=SQ("/2)xPI/#

(This formula will display the labels: sqin, ", and #.)

    I'm using the quotation mark for the "inch-size" of the pizza, and the # sign for the number of  slices.  It will then display in square inches.

    Which slice of pizza would be the larger?  One from a 21-inch pizza that has been divided into 18 sections, or  a 12-inch pizza divided into 6 parts?  This little formula will help you to figure that.  And the result, for this example, shows that the 21-inch pizza would have a slightly larger slice.  For each slice from it is 19.24 square inches, whereas the 12-inch pizza would have a slice at 18.85 square inches -- so only a difference of 0.39 square inch.


Heron's Formula for the Area of a Triangle

HERON:AREA=SQRT((A+B+C)x(A+B-C)x(B+C-A)x(C+A-B))/4

(This will display the labels "Area," "A," "B," and "C.")

 
    Heron's Formula to determine a trianagle's area is the "square root of  s(s-a)(s-b)(s-c)," and "s" is the semiperimeter.  So you would just add up the three sides and divide by 2 for the value of "s" to use in the formula  But with the calculator version, you eliminate that, along with the division, multiplication, and finding the square root.  Instead, you just merely need to input the lengths for the sides and press the "area" button for the result.

    Here's one to try: Based on these perimeters, which of the following triangles has the largest area, and which has the smallest?
Triangle A: 3, 7, 20;   Triangle B: 10, 10, 10; and Triangle C: 15, 6, 10


Convert Degrees to Radians and Vice Versa

DEG/180=RAD/PI

The HP19BII already has this function built in, but this shows how simple these particular conversions can be done. 


Solving for the Missing Equivalent Ratio

A/B = C/D

(Labels displayed: A, B, C, D)

Example:  An upright yardstick is casting a shadow of  4 feet.  If at the same time, a flag pole's shadow is 26 feet, how tall is the flagpole?  Since we know that these measurements will have an equivalent ratio, we can then input 3 into A and 4 into B for the yardstick's height and its shadow, respectively.  And since B is the yardstick's shadow, then D will be the flagpole's shadow of 26 feet.  C is corresponding with A, and since both are pertaining to height in this example, pressing C, after all this other data is inputted, will show the flagpole to be 19.5 feet. 

Here's another: If 13.5 gallons of gas cost  $39.25, how much would 10.35 gallons cost?  Input the following: A=13.5  B = 39.25  C=10.35.  Now pressing D will show $30.10. 

And at that price, how much gas could be bought at $7 for the lawnmower?  (A=13.5 B=39.25, D=7.  Pressing the button for C shows 2.41 gallons.)

Another way this could be helpful is seen in the following:  If  an item is $2.89 for 15.5 ounces, would buying  the larger size of the same brand at 25  ounces for $4.79 be the better deal?  Here we know all the data, but we want to determine if buying the larger quantity will save us money.  So just input all these values except the $4.79: A=2.89, B=15.5, D=25.  Now when you press C for the price of the 25-ounce item, it will show $4.66, which is the not the actual price, but the equilvaent ratio of the first item.  So from this, we see that, in this case, buying the larger quanity would not be the better deal, for you'll be paying 13 cents more for it..   

NOTE: It really doesn't matter whether you input the price for the first item in A or in B, as well as the ounces; but which ever you choose, you need to then be consistent with the second item -- so as not to "mix your apples with oranges."   In addition, you could even input the price of the first item in A, and the price of the second item in B; but then use C for the size of the first item and D for the size of the second.  For instance:

If you can go 325 miles on 14 gallons, how far could you go on 8 gallons?  This can be inputted in two ways:

          A = 325 (miles)
          B = (press button for miles-answer of 185.71)
          C = 14 (gallons, corresponding with A)
          D = 8 (gallons, corresponding with B)    

Or it could be inputted like this:

        A = 325 (miles)
        B =  14 (gallons, corresponding with A)
        C = (press button for miles-answer of 185.71.)
        D = 8  (gallons, corresponding with C)

But in either case, note the relation that is maintained; and use the one you prefer.
           


How Much Force Does It Require to Keep an Object from Sliding Down an Incline?

FORCE=SIN(ANGLE)xLBS

If an object were a 150 pounds and on an incline of 32 degrees, it would require a force of 79.49 pounds to keep it from sliding.  If the incline were 12 degrees, it would then require a force of only 31.2 pounds.

An object 325 pounds on a slope of 36 degrees will need a force of 191 pounds to keep it stationary.


SOH-CAH-TOA
(Trigonometric Functions)
   
   
    In the formula above for calculating observable heights and distances, we actually used a trig function.  By thinking in terms of a right triangle and knowing what sides work with what trig functions, we can determine various heights and distances.     (For more on this, along with several examples, see the article on  "Determining Distances and Heights with a Right Triangle (using trig functions: sin, cos, and tan)."
   
                                                                                        SOH

SOH:SIN(A)=OPP/HYPOT

(Just the "A," "OPP," and "HYPOT" appear on the screen.)

                                                                                          CAH

CAH:COS(A)=ADJ/HYPOT

(Just the "A," "ADJ," and "HYPOT" appear on the screen.)


TOA

TOA:TAN(A)=OPP/ADJ

(Just the "A," "OPP," and "ADJ" appear on the screen.)


    The "Solver" in the HP calculator recognizes the trig functions of sin, cos, and tan.


Determining the Missing Side-Length of a Right Triangle
(The Pythagorean Theorem)

SIDES:SQ(HYPOT)=SQ(OPP)+SQ(ADJ)

(Just the "HYPOT," "OPP," and "ADJ" appear on the screen.)


       This theory means that if you square the length of the hypotenuse (which is always the longest side), the result will equal the summation of the two other sides individually squared and then summed together.  For example, if the hypotenuse was 5, the opposite 4, and the adjacent 3, the square of the hypotenuse would be 25.  The square of 4 is 16, and the square of 3 is 9, so adding those two together (16 + 9) gives us 25.  So what  this also means is that by re-arranging the formula, we would be able to determine for any unknown length for a particular side.   Since this is done by squaring the sides and then either adding or subtracting, depending on which side you  are trying to determine the length for, the result needs to then be converted to its square root, so that it will be its actual length.  The above formula will let you input numbers as their actual lengths and will display them that way, along with the result.   The displayed labels will be "HYPOT," "OPP," and "ADJ," and this little program will save you the time of having to re-arrange the formula and subtracting to determine certain lengths.  Just plug in any two actual measurements, and then press the button that corresponds wtih the side you want to determine.



Determining the Distance of the Other Lanes in a 400-meter 8-Lane Track

DIST=(2xPI)x(LANE-1)xWIDTH

(Just the "DIST," "LANE," and "WIDTH" appear on the screen.)

If the track is 400 meters, that is pertaining to the inside lane.  To figure the distance of the other lanes, we need to know their width.  For instance, let us suppose that each lane is 36 inches wide and you want to know the distance of lane 7.  We can then input this information in the solver to come up with 1,357.16802635 inches.  Dividing by 39 will give the answer in meters (34.7991801628), or dividing by 12 will give you the feet (113.097335529).  Or for the width, you could have inputted it as 3 (feet) instead of 36 (inches) to come up with your answer in feet.  The answer is the length that lane 7 exceeds lane 1.  So it would be 400 meters plus 34.799 meters.  To measure the width of a lane, go from the left side of the lane to the left side of the lane to the right of it.  In that way, you are including just 1 lane separator.  And do that using any of the lanes except the inside and outside, since they might not be as wide.  (On a track I use, I discovered that the lanes varied somewhat in width; so I measured the total distance across the track and divided by 8.)

-- Tom Edwards (Tom@ThomasTEdwards.com)