Group Abstract Group Abstract

Message Boards Message Boards

How do I find x in a polynomial when x is approximate?

GROUPS:
I have difficulty programming to find x in a polynomial. I try NSolve to set the equation to zero and solve for x.
If N = 85, x= 5, and y = 17

I have an equation:
y = sqrt((N * y – x^2)/x)
as an approximation of the larger Prime product (or any possible product)

My equation as it stands does not find x. I know there is a margin of error in the equation. This error can be subtracted to get a closer approximation. For example:
In the following equations: y = 17.2941176471 = 16.8522995464 This is the answer when subtracting the 2 equations below to find x knowing only N. Look at the Yellow.

So as the equations approach 0 (plus the margin of error). So since it is an approximation I need to find those values that are less than 1 and greater than 0. But 16.9082 is the value of the equation and not the value of x which should be found.
I need help programming this. So if anyone can help it would be much appreciated.
y = sqrt[(((85/x) * 85 - x^2)/ x) ]= ((85^2/x) + x^2)/ 85

p = ((((85^2/x) + x^2)/ 85 ) ^2)- (((85/x) * 85 - x^2)/ x )^2 - 0.4418181007  ;

sol = NSolve[p0, x]

{{x-86.8953},{x82.8717},{x23.3122},{x-7.50642+19.0312 },{x-7.50642-19.0312 },
{x-10.592+14.3276 },{x-10.592-14.3276 },{x16.9082}}
y = sqrt[(N * y - x^2) / x]
y = sqrt[(7872197 * 3191 - 2467^2) / 2467]

You can see this work at http://www.3dbuzz.com/forum/threads/200441-New-One-Way-Function/page2
Look at the last page first.
Also my website is www.constructorscorner.net
POSTED BY: Bobby Joe Snyder
Answer
6 months ago
The code as presented in the first web page you  link to is easier to read.
The -> for Rule and I for Sqrt[-1] come across better than special characters.

Using a Mathematica built-in function name (N) as a user variable name is asking for trouble.

It wasn't clear from the code above or the link if "sqrt" is your own function or
a mis-capitalized Sqrt.
POSTED BY: Bruce Miller
Answer
6 months ago
Have you tried Interval?
 In[1]:= soln = Solve[ y == Sqrt[(n*y - x^2)]/x, x]                                     
 
                  Sqrt[n] Sqrt[y]          Sqrt[n] Sqrt[y]
 Out[1]= {{x -> -(---------------)}, {x -> ---------------}}
                             2                        2
                   Sqrt[1 + y ]             Sqrt[1 + y ]
 
 In[2]:= soln //. {n -> 85, y -> 17} // N                                               
 
Out[2]= {{x -> -2.23221}, {x -> 2.23221}}

In[3]:= ?Interval                                                                      
Interval[{min, max}] represents the range of values between min and max.

In[4]:= soln  //. {n -> 85, y -> Interval[{16.8523, 17.294}]}                          

Out[4]= {{x -> Interval[{-2.27109, -2.18484}]}, {x -> Interval[{2.18484, 2.27109}]}}
POSTED BY: Bruce Miller
Answer
6 months ago
Sorry for the delay. I much value your opinion. I have been trying for 6+ years in my spare time to find a pattern of Prime numbers in a logarithmic spiral. This here is not a pattern in Prime numbers, but a description of multiplication.

The N = p *e

I am saying knowing N I can find p the smaller product. My example is 85 = 5 * 17

The trouble is it is a polynomial which means that the equation is difficult if not impossible to solve. Better methods of solving polynomials need to be found. I have not learned higher mathematics  beyond linear algebra, so I rely on Mathematica which crunches numbers.

The trouble is both sides of the equation are equal. That is, they both equal  17. But my equation when solving for x = 17 for the single case of 85 = 5 * 17. What I don’t know is why I plug 5 in for x and 85 for N it equals (with a margin of error) 17.

Is my method of programming Mathematica wrong? Why can’t I solve for x?

I hope this clears up my question, but if it is still unclear let me know. The code is posted below.

BTW I am looking at interval now. Thanks for the direction.
POSTED BY: Bobby Joe Snyder
Answer
6 months ago
y = sqrt[(((85/x) * 85 - x^2)/ x) ] = ((85^2/x) + x^2)/ 85


p = ((((85^2/x) + x^2)/ 85 ) ^2) - (((85/x) * 85 - x^2)/ x )^2 -
   0.4418181007  ;

sol = NSolve[p == 0, x]

