This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Math and Science => Technology & Calculator Open Topic
Author Message
Chasney913


Member


Joined: 28 Aug 2007
Posts: 117

Posted: 03 Nov 2007 01:20:00 pm    Post subject:

So basically what I want is a way to convert decimals back to the correct radical, in a good form such as a+b*(c√x). (c is the index). In a regular, easy question such as 1.41421356, it is easy to see that a is 0, b is 1, c is 2, and x is 2. However, with a slightly more complicated question, it is more difficult. Example: 3.2457309396. This is the approximate value of 2+1(3√5). You can't tell that by looking at it, however. Any ideas on a formula other than trial and error?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 03 Nov 2007 02:44:55 pm    Post subject:

Doing that for square roots alone is difficult enough, and introducing the index as a new variable would complicate it even further. If a solution exists—and I'm sure it does—then it'd enable us to find radical approximations for any real number. I'm not sure how it'd be implemented yet, but I'm interested in trying to find out. By the way, 3.2457309396 doesn't appear to be close to any sensible radical.

Last edited by Guest on 03 Nov 2007 02:47:09 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 03 Nov 2007 03:10:28 pm    Post subject:

2+1(3√5) is approximately 3.70997595, not 3.2457309396.
Back to top
Chasney913


Member


Joined: 28 Aug 2007
Posts: 117

Posted: 03 Nov 2007 03:13:55 pm    Post subject:

It would be nice, so that when I get a wacky number as an answer I could just put it in to a program and get an exact radical out of it. However, I figured it would be exceedingly difficult. Also, I see that the answer should be 3.709975947. I don't know what went wrong, other than I was doing it on the computer calculator instead of my trusty 84+. I guess that's a lesson learned. No more computer calculator for higher-than-basic questions.

I guess you'd need to find some way of determining what a is, and then work out the root from that, and simplify it to find b.

@DarkerLine: Where did you find that quote in your signature? I was trying to quote it the other day, but it doesn't really work if I say "from DarkerLine's sig".


Last edited by Guest on 03 Nov 2007 03:16:59 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 03 Nov 2007 03:53:47 pm    Post subject:

The problem is that given sufficiently high a and b, you can get arbitrarily close to the number no matter what c and x you choose. So there is no single correct answer and it's a matter of finding the simplest one.

The quote is of one of my friends, who I'm not sure would appreciate being cited on some forum he's never visited. It's possible that there's a similar quote of someone more famous out there, but I haven't been able to find one.
Back to top
alexrudd
pm me if you read this


Bandwidth Hog


Joined: 06 Oct 2004
Posts: 2335

Posted: 03 Nov 2007 06:19:15 pm    Post subject:

DarkerLine wrote:
The quote is of one of my friends, who I'm not sure would appreciate being cited on some forum he's never visited. It's possible that there's a similar quote of someone more famous out there, but I haven't been able to find one.  [post="115370"]<{POST_SNAPBACK}>[/post]
Did he tell you to keep it a secret? If not, he can't complain.
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 04 Nov 2007 06:59:18 pm    Post subject:

Instead of plugging the answer you get into a program to turn it into a radical, couldn't you just adjust whatever program you're using to give the answer as a radical? For example, if you had a quadratic formula program, you could just have it simplify "√B²-4AC" and output that. Or you could get something like an 89 with pretty print (I think that's what it's called). Basically, what you're trying to do now is finding the question given nothing but an answer.
Also, you could just learn to do whatever math problem you need this for yourself, and wouldn't even have to worry about what output the calculator gives. Teachers ask for work and exact answers because they want to know that you actually know/understand how to do something, not how to plug it in to a calculator.
(sorry if this sounds harsh, my biggest pet peeve is people who use a calculator for everything, which I'm not implying that you do though)
Back to top
angel14995


Member


Joined: 13 Oct 2007
Posts: 181

Posted: 04 Nov 2007 08:09:09 pm    Post subject:

I have to agree with Simple. 2= so many things, 2=1+1, 2=3-1, so on and so forth, so finding the question is hard enough. But maybe if you do it a certain way that is always guaranteed to give you the answer you are looking for will eventually come up.

And I actually feel close to the same way Simple does, just slightly differently. I wrote all of my formula notes into programs so that I can just plug it in and don't have to worry about it. If I really need to show my work, I can just go through the code and check it with the program.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 Nov 2007 08:17:11 pm    Post subject:

For numbers of the form a+b√c (a,b rational, c an integer), you could use continued fractions: once you have the continued fraction expansion, you could see if it repeats, and if it does, then it's the solution to a quadratic equation with rational coefficients, that you could hopefully solve for.

If it doesn't repeat, then either it's not of the form a+b√c, or else the period is too large; you can't really tell, since the calculator's precision isn't infinite. At this point, your best bet is to just return the continued fraction you've gotten as a fraction.


Last edited by Guest on 04 Nov 2007 08:19:19 pm; edited 1 time in total
Back to top
Chasney913


Member


Joined: 28 Aug 2007
Posts: 117

Posted: 06 Nov 2007 09:25:45 pm    Post subject:

It was originally so that I could do it for my quadratic equation solver, but I know that I could just do √B²-4AC. The only issue was, I call the quadratic equation solver from another part of the program, to reduce space, but it needs to run silently, like it is not solving the quadratic (I only need the inexact roots, converted to a fraction if they are rational). I thought the radical simplification would be nice, but I figured it would have a host of difficulties, but I can't know for sure, so I thought I'd better ask to find out; see if anyone knew a way.

I do know how to do the quadratic formula, which is what I'd be using it for, (it's the quadratic formula, not hard!), so I'm not using my calculator for everything, however it is nice to check answers. I'm basically lazy. Once I understand it, I prove I know what to by writing a program for it, and use that, except on assessments, because I need to show work. Then I work it out, and check with the calculator.

In a related matter, roots and such, if you go to this page:
http://tutorial.math.lamar.edu/Extras/Comm...ebraErrors.aspx
and scroll to "Proper Use of Square Root", it states that the only value of a square root is positive (no negatives). It provides an example. I believe the facts, it's why we need a ± in the quadratic formula, however, are there any suggestions on how to convince people I know that this is true?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 07 Nov 2007 03:09:01 am    Post subject:

Well, now that it's back down to just square roots... I normally don't post code that I know to be unnecessarily slow and heavy, but two of the algorithms I was working with ended up so similar, I just couldn't resist combining them into one line:

Ans+1→A
cumSum(binomcdf(int(Ans),0
For(X,0,1
Ans→B
(A-Ans)²
max(LBnot(fPart(round(AnsX/LB²+Ansnot(X
End
{B-1-2not(fPart(A)),Ans,(A-B)²/Ans²

This outputs {a,b,c}, where a+b√(­c) should equal the input, yet it only works if the letters are whole numbers. The input cannot exceed 255, and it will also throw an error if the expected result has a subtraction inside of it instead of an addition (i.e., √(5)-2 will crash the program). Although, if the number being subtracted is 1, then this stumbles into the right answer. Don't ask me why. Clearly, the performance is ugly, but that's not why I posted this.

What is interesting about this is that the long line in the For() loop performs a neat trick – it calculates the number being added to the square root in first pass, and then it figures out the quotient the second time around! Furthermore, Ans (and therefore B) assumes a list as X=0, and then is reintroduced as a real in round two. I've wasted my energy for the evening on this program, so I'll have to make a better one tomorrow (continuing to deal with only square roots).


Last edited by Guest on 04 Sep 2010 11:38:35 pm; edited 1 time in total
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 07 Nov 2007 09:27:32 am    Post subject:

Chasney913 wrote:
In a related matter, roots and such, if you go to this page:
http://tutorial.math.lamar.edu/Extras/Comm...ebraErrors.aspx
and scroll to "Proper Use of Square Root", it states that the only value of a square root is positive (no negatives). It provides an example. I believe the facts, it's why we need a ± in the quadratic formula, however, are there any suggestions on how to convince people I know that this is true?
[post="115580"]<{POST_SNAPBACK}>[/post]


Think about this:
2^2=4
(-2)^2=4
There are two numbers that can be squared for which you get 4.
Now, to find what number squared is 4, you know there are two, so you have √4=±2
That should convince them :biggrin:


Last edited by Guest on 07 Nov 2007 09:28:06 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 07 Nov 2007 09:30:32 am    Post subject:

Erm, except he's trying to convince them of the exact opposite.

Maybe a good argument to mention is that if √X created a ±, it would map one value to two different values, and therefore no longer be a function.
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 07 Nov 2007 09:43:39 am    Post subject:

Oh, I was looking at the last line instead of the first. Squareroot is the inverse of squaring, and so the domain must be restricted to positive reals and the range is restricted to positive reals. Unless otherwise stated, √X is implied to mean +√X
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement