Solve across an interval - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Solve across an interval (/thread-7347.html) |
Solve across an interval - lrdheat - 12-01-2016 06:19 PM Help for solve shows the possibility of searching for solutions within an interval using the syntax "a..b" When passing the example given in help to the command line and executing, the calculator produces an error relating to syntax. Is it possible to search for solutions over an interval? Somewhat related, when using advanced graphing app and numerical table to show multiple solutions "X" for a given f(X), there are functions that take a lot of time to graph that result in the table not filling, yet the function graphs immediately in regular graphing app. An example is a function I had a thread on recently... ((Sqrt(tan X + 1)-sqrt(sin X + 1))/x^3 RE: Solve across an interval - Helge Gabert - 12-01-2016 10:49 PM Which one of the solve examples do you have problems with? I tried solve(x^2-x=1,x=1..2), and solve(x^2-x=1,x=0..-1) and it works fine, returning one solution only, as desired. RE: Solve across an interval - lrdheat - 12-02-2016 02:58 AM I just discovered that the interval works if one types it in with a space between each endpoint and the decimals: X=-1..2 produces syntax error concerning 2 decimal points while x=-1 .. 2 works, and will produce multiple results if a multiple of results are exist within the interval. RE: Solve across an interval - Han - 12-02-2016 12:32 PM (12-02-2016 02:58 AM)lrdheat Wrote: I just discovered that the interval works if one types it in with a space between each endpoint and the decimals: X=-1..2 produces syntax error concerning 2 decimal points while x=-1 .. 2 works, and will produce multiple results if a multiple of results are exist within the interval. What are your settings for the fraction mark? I am not able to cause a syntax error even when I do not specify the spaces like you mentioned. RE: Solve across an interval - lrdheat - 12-02-2016 03:55 PM I use "."s to indicate decimal RE: Solve across an interval - DrD - 12-02-2016 04:16 PM Are you passing the solve help example into the command line in the [Home] environment, by any chance? The help example works just fine in the [CAS] environment. [attachment=4233] [attachment=4234] RE: Solve across an interval - lrdheat - 12-03-2016 02:43 AM You are correct...I was in home, works in CAS. Dumb question: why doesn't it (intervals) work in home? (Or is there another expected syntax?) RE: Solve across an interval - DrD - 12-03-2016 05:55 AM It's important to remember that case matters. Lowercase commands are CAS commands, and use lowercase variables. Home commands use uppercase names and variables. Syntax errors result when you get them wrong. RE: Solve across an interval - cyrille de brébisson - 12-05-2016 10:37 AM Hello, Intervals are not implemented in home. Cyrille |