{{x -> -86.8953}, {x -> 82.8717}, {x ->
   23.3122}, {x -> -7.50642 + 19.0312 I}, {x -> -7.50642 -
    19.0312 I}, {x -> -10.592 + 14.3276 I}, {x -> -10.592 - 14.3276 I}, {x ->
   16.9082}}


This is still an approximation. In the above example 9 solves the equation better than 5. That is where 5 should be the desired answer. N = 85; x = 5; and y = 17 . So there still isn't a perfect solution just estimated. But take:



y = sqrt[(N * y - x^2) / x]

y = sqrt[(7872197 * 3191 - 2467/^2) / 2467]
POSTED BY: Bobby Joe Snyder
Answer
6 months ago
In[14]:= soln = Solve[y == Sqrt[(n*y - x^2)/x], x]

soln //. {n -> 85, y -> 16.85229955} // N

Out[14]= {{x -> 1/2 (-y^2 - Sqrt[4 n y + y^4])}, {x ->
   1/2 (-y^2 + Sqrt[4 n y + y^4])}}

Out[15]= {{x -> -288.957}, {x -> 4.95729}}



Bruce I am in your debt. You helped show the equation works. I moved a parenthesis to correct.

But the equation works. Unfortunately there is still the difficult task of solving the polynomial only knowing N. I isolated x, but does that help knowing only N?

The problem is this. I know N, I don’t know that we can solve polynomials. Because I know N and say if 17 where tried it would equal 5.

I have an equation with x unknown, but the only variable in the equation is x. So interval proves those values are true. But can we solve the polynomial for x only knowing N?
POSTED BY: Bobby Joe Snyder
Answer
5 months ago
To get a value for x, you need y.  With just n, you can get a relationship between x and y.
 In[1]:= soln = Solve[y == Sqrt[(n*y - x^2)/x], x]
 Out[1]=
        1    2                 4           1    2                 4
 {{x -> - (-y  - Sqrt[4 n y + y ])}, {x -> - (-y  + Sqrt[4 n y + y ])}}
        2                                  2
 
 In[2]:= soln /. {n -> 85, y -> 16.85229955}
 Out[2]= {{x -> -288.957}, {x -> 4.95729}}
 
In[3]:= soln /. n -> 85

Out[3]=
       1    2                 4           1    2                 4
{{x -> - (-y  - Sqrt[340 y + y ])}, {x -> - (-y  + Sqrt[340 y + y ])}}
       2                                  2

In[4]:= $Version
Out[4]= "9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"

In this plot, y is the horizontal axis and x is the vertical axis.
In[5]:= Plot[Evaluate[x /. soln /. n -> 85], {y, -30, 30},
     PlotStyle -> {{Blue, Thick}, {Red, Thick}},
Frame -> True, GridLines -> {None, {0}}, FrameTicks -> All]
POSTED BY: Bruce Miller
Answer
5 months ago
Bruce can you work your Mathematica magic on this?

Sqrt[((85*(85/x)) - x^2)/x] - (( 85^2/((85^2/x) + x^2) ) ^2) = 0

Plugged into Wolfram Alpha this yields for x :  x is approximately 4.42297

Getting pretty close to 5 not knowing y!

This is a margin of error in the 2 equations that are subtracted about 0.599

Is this any closer to solving knowing only N?
POSTED BY: Bobby Joe Snyder
Answer
5 months ago
If the goal really is to find the integer factors, perhaps one could just use Solve or FactorInteger.
In[17]:= Solve[x y == 85 && 1 < x < y, {x, y}, Integers]
Out[17]= {{x -> 5, y -> 17}}
In[18]:= FactorInteger[7872197]
Out[18]= {{2467, 1}, {3191, 1}}
POSTED BY: Ilian Gachevski
Answer
5 months ago
Using vector addition I have another equation. I can keep making these and maybe I will find a helpful relationship. But it does no good to find an equation in polynomial form if I cannot solve for x in the polynomial.

This time I keep it simple. My question is does this accomplish anything?

Abs[tan(y / (2*Pi))]*x+x=(y ⁄ ((2*Pi)))
POSTED BY: Bobby Joe Snyder
Answer
4 months ago
http://www.wolframalpha.com/input/?i=Abs%28tan%2885+%2F+%282*Pi%29%29%29+*++x+%2B+x+%3D+85%2F%282*Pi%29

Abs(tan(85 / (2*Pi))) *  x + x = 85/(2*Pi)



comes to 5.5 in Wolframalpha.

Is this anything?
POSTED BY: Bobby Joe Snyder
Answer
4 months ago
Looks like a reasonable approximation to a root.
In[13]:= FindRoot[Abs[Tan[(85/(2*Pi))]]*x + x - 85/(2*Pi) == 0, {x, 2}]
Out[13]= {x -> 5.55835870667}
POSTED BY: Daniel Lichtblau
Answer
4 months ago
Daniel,

This solution is deceiving. The angle is in radians of course. But does it work for other values of N?

The answer is not exactly. There is some range of error. Also I made a algebraic mistake in the simplification.

But if this is fixed and there are test values it does seem to have some use. But solving for N proves difficult.

My question is does the following show any benefit from my effort?

 y = sqrt[(((85/x) * 85 - x^2)/ x) ] = ((85^2/x) + x^2)/ 85
 
 In[27]:=
 p = ((85/x) * 85 - x^2)/ x - (( 85^2/((85^2/x) + x^2) ) ^2);
 
 sol = NSolve[p == 0, x]
 
 Out[28]= {{x -> -36.2894}, {x -> 27.7376 + 21.7226 I}, {x ->
    27.7376 - 21.7226 I}, {x -> -10.093 + 32.5167 I}, {x -> -10.093 -
    32.5167 I}, {x -> 9.44493}, {x -> 0.257048 + 9.23565 I}, {x ->
   0.257048 - 9.23565 I}, {x -> -8.95875}}


This is still an approximation. In the above example 9 solves the equation better than 5. That is where 5 should be the desired answer. N = 85; x = 5; and y = 17 . So there still isn't a perfect solution just estimated. But take:



In[31]:= y = sqrt[(N * y - x^2) / x]

y = sqrt[(7872197 * 3191 - 2467^2) / 2467]

Out[31]= sqrt[(-x^2 + N sqrt[(-x^2 + N sqrt[(-x^2 + 1/85 N (7225/x + x^2))/x])/x])/x]

Out[32]= sqrt[10180014]


So sqrt of 10180014 = 3190.613421 which is approx y or 3191.

The above substitution shows it works for larger values of N. Can it be programmed to factor the product of 2 large Prime Numbers?
POSTED BY: Bobby Joe Snyder
Answer
4 months ago
I don't follow most of this but I can answer the last question. No, it (NSolve-based methods) cannot be
programmed to factor the product of two large primes.
POSTED BY: Daniel Lichtblau
Answer
4 months ago
Sqrt[(85*(85/x) – x^2)/ x] = y

Abs(tan(85 / (2*Pi))) * x + x = 85/(2*Pi) tan in radians of course.

((85^4/x + 2*(85^2 * x^2) + x^5) / 85^3 ) * x – 85 = 0
________ These three equations solve show how two Prime numbers x and y equal 85.
This is important because in asymmetric cryptography such as RSA, the public key is the product of 2 unknown Prime numbers. If we can set a relationship to find x or y when given N, which in this case is 85, the one way function that RSA is based on is mathematically defeated!!!


_______ So if we set equation 1 equal to equation 3 the polynomial produced, if solvable, will solve for x.

Equation used to find 5 knowing 85:
((85^4/x + 2*(85^2 * x^2) + x^5) / 85^3 ) – 0.6 = Sqrt[(85*(85/x) – x^2)/ x] + 0.15
= approxiamtely 5.02 when solved by Wolfram Alpha!

I believe this will defeat RSA. However no one believes me or just doesn’t care. To me it is interesting, but when I ask people about it no response. If it worked I think it would go viral. What do you think?
POSTED BY: Bobby Joe Snyder
Answer
1 month ago
I truly believe this problem has merit. It took 2 seconds to dream it up as Prime numbers being wrapped around a logarithmic spiral and 5+ years to write it all down. I do not want to dwell on this problem. I have spent a lot of time on it. My next step is to show how the logarithmic spiral should work.

I would not have an estimate of which numbers to try as the Prime products if it were not for Wolfram Alpha (Mathematica).

I sent it to a library researches and they basically said to call them back when I can factor a 256 bit number. So there is still work to test to see if it works. But I see something here and hope others see it too.

I was hoping this had merit and went viral. So far I estimate over 10,000 views. But it wouldn’t matter if it doesn’t work.

@ Bruce Miller

You showed me how to find x knowing y in Mathematica code. Do you believe that the last equation solves for x knowing only N?
POSTED BY: Bobby Joe Snyder
Answer
21 days ago
"Do you believe that the last equation solves for x knowing only N?"

The last few equations in the thread do not have an N. 

Find the equation you mean. If it has only x's, N's, and numbers, then there could
problably be at least an implicit numerical solution. I don't know now if a symbolic
solution would exist.
POSTED BY: Bruce Miller
Answer
21 days ago