# Simple math problem.. I think.. If I was good at math :)

By fritsl

September 5, 2012

September 5, 2012

I am going nuts over this (possibly) simple equation that I need for a fun Processing project.

I need to have the "calculation" or "equation" for** X**

**Y** is the number of times we go (X=X+X), and the end result should always be **1**

EXAMPLE:

IF Y is 2 then X = **0.25**, because

0.25+0.25=0.5 (Y1)

0.5+0.5=1 (Y**2**)

HOW on earth does one calculate X? (if Y is for example 214.7787009)?

I imagine it'd be something like X=1/SQR Fish Y Something Hotdog?!?

There's SO much respect to the person cracking this! :) (Or I'll delete the post and pretend this never happened, if the answer is really simple :)

Thanks :) (and respect)

## I know that you are a

I know that you are a mathematician Markus :-) (but had to google B.Sc.just now)

What I don't like is something endless to the top....I like defined areas/ranges/numbers with an END.

So I want to know what Frits is planning with this calculation.

//Edit: This article in the link is from you...got you because of the very unique username :)

## "So I want to know what

"So I want to know what Frits is planning with this calculation."

I just needed to be able to insert predicted gravity in time&space in an virtual invironment, while learning Processing, and having frantic spasms and tics. (Don't ask me, nothing makes sense, I work and play by intuition :)

The number 1 is gravity 1 at "the edge" of a given object. Y is the distence to the object. X's are amount of gravity, relative to 1 at the surface. My mind flew from space, and was now affected by X, as an object came closer. I knew the distance to the object, Y - but how much gravity should I feel, I was wondering :D The answer was X!

## My only "Serious comment"...

...is that you are not able to phrase out your problem to us "O Master of LMR". Also, this is not a mathematical problem but a physical one. Yes we'll be using a lot of maths to solve it (atleast till I get a PHD in quantum physics and prove that maths is wrong and insufficient).

What I understand from your last para is this- You want to calculate how much gravity is present at the edge of an object relative to a particular surface you define to have gravity equal to 1. All you know is the distance of the object (but from where? Your reference point or what?). What I'm giving below is a possible solution-

Now, going back to what I've studied in my old physics book (Concepts of Physics Part-1 by Dr.H.C. Verma Chapter 6, page 204), here is what Newton wrote when the apple fell on his head-

Force(F)=[Gravitational Constant(G)*Mass of 1st object(M

_{1})*Mass of 2nd object(M_{2})]/{[Distance b/w the 2 objects(r)]^2}Or- F=GM

_{1}M_{2}/(r^2).Now, what it simply means is that each object applies a gravitational force on every other object. Simply said, right now as you read this, Pluto is trying its best to pull you off the ground. However, as the distance r is very large and r^2 is just too large for me to mention is, F tends to 0 (limits yes...).

Now coming to the frame of earth (ie all calculations that will be done only on earth),

g(gravitational acceleration aka gravity you feel)=F/M

_{2}where M_{1}is mass of earth and M_{2}is mass of any other object.which implies, g=G*M

_{1}/(r^2) where r^2 is the distance of center of object 2 from center of the earth.Now, as you said, any object will have gravity equal to 1, so g

_{1}felt by that object is = GM_{1}/(r_{1}^2) where r_{1}is the distance of that object from the center of the earth. Now, if you know the distance of the object 2, ie the object you want to find out about, g_{2}=GM_{1}/(r_{2}^2). So if g_{1}=1 and g_{1}/g_{2}=(r_{2}^2)/(r_{1}^2)=(r_{2}/r_{1})^2, g_{2}=(r_{1}/r_{2})^2.If you are out of earth frame ie in general space- g

_{2}=(m_{2}*r_{1}^2)/(m_{2}*r_{2}^2) if g_{1}=1. It also means that g_{2}if m

_{2}>m_{1}and r_{2}>r_{1}.What I believe you are not understanding is that gravity is relative and not just that any object has a particular gravity at one point. For the simplest example, consider your weight. If say, its 60kgs on earth, its not kg as in mass but kgwt. On moon, it'll be 20kgs only (gravity on moon is 1/3 of earth roughly). Your gravity is not just a quantity. Its an attractive force which acts on both bodies in opposite directions. If earth pulls you, you also pull it back with the same force. That's one of the reason's why we say there is no gravity in outer space. That's because there is nothing to pull you back. You need some 3rd body to get an idea of what you are going to define gravity by and then calculate the reltives of the 2 bodies.

I don't know if I've made my point, inform me.

## I am out now LOL

I am out now LOL

## hey vishu, don't say that

hey vishu, don't say that you can prove that maths is wrong! no!!! maths is a language! and dispoving it is like disproving language, plus, maths is the one who can make it easier to calculate properties and make theories explain and learn via numbers, it's hard to just explain a theory with just words, you need to use another language, and that language is maths!

## Oh - and "endless at the

Oh - and "endless at the top": All in universe is affecting all. That is why. But my dick is only affecting Mars with very.. very small numbers. Very!

## Would I be correct in

## I may be late to the party but...

Yis the number of times we go (X=X+X), and the end result should always be1...which I interpreted as 2^Y*X=1 (2^Y means 2 to the power Y)

so: X=1/(2^Y) which is exactly what pow(2,-Y) means

## Sorry I can not follow you,

Sorry I can not follow you, Antonio.

First of all, in math x=x+x makes no sense, because x=x+x <=> x=2x <=> 1=2 (contradiction).

If I understand Frits (admittedly horrible) description, it is the simple equation 2xy=1. Solving for x, we get x=1/(2y).

I see no any reason to use y as an exponent. This would lead to a logarithm equation. Your equation is only true for the special case y=2, because 2+2=2*2=4 and 2^2=4. But for example 2*3=6 and 2^3=8.

## Let me clarify...

From what I understood Frits wanted a piece of code to compute a function F(Y) such that the following function returns 1:

function testF(int y) {

float x = F(y);

for (int i = 0;i<y;i++) {

x=x+x; //which is x=x*2

}

return x;

}

Notice that the loop doubles x y times so this function can be rewritten as:

function testF(int y) {

float x = F(y);

x = x*pow(2,y);

return x;

}

Since we want this function to return 1 we could write the equivalent ecuation as F(y)*2^y=1 or F(y)=1/2^y

Does it make sense now?

Also, x=x+x is a perfectly valid ecuation, the only solution for x is 0 :)

2345next ›last »