HP 50G help

04232015, 04:11 AM
Post: #1




HP 50G help
I've had my 50G for about a year now and use it heavily, recently I have been working on problems that incorporate variables within the integral and am having trouble as it seems each time I take the antiderivative it throws up a undefined name error. I was hoping to get some help, an example problem would be:
int(ax^24,x) How would you account for the variable a? Thanks for your time, really do appreciate it, and I know my syntax is wrong for my example in advance 

04232015, 09:09 AM
(This post was last modified: 04232015 09:16 AM by Gilles.)
Post: #2




RE: HP 50G help
(04232015 04:11 AM)jrmc114064 Wrote: int(ax^24,x) Hi, INT calculate then antiderivative at a given point . If you want the general solution, you can do (RPL mode, Indep var : X) 'A*X^24' INTVX or 'A*X^24' 'X' 'X' INT Not know about ALG mode but I suppose something like : INTVX(A*X^24) INT(A*X^24,X, X) > A.(1/3. X^3)4.X Verify that  there is no 'A' variable already define in the directory you work or in parent directories  No implicit multiplication with the 50G. AX is not A.X 

04232015, 04:00 PM
Post: #3




RE: HP 50G help
Thanks, don't know what I've been doing wrong, been trying to solve this problem:
Int(0,a,.3*sin(2*π*x)*(11/a),x)=.0191 And haven't had much luck, is there anyway I could do this problem quickly, seems if I use the numerical solver I get nothing for some time..... 

04232015, 04:08 PM
Post: #4




RE: HP 50G help
Interesting if I run the function through in exactly mode I get the function yet when taking the antiderivative it prompts to change to approx mode, if I start in approx mode though it puts up the undefined name error...


04232015, 09:08 PM
Post: #5




RE: HP 50G help
Even more disturbing: INTVX on .3 * sin(2*π*X)*(11/a)
Returns infinite. What the heck? 

04232015, 10:23 PM
Post: #6




RE: HP 50G help
Hello Tugdual,
a first short test shows (with the real calc). a) real exact mode b) used expression: \[ \frac{3}{10}\cdot\sin(2\cdot N \cdot X) \cdot\ (1  \frac{1}{A}) \] does not work (internally the command intvx tried to use the partial integration method with u = \[ 1  \frac{1}{A} \] ) and failed. c) used expression: \[ \frac{3}{10}\cdot\ (1  \frac{1}{A})\cdot\sin(2\cdot N \cdot X) \] does work (internally the command intvx tried to use the linearization method of the sin function ) and you get the right result. I used 3/10 instead of 0.3 because in general it is not a good idea to mix exact numbers with real numbers with symbolic transformations. greetings peacecalc 

04242015, 01:25 AM
(This post was last modified: 04242015 01:48 AM by Marcio.)
Post: #7




RE: HP 50G help
I think that sine inside the integral is going to get you into trouble if you try to solve the problem all at once.
If you solve it by parts, you will get a function f with only "a" as unknown. Give it a good guess and you'll get the answer. Edit: These are some of the zeros, assuming "a" is positive: 1.344702 1.761940 2.206740 Note some of them are really close to each other. 

04242015, 07:16 AM
(This post was last modified: 04242015 07:47 AM by Tugdual.)
Post: #8




RE: HP 50G help
(04232015 10:23 PM)peacecalc Wrote: Hello Tugdual,Hi Peacecalc, I tried on the emulator and it works. But the real calc keeps saying this I have no idea why.... Note: I used smaller case 'a' and Pi instead of 'N' but ultimately it doesn't make any difference. Edit: I just resetted the 50g F1+F6+ON and now it works fine. Oh well... 

04242015, 08:41 AM
Post: #9




RE: HP 50G help
Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basiccompare.html 

04242015, 10:21 AM
Post: #10




RE: HP 50G help
(04242015 08:41 AM)Marcus von Cube Wrote:Good catch but I had checked that.(04242015 07:16 AM)Tugdual Wrote: I have no idea why.... Now I defined 'a'=0 and indeed get the same result. I don't expect the 50g to search into all directories but the current one right (unless I misunderstood something quite fundamental)? Now to answer jrmc114064 once the INTVX is done, it becomes easy to solve. So basically 2 steps operation. 

04242015, 11:08 AM
Post: #11




RE: HP 50G help
(04242015 10:21 AM)Tugdual Wrote: I don't expect the 50g to search into all directories but the current one right (unless I misunderstood something quite fundamental)? As far as I know the 50g looks in all directories up the directory tree, at least in the home directory. Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basiccompare.html 

04242015, 11:52 AM
Post: #12




RE: HP 50G help
(04242015 11:08 AM)Marcus von Cube Wrote:Now that is something absolutely fundamental I didn't know.(04242015 10:21 AM)Tugdual Wrote: I don't expect the 50g to search into all directories but the current one right (unless I misunderstood something quite fundamental)? Thanks Marcus. 

04242015, 04:23 PM
Post: #13




RE: HP 50G help
(04242015 11:52 AM)Tugdual Wrote:(04242015 11:08 AM)Marcus von Cube Wrote: As far as I know the 50g looks in all directories up the directory tree, at least in the home directory.Now that is something absolutely fundamental I didn't know. From the AUG (Advanced Users Guide) for the RCL command: Quote:RCL searches the entire current path, starting with the current directory. To search a different path, specify { path name }, where path is the new path to the variable name. The path subdirectory does not become the current subdirectory (unlike EVAL). Though it's not stated explicitly, this same behavior is applied to many builtin operations where an implicit RCL of a variable is executed. I can't remember the details at the moment, but I'm pretty sure there are at least a couple exceptions to this rule. It all boils down to which SysRPL opcode is used to get a variable's contents onto the stack. Most of the time the parent directories are searched. Note that this isn't the same as searching all directories. Just the ones in the current path are included. 

