Post Reply 
(Bug?) HP48 Equation Library
02-14-2017, 03:36 AM (This post was last modified: 02-14-2017 04:15 AM by Han.)
Post: #21
RE: (Bug?) HP48 Equation Library
Thank you all -- Brad Barton, SlideRule, and rprosperi -- for your insights. It has helped me understand the formulas much better. So from what I gathered,
\[ \text{if} \quad \quad f(x) = \begin{cases}
P\cdot (x-a), & x \le a \\
0, & x>a
\end{cases}
\quad \quad \text{and} \quad \quad
g(x) = \begin{cases}
M, & x\le c\\
0, & x> c
\end{cases} \quad \quad \text{then}\quad \quad
Mx = f(x) + g(x) -
\frac{w}{2}\cdot (L^2-2\cdot L \cdot x + x^2)
\]
So \( c \) is indeed hidden in the equation that shown in the AUR and in the display of the equation within the Equation Library.

I was trying to put together a list of formulas for a current project of mine, but it looks like it will be more than just copying and pasting the formulas from the AUR. I guess I will have to either learn or brush up on a lot of topics before this project is complete.

Again, thank you all for your insights and patience.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-14-2017, 03:43 AM
Post: #22
RE: (Bug?) HP48 Equation Library
(02-14-2017 03:09 AM)rprosperi Wrote:  c does matter to understand the externally applied Moment although it is not used in the core Bending Moment calculation. Basically, if c is less than x or greater than x determines the role of the applied moment in the overall calculation. In the example, try plugging-in different values of c while holding all other variables constant and you will see the resulting Mx changes when c exceeds x.

Yes, this behavior is confirmed. It is because the moment adds to the reaction forces when c exceeds x. If you send the equation to the stack, you can see the IFTE logic for that case.

Thanks for making us look closer Bob.

Brad
Find all posts by this user
Quote this message in a reply
02-14-2017, 03:57 AM
Post: #23
RE: (Bug?) HP48 Equation Library
(02-14-2017 03:43 AM)Brad Barton Wrote:  Yes, this behavior is confirmed. It is because the moment adds to the reaction forces when c exceeds x. If you send the equation to the stack, you can see the IFTE logic for that case.

Thanks for making us look closer Bob.

Brad

This would have saved so much time/headache. It never occurred to me to even look at the formula in the calculator. I just assumed it was going to reflect the formula in the book.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-14-2017, 04:07 AM
Post: #24
RE: (Bug?) HP48 Equation Library
I want to say something about 1,000 monkeys on 1,000 typewriters eventually pounding out Hamlet. A similar amount of thought went into this "discovery". Lol. Hopefully you can use it to make extracting the rest of the equations much less painful.

Thanks again for sharing your work with us.

Brad

PS. Might need a slight edit in the last term of your equation above.
Find all posts by this user
Quote this message in a reply
02-14-2017, 04:16 AM
Post: #25
RE: (Bug?) HP48 Equation Library
(02-14-2017 04:07 AM)Brad Barton Wrote:  PS. Might need a slight edit in the last term of your equation above.

Thanks! I hope my fix was indeed just that.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-14-2017, 03:22 PM
Post: #26
RE: (Bug?) HP48 Equation Library
(02-14-2017 03:36 AM)Han Wrote:  Thank you all ... for your insights. It has helped me understand ... a list of formulas ... more than just copying and pasting the formulas... Again, thank you all for ... patience.

Han, keep chuggin & pluggin away; we ALL benefit from honest endeavors.

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
02-14-2017, 04:29 PM
Post: #27
RE: (Bug?) HP48 Equation Library
(02-14-2017 03:36 AM)Han Wrote:  Again, thank you all for your insights and patience.

Thanks are due mostly to you for your ongoing contributions to the folks here; access to the 48 Eq Lib on Prime will likely get me to use it again, so thanks for that too!

(02-14-2017 03:43 AM)Brad Barton Wrote:  If you send the equation to the stack, you can see the IFTE logic for that case.

Thanks for pointing that out Brad, I honestly never noticed one could retrieve the internal equations to examine. Maybe I did learn it 25 years ago and forgot since, but it seems it's something I should have recalled if so. Lots of topics discussed here are in that category lately, has anyone else noticed that?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-14-2017, 05:20 PM
Post: #28
RE: (Bug?) HP48 Equation Library
(02-14-2017 03:43 AM)Brad Barton Wrote:  If you send the equation to the stack, you can see the IFTE logic for that case.


Brad

I do not have the HP48G manual, but this is from P. 786 of the HP50g User's Guide:

Quote:All equations have a display form and some applications also have a
calculation form. The display form gives the equation in its basic form, the form
you would see in books. The calculation form includes computational
refinements. If an equation has a computational form, an * appears in the
upper left corner of the equation display.

John
Find all posts by this user
Quote this message in a reply
02-14-2017, 07:08 PM
Post: #29
RE: (Bug?) HP48 Equation Library
(02-14-2017 04:29 PM)rprosperi Wrote:  Thanks are due mostly to you for your ongoing contributions to the folks here; access to the 48 Eq Lib on Prime will likely get me to use it again, so thanks for that too!

In the interest of providing a useful list of equations, how should we approach the provision of these formulas? Would users find it more useful to have a single formula using piecewise functions as shown in one of the examples above? Or would it be better to separate the single formula into several "copies", and then allow the user to select the one that best fits their parameters?

In other words, provide a single formula:
\[ Mx = \begin{cases}
P\cdot (x-a), & x \le a\\
0, & x>a
\end{cases} \quad + \quad
\begin{cases}
M, & x\le c\\
0, & x>c
\end{cases} \quad + \quad
\frac{w}{2}\cdot (L^2−2\cdot L \cdot x+x^2) \]
or provide all the cases and have the user pick one among
\begin{align}
Mx & = P\cdot (x-a) + M + \frac{w}{2}\cdot (L^2−2\cdot L \cdot x+x^2) \\
Mx & = P\cdot (x-a) + \frac{w}{2}\cdot (L^2−2\cdot L \cdot x+x^2) \\
Mx & = M + \frac{w}{2}\cdot (L^2−2\cdot L \cdot x+x^2) \\
Mx & = \frac{w}{2}\cdot (L^2−2\cdot L \cdot x+x^2)
\end{align}
These formulas, in context, are most likely going to used in the fashion of computing \( Mx \) while knowing the other parameters (not really solving as much as evaluating). However, as an equation, one could in theory provide a value for \( Mx \) and solve any of the other variables. (Again, unlikely in this context, but theoretically possible). The HP48 fails spectacularly, solving for \( c \) to be 9.999...E499 and I imagine the solver I have implemented to do no better using the first formula (the one with piecewise functions).

I will definitely have to include some warnings either way about using the solver for such problems. In the former case, we have discontinuities that would make Newton's method possibly fail. In the latter case, these formulas, taken individually, imply \( Mx \) is continuous in the remaining variables (which is clearly not the case for \(x \)).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-14-2017, 08:25 PM (This post was last modified: 02-14-2017 08:28 PM by Brad Barton.)
Post: #30
RE: (Bug?) HP48 Equation Library
My personal preference is the piecewise function. It's a more succinct representation of the math involved, and also points out the importance of the relative values of x, a and c. This is JMHO though, so there may be very good reasons to do it the other way.

Perhaps a decision tree keyed to these relative values could be used to select the equation (of the 4 listed at the bottom) that is presented to the solver. You'd have to have some error handling if, for example, the user asked for a solution for P when no value for a was entered, but I'm not telling you anything new.
Find all posts by this user
Quote this message in a reply
02-14-2017, 09:28 PM
Post: #31
RE: (Bug?) HP48 Equation Library
(02-14-2017 07:08 PM)Han Wrote:  In the interest of providing a useful list of equations ... more useful to have a single formula ... or provide all the cases ...
There are additional external loading cases not accounted for in the 48 routine, such as partially distributed load, varying uniform load, partially distributed varying load, as well as multiple loads of the same type but at additional locations. If the LAW of SUPERPOSITION is deployed, then multiple external loading's can be assessed, both as a SUM of MOMENTS at point x on length L as well as individual but varying magnitude and location contributions to ∑Mx. Just my 3¢ worth.

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
02-15-2017, 01:53 AM
Post: #32
RE: (Bug?) HP48 Equation Library
(02-14-2017 08:25 PM)Brad Barton Wrote:  My personal preference is the piecewise function. It's a more succinct representation of the math involved, and also points out the importance of the relative values of x, a and c. This is JMHO though, so there may be very good reasons to do it the other way.

1 +

... mainly because of the bolded section, but also because many (most?) users of these equations are likely to not know which best fits his/her conditions. The latter style is likely preferred by mathematicians, but as someone noted above, Engineers tend to want to 'plug values into the magic equation' worrying more about the quality of their measurements than the underlying math.

I can't imagine a scenario (in the real world) where one would be trying to solve for c, but this may not apply for other equations, so agree some guidance is likely useful regarding these types of parameters.

