I am writing a program in CasioBASIC for my CG500 to find the roots of the expression below.
f(x) = 0 = -100+60x+16x^2+-2x^3+2x^4
I am using solve() for this, and sending the results, i.e. roots to a variable named "a"
START OF PROGRAM
ClrText
solve(-100+60x+16x^2+-2x^3+2x^4,x)=>a
Print a
END OF PROGRAM
The result is displayed as:
{X=-2.698706525,X=1.240787114}
My main question is about the output, which displays the multiple roots within curly brackets. Does anyone know how to "extract" a specific solution within the curly brackets? There are 2 roots displayed. Let's say, I want to use only the positive root.
Is there a way for me to tell the program to do this?
What if I wanted to use the negative root, instead? How do I let the program know this?
I looked into the fx-CG8500 User Guide again, and found this. It provides some information about braces, but I can't really understand what it is trying to say. I don't even know whether this information is relevant. Anyone know what it means? This note was placed under Syntax Conventions, together with a square box (indicates a space), square brackets, the three dots known as a ellipsis, etc. The information on the curly brackets state:
{} You need to select one of the multiple options inside the braces ({}).
Example: {On ; Off ; Number}
When inputting the command, do not include the braces or semicolons.