Inequality Solver v. 4.2.1 <------------------------Your window should be at least this wide---------------------------> Program: isolve.89z (.9xz) (.v2z) Author : Michael Pierce E-mail : mikee385@yahoo.com While the solve function on the TI-89, TI-89 Titanium, TI-92+, and Voyage 200 can only solve relatively simple inequality equations and partially simplify more complex ones, this function can solve most single variable equations, including polynomials and multiple equations. It is not limited to linear inequalities, and answers can be returned in either symbolic or approximate form. The answer will be output in a way similar to the answers returned by the solve function. Requires: -TI-89, TI-89 Titanium, TI-92+, or Voyage 200 -AMS 2.04 or above In order to use this function as part of an expression (such as isolve(x>3,x)->varname or isolve(sin(x)>0,x)|x<10 and x>-2) or use it in a TI-Basic program or function, you must install either IPR by Cyril Pascal (http://sirryl.multimania.com) or a shell such as DoorsOS, Universal OS, PreOS, or KerNO since AMS 2.xx and AMS 3.xx forbid the use of ASM programs in expressions. If you are using IPR, you'll first need to install Kevin Kofler's HW3Patch (http://www.tigen.org/kevin.kofler/ti89prog/) before installing IPR, and if you're using a TI-89 Titanium, you'll also need to run IPR through GhostBuster by Olivier Armand and Kevin Kofler (http://www.tigen.org/kevin.kofler/ti89prog/) before installing it in order to ensure that the calculator doesn't crash when you try to use isolve as part of an expression. For certain trig functions, some operating system versions will not return all of the correct answers (particularly equations that use a combination of trignometric and algebraic expressions, such as 2*(1-cos(2x))>3*sin(2x)). Since this is a bug in the operating system, there is nothing I can do to fix it. Also, AMS 2.08 and 2.09 cannot correctly simplify expressions with the combination of inequalities and fractional exponents (or square roots). In these instances, the result will be returned unsimplified to ensure accuracy. --------------------------------------------------------------------------------------------- ZIP Contents: isolve.89z - function for TI-89 or TI-89 Titanium isolve.9xz - function for TI-92+ isolve.v2z - function for Voyage 200 isolve README.txt - this file Version History.txt - history of the changes and improvements made to this program src/isolve.c - Source code for this program Included for informational purposes, check license at the bottom of this README ti-basic/isolve.89f (.9xf) (.v2f) - Original version of this program written in TI-Basic Included for informational and historic purposes --------------------------------------------------------------------------------------------- Syntax: isolve([equation],[variable]) or isolve([equation],[variable],[lower bound],[upper bound]) or isolve([equation],[variable])|[constraint expression] -[equation] can be most single variable equations and any form of the equation can be solved. It must contain the variable specified, and can only contain one undefined variable (specified by [variable]). Ex: isolve(3x-2>0,x) will return x>2/3 isolve(y^2+2<3y,y) will return y<2 and y>1 Multiple equations can also be solved. Simply enter the equations joined by an "and or an "or", depending on what you want to solve for. Every equation must contain the variable specified. Ex: isolve(03 isolve(x^2>4 and x^2<9 or x+3<-3,x) will return x<3 and x>2 or x<-2 and x>-3 or x<-6 CAUTION: AMS 2.08 and 2.09 have some problems with simplifying certain expressions (specifically those with square roots or fractional exponents) and may return incorrect values. To avoid this, this function displays the solution unsimplified if the calculator cannot simplify it correctly. If you attempt to use this expression elsewhere, it will most likely not transfer correctly. Alternatively, you can approximate the results by pressing [diamond]+[Enter] or by having the calculator in approximate mode. NOTE ABOUT TRIG FUNCTIONS: To eliminate answers with @n (which are awkwardly handled in inequalities on AMS 2.xx), all solving with trig functions will be limited so that the variable is within the range of [0,2*pi] if the calculator is in radians or [0,360] if it's in degrees. This can be overridden by passing an upper and lower bound to the function or by specifying an appropriate constraint expression. -[variable] can be any single variable as long as it fits the TI restrictions for variable names and is found in every expression in [equation]. -[lower bound] and [upper bound] are optional arguments used to specify a range for the answers. This is primarily used if the variable being solved lies inside of a trig function, such as isolve(sin(x)>0,x,0,720°) which finds the ranges between 0 and 720 degrees where the sin is greater than zero. The bounds are considered to be inclusive, e.g. isolve(sin(x)>0,x,0,720°) translates into isolve(sin(x)>0,x)|x<=720° and x>=0. -[constraint expression] is an optional argument used to specify a range for the answers, but allows more freedom than [upper bound] and [lower bound] can provide. For example, you could use a one-sided bound such as: isolve(abs(x)>2,x)|x>0, which returns x>2. However, expressions containing trig functions must be specified with a closed range. Something like isolve(sin(x)>0,x)|x>0 is not a valid constraint expression, but isolve(sin(x)>0,x)|x>0 and x<20 is valid. Aside from this limitation, any expression allowed by the operating system is valid. This functionality requires the installation of either IPR by Cyril Pascal, available at http://sirryl.multimania.com, or a shell like DoorsOS, Universal OS, PreOS, or KerNO since AMS 2.xx and 3.xx forbids the use of ASM programs in expressions. Additionally, you'll need to first install HW3Patch by Kevin Kofler. If you're using a TI-89 Titanium, you'll also need to run IPR through GhostBuster by Olivier Armand and Kevin Kofler. --------------------------------------------------------------------------------------------- Bugs/Limitations -can only solve for a single variable (but to my knowledge, it isn't mathematically possible to solve simultaneous inequalities for multiple variables so it doesn't really matter). -solutions with roots or fractional exponents can return false ranges if those values are not approximated in AMS 2.08 and 2.09, and these solutions are therefore displayed unsimplified; not a problem on earlier and later operating systems. -the variable is limited to the range of [0,2*pi] or [0,360°] if it lies inside a trig function due to the inability of the calc to correctly display the @n symbol with inequality signs in AMS 2.xx; specifiying an upper and lower bound or a constraint expression will override this. -certain operating systems will not always return every answer to certain trig functions. This is a problem that I cannot solve with programming. -complex numbers are not supported because the calculator can return some confusing and even scary looking results (try cSolve(abs(x)=5,x) and see what I mean, then try it in different complex modes). -complicated equations can take a considerable amount of time to calculate, especially complex trig functions and other larger equations: when expanded, (x+1)(x+2)(x+3)(x+4)(x+5)(x+6)(x+7)(x+8)(x+9)(x+10)>0 takes between 14 and 15 seconds to complete on a TI-89 with AMS 2.09 (calculated using Ticktest v1.01 by Francesco Orabona). If you find any bugs or have any suggestions, please e-mail me at mikee385@yahoo.com --------------------------------------------------------------------------------------------- License This is freeware. You may not charge for it. The code is open source. It is there to help in with your own projects and to give you ideas. You may not explicitly take anything from the code to use in any of your own projects. There is no limit on calculator-to-calculator distribution. Distribution on the internet of this program is limited to ticalc.org. If you wish to distribute this program as a subroutine for another program, then my permission is needed. I do not guarantee that this program works and cannot be held responsible for anything that may happen to your calculator. I have tried hard to remove all memory leaks and control any error conditions that may occur, but I am not perfect. If you believe there is a problem with the program, please contact me at mikee385@yahoo.com and I will do my best to fix it. This program comes with no warranty, so use it at you own risk.