2 Questions: 1) storing answers and 2) solving equations

539 views
Skip to first unread message

Michael

unread,
Dec 6, 2010, 8:37:05 AM12/6/10
to tinspire
Hi all, two questions that have come up in my calculus class....

1. How can I store answers from the solve() command into 1 or more
variables?

Example: let's say I need to find the intersections a couple of
functions, call them f1 and f2. I use solve(f1 = f2, x) and let's say
I get "x = -2.123321123 or x = 3.456654456". I'd love to be able to
easily store that -2.123321123 into one variable and the 3.456654456
into another so that I could use them variables as limits of
integration.

2. On the non-CAS Nspire, is there a way to get all the zeroes of a
function? Looking at this group's archives, it looks like Steve from
Australia (sorry, can't remember your last name, Steve) has written a
library program that will do this, at least for polynomial functions.
For people that are afraid of library programs, am I right in assuming
that the only other way to do it is to graph the function and find the
zeroes on the graph? Hmm, which I guess brings me to another question:

3. If you find an intersection on a graph, what's the easiest way to
get the x-coord accurate to 7 decimal places? Right now it shows me 2
decimal places unless I select the point, bring up its Attributes menu
and change the "Custom Precision".

thanks!
Michael Hayashida
Poland Regional High School
Poland, Maine, USA

Nelson Sousa

unread,
Dec 6, 2010, 9:26:02 AM12/6/10
to tins...@googlegroups.com
Hmmm...

1. In general it will be hard. You'll need a program to parse the
reply and beware of all the restrictions and logic operator
combinations that may arise. For simpler cases, you can do it somewhat
easily, by taking left() and right() of expressions. Make a few
experiments. As to store in variables, given that you don't know
beforehand how many solutions are there, I reccommend using
indirection:

For(i,1,n)
value =: #("x"&string(i))
endfor

where n is the number of solutions and value is the i-th solution

2. You have polyroots and cpolyroots; these functions display all
solutions of polynomial equations.

3. The number of displayed digits is 3 by default, but you can change
it under system settings / graphs. Btw, this affects only the number
of displayed digits, not the accuracy of the calculation.


Nelson

> --
> To post to this group, send email to tins...@googlegroups.com
> To unsubscribe send email to tinspire+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> The tns documents shared by group members are archived at
> http://lafacroft.com/archive/nspire.php

Marc Garneau

unread,
Dec 6, 2010, 12:16:45 PM12/6/10
to tinspire
For #1, a simpler option for storing the solutions would be to use the
zeros command.
zeros(f1(x)-f2(x),x) will return the solutions into a list. You can
then define the list as a variable (or use the Spreadsheet app), and
easily define (or just reference) each element of that list.

Marc

John Hanna

unread,
Dec 6, 2010, 1:21:19 PM12/6/10
to tins...@googlegroups.com
I was thinking of zeros(), too.

How about using it in a math box on a Notes page to make it dynamic, too,
and then store each into variables to use elsewhere!

John Hanna
jeh...@optonline.net
www.johnhanna.us
T3 - Teachers Teaching with Technology
"A cowchip is paradise to a fly."

Michael

unread,
Dec 7, 2010, 8:00:56 AM12/7/10
to tinspire
Man, I love this listserv. Thanks for all the help!

Michael


On Dec 6, 1:21 pm, John Hanna <johneha...@gmail.com> wrote:
> I was thinking of zeros(), too.
>
> How about using it in a math box on a Notes page to make it dynamic, too,
> and then store each into variables to use elsewhere!
>
> John Hanna
> jeha...@optonline.netwww.johnhanna.us
> For more options, visit this group athttp://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB

Sean Bird

unread,
Dec 7, 2010, 12:27:36 PM12/7/10
to tins...@googlegroups.com
Like Nelson said regarding #3, the digits displayed do not reflect the precision of the value. Hover over the value and press ctrl menu (right-click) to easily store this value. Then it can be used in other places.
This tip is outlined in AP CalcExamPrep.tns         12624  Here is an improved student worksheet


- Sean Bird

Indianapolis, IN

jwilson828

unread,
Dec 7, 2010, 12:34:56 PM12/7/10
to tinspire
1. So this option might be too elementary - but in a think-fast
testing situation I think my students would just do the following:

Press the up arrow to highlight the solution; then press the right
arrow to deselect the solution. Hold shift and press the left arrow
until one solution is highlighted. Press enter to paste it to the new
entry line. Then press ctrl/var and a letter (variable name) to store
that solution.

Use the up arrow again to go back to the solution; press the left
arrow to deselect the solution. Once you arrow over to the start of
the first solution, hold shift and press the right arrow until that
solution is highlighted. Press enter to paste it to the new entry
line. Then press ctrl/var and a different letter (variable name) to
store that solution.

Then use the two stored variables as the limits in your definite
integral.

3. You can hover over the x-coordinate and press + repeatedly to
increase the number of decimal places displayed. This might be a good
quick option if you don't need everything accurate to 7 decimal places
(or have room on your handheld screen to view that many places). If
so, then you can change the displayed digits under Settings & Status /
Settings / Graphs & Geometry.

Jennifer Wilson
Northwest Rankin High School
Flowood, MS

Vicki

unread,
Dec 9, 2010, 7:09:12 AM12/9/10
to tinspire
Jennifer and all,
My students would also probably do what you suggested for #1. It's
not very elegant but once the students feel comfortable with copy and
paste, it is a quick way to store multiple solutions as variables in
the calculator application.
Vicki Carter
Reply all
Reply to author
Forward
0 new messages