04242015, 05:19 PM
Post: #14




RE: HP 50G help
(04242015 04:23 PM)DavidM Wrote:It is indeed something fundamental to understand.(04242015 11:52 AM)Tugdual Wrote: Now that is something absolutely fundamental I didn't know. But this being said is that the right way to go? The calculator would naturally feed the root directory with a lot of crap and a purge is tedious; my conception of a directory is precisely to isolate/encapsulate problems in their own context. So when I create a subdir I would expect to start with a blank page. In my humble opinion, this mechanism totally ruin the concept of directories. 

04242015, 05:32 PM
Post: #15




RE: HP 50G help
(04242015 05:19 PM)Tugdual Wrote:(04242015 04:23 PM)DavidM Wrote: From the AUG (Advanced Users Guide) for the RCL command:It is indeed something fundamental to understand. I personally think it is the right way to go. If you want to recall or store a value using only the current directory, there is a mechanism to do that: PATH 'MYVAR' + RCL (or replace RCL with STO) is the strict way to recall or store values in the current directory. The current mechanism allows one to have a single instance of a variable (in a containing directory) and have it be accessible in all lower subdirectories. Otherwise, we would have a lot of unnecessary redundancy. Graph 3D  QPI  SolveSys 

04242015, 05:33 PM
Post: #16




RE: HP 50G help
(04242015 05:19 PM)Tugdual Wrote:(04242015 04:23 PM)DavidM Wrote: From the AUG (Advanced Users Guide) for the RCL command:It is indeed something fundamental to understand. You can effectively accomplish that by not including variables in the Home (topmost) folder. Create only folders at the top and then you can move into each project folder to do whatever, and the programs running there can only "see" other items in that folder plus the above Home folder, which contains no variables/programs (if you follow this technique). Of course this includes folders in folders, etc. But you will quicklly find that there are many objects (utilities, etc.) which you really do want to use everyewhere, and these should be stored in Home. Also, the CUSTOM menu also is (or can be) unique to each folder, so you can can have a set of key assignments unique to the programs, objects, etc in that folder. Just build it and save it to 'CST' within that folder. Read Bill Wickes purple book on the 48G (included in the MoHPC USB Drive collection) it provides excellent explanations and real world examples of how to use these techniques to build modular tools and programs. Many of his nontrivial tools utilize 3, 4, 5+ different directories (folders). Good Stuff!! Bob Prosperi 

04242015, 07:34 PM
Post: #17




RE: HP 50G help
(04242015 05:19 PM)Tugdual Wrote: It is indeed something fundamental to understand. As others are pointing out, there's benefits to this technique and at the same time you can still be more explicit with your own programs if needed. Note that this is more of an issue for RCL than STO. Consider the following:  you have an object named 'ABC' in HOME containing the string "ABCDEFGHIJK"  your current directory is set to { HOME MyVars MyStrings }, and it contains no objects In this scenario, if you place 'ABC' on the stack and execute RCL, you will end up with "ABCDEFGHIJK" on the stack that was recalled from HOME. Conversely, if you enter "XYZ" and 'ABC' on the stack and press STO, the result will be two different 'ABC' variables in two different locations: { HOME } and { HOME MyVars MyStrings } . The original version in HOME is left unchanged, and a new one is stored in the current directory. 

04242015, 10:25 PM
(This post was last modified: 04242015 10:25 PM by Tugdual.)
Post: #18




RE: HP 50G help
(04242015 07:34 PM)DavidM Wrote:Understood, but root variables are pretty similar to global variables which I tend to avoid since the day I started OOP.(04242015 05:19 PM)Tugdual Wrote: It is indeed something fundamental to understand. Also the major drawback is that you cannot undefine a variable locally, hence CAS will be confused and would use root variable when you really meant it to be unknown and symbolic. I can't help finding that very misleading. Finally the VAR button does only show variables of the current directory while there could be much more available at this stage. This I think is the origin of my confusion and somehow this is not consistent with the way the calculator actually operates. This being said I respect all opinions expressed from people having obviously much more experience than I on this topic. I'll obviously need to dig a little bit more in the user guides. Tx all for feedback. 

04252015, 12:48 PM
(This post was last modified: 04252015 01:45 PM by Gilles.)
Post: #19




RE: HP 50G help
(04232015 04:00 PM)jrmc114064 Wrote: Thanks, don't know what I've been doing wrong, been trying to solve this problem: The precision (and the time to solve !) of the numeric solver depands on "Number format" (MODE FIX 4 for example for a precision of 4 digits) Are you sure of your equation (the 1/a part) ? If your equation is OK, the numerical solver returns results with a guess <> 0 (because of 1/a ?) : a=1.3447... a=2.2067... etc. EDIT : same problem with guess = 0 on the Prime... and same results... 

04252015, 02:23 PM
(This post was last modified: 04252015 02:35 PM by Marcio.)
Post: #20




RE: HP 50G help
(04252015 12:48 PM)Gilles Wrote: The precision (and the time to solve !) of the numeric solver depands on "Number format" (MODE FIX 4 for example for a precision of 4 digits) What function are you calling to find the roots on the Prime? If you're calling solve, fsolve or nSolve from HOME you might get "unpleasantly surprised". Take a look at this thread. The Solve app will work as expected though. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)