Who'da thought we'd be discussing Statics of all things. I was relatively sure by sophomore year that I'd never be discussing that again.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-15-2017, 10:03 PM
Post: #33
RE: (Bug?) HP48 Equation Library
(02-13-2017 04:03 PM)Vtile Wrote:  Some fields of engineering are also extremely conservative, what comes how things are done and what formulas are used.
That is pretty sure! I'm a fluid flow engineer and I use by myself all the formulas in most-useful-format - as I learned many years before.

But: sometimes, for quick calculations I use some personal trick: for example the Blasius formula is f=0.3164/(Re^0.25), but 0.3164 is approximately 1/(100^0.25)=0.3162, therefore f=0.3164/(Re^0.25) = (100×Re)^(-0.25), which is easy to memorize and calculate ([EEX] [2] [×] [1/x] [SQRT] [SQRT] on my 15C).

Another hydraulic or mechanical engineer specific thing is the units: I always use Pa as pressure but for the pumps or fans I use it as J/m^3 specific energy (1_Pa=1_N/m^2=1_(N×m)/(m^3)), or for acceleration of gravity is not 9.81_m/s^2, this is 9.81_N/kg (=the force which is works on every 1 kg in the Earth gravitational field).

And of course, the area of the circle is D^2×PI/4, what else?! Smile

Csaba
Find all posts by this user
Quote this message in a reply
02-19-2017, 10:53 PM
Post: #34
RE: (Bug?) HP48 Equation Library
Programming an equation library has lead me to learn about all sorts of stuff that I really never cared much about (and still do not -- but at least I am learning). Anyway, for those of you who have some background in materials science:

The following formulas are for carrier concentration of silicon (intrinsic density \( n_i \)) as a function of temperature \(T\):

\[ E_g = 1.17 - 4.73\times 10^{-4}\cdot \frac{T^2}{T+636} \]
\[ n_i = \sqrt{ N_c \cdot N_v} \cdot e^{-E_g/(2\cdot k\cdot T)} \]

The HP48 uses a value of \( 7.2756517951 \times 10^{15} \) for \( \sqrt{N_c \cdot N_v} \) -- the square root of the product of the effective density of states for the conductance and valence bands, respectively. However, I cannot seem to find any references where this is the case. The formulas I have found for the effective density states do not produce this value. Can anyone provide references to this value, or those of the appropriate \( N_c \) and \( N_v \) that form this value?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-06-2017, 05:31 PM (This post was last modified: 03-06-2017 06:54 PM by Han.)
Post: #35
RE: (Bug?) HP48 Equation Library
Well, I eventually did find an actual bug (or perhaps limitation) of the HP48 MES. According to this patent:

https://www.google.com/patents/US5175700

the MES basically automates the process of substituting in known values, and finding an equation that has only one unknown, solving that equation, then repeating the process after updating its list of known/solved values.

The problem with this is that an inconsistent system shows up as having a solution. For example:

Code:
{ 'X+Y=10' 'X+Y=11' } STEQ 1 'X' STO MINIT MSOLVR

Proceed to solve for Y and the HP48 produces:

Searching...
Solving for Y...
Y:9
Zero

Except X=1 Y=9 is only a zero of the first equation. There is no check at all whether that solution is in fact a solution to the system. I only noticed this when I started working on a hybrid solver engine that mimics the Multiple Equation Solver (MES).

In the meantime, I'm still interested in the formulas for the silicon density of states equations in the immediately previous post.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-06-2017, 07:45 PM
Post: #36
RE: (Bug?) HP48 Equation Library
(02-19-2017 10:53 PM)Han Wrote:  for the conductance and valence bands, respectively. However, I cannot seem to find any references where this is the case. The formulas I have found for the effective density states do not produce this value. Can anyone provide references to this value, or those of the appropriate \( N_c \) and \( N_v \) that form this value?

Is this reference helpful?
Effective density of states - Example
BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
03-06-2017, 07:51 PM
Post: #37
RE: (Bug?) HP48 Equation Library
(03-06-2017 07:45 PM)SlideRule Wrote:  
(02-19-2017 10:53 PM)Han Wrote:  for the conductance and valence bands, respectively. However, I cannot seem to find any references where this is the case. The formulas I have found for the effective density states do not produce this value. Can anyone provide references to this value, or those of the appropriate \( N_c \) and \( N_v \) that form this value?

Is this reference helpful?
Effective density of states - Example
BEST!
SlideRule

None of those values for \( N_c \) and \( N_v \) in the linked reference produces 7.2756517951e15

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: