but not every equation has every variable. For example, consider the equations for Ohm's law and
electrical power:
V = I * R
P = I * V
In this case, there are four variables, but by specifying any two, it is possible to solve for the remaining
two variables. You can use the solve() function to simulate the HP48 multiple equation solving
capability, like this:
solve(v=i*r and p=i*v,{r})|v=4.2 and p=10
In this example I know v = 4.2V and p = 10 watts, and I want to find the resistance r. I can't find the
resistance directly from either equation; I need both equations to find it. In this case, r = 1.764 ohms.
It is nearly as easy to find both unknown variables at once:
solve(v=i*r and p=i*v,{r,i})|v=4.2 and p=10
which returns
r = 1.746 and i = 2.381
[11.7] Saving multiple answers with solve() in program
solve() returns multiple answers for simultaneous equations. The answers are returned as an
expression, for example
x1=1.234 and x2=5.678
This works well from the command line, but not within a program. For example,
solve({equation1 and equation2},var1,var2)
→
res1
[DOESN'T WORK!]
doesn't work, because TI Basic interprets the solve() result as a boolean, evaluates the boolean and
saves the result; either true or false.
This works:
string(solve(...))
→
res1
This saves the results as a string, which can be displayed, or decomposed into individual answers by
using inString() to search for the location of "and", then using mid() to extract the answers.
Another solution, which is better in most cases, is to use the zeros() function, which is equivalent to
exp
▶
list(solve(
expression=0,var))
This returns all the solutions as a list, and the individual solutions can be extracted by their position in
the list.
11 - 7
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...