HP35S solve problem « Next Oldest | Next Newest »

 ▼ Alessandro Castellani (Italy) Unregistered Posts: 14 Threads: 5 Joined: Dec 2011 12-31-2011, 09:35 AM ```I'm new in this forum and I have a problem on my 35S: when I try to solve for the expression x^2-4 I always find only the positive root (2) even if I give it two initial estimates like -3 and -1 very close to the negative root (-2). This happens only trying to solve the expression directly from the EQN list, if I define the expression in a program and I solve it giving the same initial estimates, solve result is fine. This is my operation sequence in RPN mode: I insert the expression in the EQN list: [EQN] X^2-4 [ENTER] [C] I store in the X variable the first estimate (-3) 3[+/-][STO][X][ENTER] I store in the X register the second estimate (-1) 1[+/-][ENTER] from EQN list I recall the expression and I solve it for the variable X: result is always 2 Could anyone explain me where I wrong ? Thanks in advance and my best wishes for an happy 2012 to everybody. ``` ▼ Dieter Unregistered Posts: 653 Threads: 26 Joined: Aug 2010 12-31-2011, 10:51 AM Alessandro, there's nothing wrong with your 35s. You just discovered a feature that is often overlooked: the 35s can solve equations symbolically. It does so if the variable appears only once in the equation. This also happens in your case. Here, the equation ``` X^2 - 4 ``` or ``` X^2 - 4 = 0 ``` is automatically transformed to ``` X = SQRT(4) ``` This exact solution is then evaluated by the 35s, using its regular functions. So the square root always returns a positive result. This also means that - in such a case - the two initial guesses do not matter at all, they are completely ignored. If you want the usual numerical solution by successive iteration, simply change the equation a bit so that the variable appears twice: ``` X*X - 4 ``` or ``` X^2 - 4 = 0*X ``` All this has been discussed before. For more information and further details, please take a look at this thread. Dieter Edited: 31 Dec 2011, 11:18 a.m. ▼ Alessandro Castellani (Italy) Unregistered Posts: 14 Threads: 5 Joined: Dec 2011 01-02-2012, 03:37 AM Thank you very much Dieter. Alessandro Paul Dale Unregistered Posts: 3,229 Threads: 42 Joined: Jul 2006 01-02-2012, 04:00 AM How fares the 35S with X! = 6 ?? Variable appearing exactly once but there is no inverse gamma function on the device that I'm aware of. - Pauli ▼ Norman Dziedzic Unregistered Posts: 203 Threads: 29 Joined: Nov 2009 01-02-2012, 11:20 AM Without using the multiple variable trick in the equation it went for about 40 seconds and I canceled it. Using the equation X!=6+0*X It returned 3.000 (my setting Fix 3) after about 10 seconds. Dieter Unregistered Posts: 653 Threads: 26 Joined: Aug 2010 01-02-2012, 03:06 PM Well, there are some restrictions so that not all cases with a single appearance of the variable are solved symbolically. For instance, consider periodic functions like sin or cos. An equation like ``` SIN(X) = 0,5 ``` will not be solved directly since there is an infinite number of solutions (30, 150, 390, 510, ... degrees). So the 35s will not simply set x = arcsin(0,5) and return 30 degrees. The case you mentioned ``` X! = 6 ``` cannot be solved directly since there is no inverse factorial or inverse Gamma function on the 35s. So the usual iterative approach is applied here. I tried various initial guesses between 0 and 20 - the 35s always came up with the correct result x = 3, usually within 4 - 10 seconds. No tweaking (...+0*X) was required. Dieter

 Possibly Related Threads… Thread Author Replies Views Last Post HP35s Program Four Slings Lift Calculation Jean-Marc Biram (Australia) 2 2,198 12-16-2013, 07:21 PM Last Post: Jean-Marc Biram (Australia) HP35s Calculator Max Rope Tension Program Jean-Marc Biram (Australia) 10 4,358 12-12-2013, 12:03 AM Last Post: Jean-Marc Biram (Australia) XCas / Prime "solve" question Nigel J Dowrick 4 1,998 11-08-2013, 04:01 AM Last Post: Nigel J Dowrick Using the Prime to solve for eigenvalues Michael de Estrada 28 8,479 10-27-2013, 07:21 AM Last Post: Tarcisi C HP Prime Define: Use with solve, etc. Helge Gabert 0 1,001 10-23-2013, 06:24 PM Last Post: Helge Gabert HP 34s solve f'(x)=0 Richard Berler 8 2,582 10-07-2013, 03:03 PM Last Post: Dieter Good puzzle for kids to solve on 35s? snaggs 11 3,381 09-18-2013, 10:40 PM Last Post: David Hayden September SOLVE Newsletter Robert Prosperi 4 1,819 09-07-2013, 01:12 AM Last Post: Mic [HP Prime CAS] Solve Commands (Bugs and Request) CompSystems 10 3,872 08-08-2013, 12:34 PM Last Post: Gilles Carpentier 41 SOLVE & INTEG Bank-switched Implementation. Ángel Martin 0 906 06-21-2013, 11:31 AM Last Post: Ángel Martin

Forum Jump: