Anyone good with math equations?

Soapmaking Forum

Help Support Soapmaking Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

IanT

Freemason, Maker, Father, Mover & Shaker
Supporting Member
Joined
Jan 10, 2008
Messages
4,743
Reaction score
112
Location
DeLand, FL
I am working on a imperative knowledge mathmatical formula that was attributed to heron of alexandria... it says....

(G+x/G)/2=

Im confused as to how to work this out...

is there even an answer to this???

Im such a friggin nerd... I am online right now on MIT's website taking a course on Introduction to computer science and programming. They offer free videos online for the whole course, and it is a subject ive been wanting to master for quite some time, but it is heavy in math and its been a LONG time for me as far as college goes (well I mean since 07 at least...)....

just wondering if anyone can give me insight or anything behind this equation. The professor is trying to give examples of declarative and imperative knowledge, declarative being that it tells you how you might test something, but doesnt show you to how to do it, and then imperative..which shows you how to do it...


his example for declarative was :

if G squared is close to x, stop... revert to G, im just confused with the imperative knowledge part of the example!

Thanks...

gosh I feel like such a nerd lol
 
sweeeet thanks donnie :)

Im learning to program in Python so that came up in one of the lectures :)

coooooool beans...so I guess I have seen this stuff before, I just forgot it!
 
Hero was a smart dude, way ahead of his time :)
So that's a basic and simple formula for finding the square root of a number. Hero is basing his theory on iterating till he gets the right answer: the square root of his number.
The condition to stop the iteration is, just as you said, "if G squared is close to x, stop."
If the condition is not satisfied, continue till you get your answer.
Ex: start with G1 = 1 and take X = 2 so we want to find sqrt of 2
And the calculation goes like : G2 = (G1 + X/G1)/2 and we plug in our known values:
1. G2 = (1 + 2/1)/2 = 1.5
2. G3 = (1.5 + 2/1.5)/2 = 1.416
3. G4 = (1.416 + 2/1.416 )/2 = 1.4143
4. G5 = (1.4143 + 2/1.4143 )/2 = 1.414213565

and by this point it checks out:
we get: 1.414213565 x 1.414213565 = 2.00000000743000922
which is close enough to our checkpoint: "if G squared is close to x, stop."
And we have our square root of 2: 1.414213565 computed by Hero's algorithm. The computer would say : 1.414213563 ... pretty close.

That's a pretty cool example to practice algorithms :)

Happy studying :)
mari
 
mariflo said:
Hero was a smart dude, way ahead of his time :)
So that's a basic and simple formula for finding the square root of a number. Hero is basing his theory on iterating till he gets the right answer: the square root of his number.
The condition to stop the iteration is, just as you said, "if G squared is close to x, stop."
If the condition is not satisfied, continue till you get your answer.
Ex: start with G1 = 1 and take X = 2 so we want to find sqrt of 2
And the calculation goes like : G2 = (G1 + X/G1)/2 and we plug in our known values:
1. G2 = (1 + 2/1)/2 = 1.5
2. G3 = (1.5 + 2/1.5)/2 = 1.416
3. G4 = (1.416 + 2/1.416 )/2 = 1.4143
4. G5 = (1.4143 + 2/1.4143 )/2 = 1.414213565

and by this point it checks out:
we get: 1.414213565 x 1.414213565 = 2.00000000743000922
which is close enough to our checkpoint: "if G squared is close to x, stop."
And we have our square root of 2: 1.414213565 computed by Hero's algorithm. The computer would say : 1.414213563 ... pretty close.

That's a pretty cool example to practice algorithms :)

Happy studying :)
mari

Okay I think I am sort of understanding...Im assuming the 1,2,3,4,5 next to the G's are subscripts right??

I had to sit down and write this out by hand and work it all out to understand it....

so:

Let X=2

1) G1= (1+2/1)/2=1.5 (1.5*1.5=2.25), reject. not close to 2
2)G2=(1.5+2/1.5)/2=1.416 (1.416*1.416=2.0022), reject not close to 2
3) G3=(1.416+2/1.416)/2=1.4143 (1.4143*1.4143=2.0002) reject, not close to 2
4) G4= (1.4143+2/1.4143)/2=1.41421 (1.414213565*1.414213565= 2.00000000743000922) Accept... Very close to 2


is that the correct logic behind it?? so basically we are extrapolating answers until we get what we want, by doing reverse square roots to figure out how to get to 2 by squaring a number, and the one that gets closest to 2 is the winner, at which point we can stop because the condition has been satisfied?

I think I am beginning to understand it :)

For anyone who is interested, here is the link I have been talking about:

I am up to the first lecture in the introduction to computer science and programming course, you can watch the lectures, get the notes, work the problems out...etc... for free... thats right... you can pretty much attend MIT online for free... thats siiiiiiiiiiick :)

Ive always wanted to learn this stuff...

Here is the excerpt from the notes that I took which in which the professor refers to the above equation:

• What is knowledge? (2 categories)
○ Declarative:
§ Statements of fact, assertions of truth.
□ Ex: SQRT(x) is y, such that y2=x, y=0 (why is positive)
□ Declarative knowledge gives you an example of how you might test something, but it doesn’t tell you how to test it.
○ Imperative:
§ A description of how to deduce something.
□ Ex: Heron of Alexandria
□ (G+x/G)/2
○ How does one build a mechanical process to capture this set of processes?
§ 1 way) imagine building a circuit, something for each process…division..addition..
□ Earliest computers were "fixed program computers"
□ They had a piece of circuitry designed to do a specific computation
® Ex: calculator, designed to do a specific thing; compute, not play games or word-processing.
® Turing (bombe) designed during world war II to break codes.
§ What would a circuit from a circuit diagram and to make the machine act like that circuit diagram.
§ Imagine if you could make a circuit that would follow a given protocol of steps, they have them… they are the basis of computers… called "interpreters"
§ What its doing is saying "change the game"

Thank you so much Mari for taking the time to explain that a bit more to me... I was a little confused still and I think that helped to clear it up provided that my above description of my current understanding is correct!! :)

Thank you so much! :)
 
Yep, that's it.
I guess the imperative knowledge they are talking about is understand how the algorithm works (or building your own algorithm) and coming up with a set of rules that will hold when you plug in the declarative knowledge.

Why Python?
 
All too much for me,l passed with a 97% rate for Geometry, 95% for straight maths and failed with the lowest score ever in the history of the Ashford Grammar school for Girls for Algebra :oops: l think it was something like 16%and that 16% was probably for getting my name right at the top of the exam page because l didn't understand a word of it.My chosen career ...Accountancy and l still can't work out Algebra :lol:
 
mariflo said:
Yep, that's it.
I guess the imperative knowledge they are talking about is understand how the algorithm works (or building your own algorithm) and coming up with a set of rules that will hold when you plug in the declarative knowledge.

Why Python?


Why Python? who knows... lol thats the program they are basing the course on, they say its a good start before you move on to other languages and they have JPython which apparently helps you melt into Java pretty quickly afterwards...so i guess they think its kinda like a basis?

Who knows lol.. Im just doing everything as if I was really paying for this course and thats the stuff theyre working with for this "semester" .... for me.. I wouldnt know my head from foot as far as programming programs or languages go lol so Im just happy to start somewhere and actually be understanding it lol

Im pretty sure you are right, I think after this they are going to go into making your own algorithms but hopefully first explain what one is and what it does etc...cause I havent the faintest idea lol...
I think this next course is developing a set of rules and such like you state about the declarative knowledge... I think we are going to be making a program that asks for the users name, and then spits it back out at them when they type it in... so that should be interesting! I will keep you updated on progress!... Do you mind if I get stuck if I ask you more questions... sound s like you know what youre talking about!!! ?

Do you program?

@pops...yeah I was one of those math haters my whole life but then recently decided...its not that I hate math, I just hated the way they taught it to me...not taking the time to make sure I had absorbed it before steamrolling onto the next topics...so I never really felt like I had learned one topic before moving to the next... so it didnt really build a good foundation for me... to get through my stat/trig courses in college I had to sit it the math lab alllll day (free tutoring!!!)... but I got through it lol Im right there with ya! :)

Thats nuts that now you are an accountant! lol... how do you like it?
 
It's really good that they offer courses for free on their website but apart from being interesting I also find it a little frustrating because just as it gets you hooked... it ends.
Don't know about Python in particular, I've never studied it, but programming in general is a pretty interesting area to get into.
I'd be happy to try to help if you get stuck :)
 

Latest posts

Back
Top