Ah--that is much clearer!

I am not sure of a good iterative solution, but there is a fairly simple analytic solution.

Say we would like to find a solution with a floor of 64; that is, where 64 = <.x.

Then we have:

4002 = x * 64 * (x - 64)
= (64*x*x) + (_4096*x)

which means that:

0 = (64*x*x) + (_4096*x) + 4002

Which is a quadratic equation. We may attack it as normal, deriving a solution as:

   ] x=.(2*64) %~ 4096 + %: (_4096^2) - 4*64*_4002
64.9626
   x * (<.x) * (x - <.x)
4002

However, I think you asked for a rational answer; this solution is not rational because the determinant is not an integer square.

The solution with a floor of k has a determinant of (k^4) + 4*k. Are there any values for k in range such that that value is a perfect square?

   1 e. (= <.) %: (^&4 + 4&*) >:i.150
0

It appears not :/

 -E

On Tue, 19 Oct 2021, Skip Cave wrote:

I made a mistake in the equation in my first post..

The three terms that are multiplied are
1. x
2. floor of x  = (<.x)
3. fractional part of x = (x - <.x) This is what I got wrong in my first
post.

I can get close by manual trial & error:

*x=.64.962573478*

Floor of x = <.x = 64

Fractional part of x = (x -<.x ) = 0.962573478

* x: x * (<.x) * (x - <.x)*

*213746821r53410*


Close, but no cigar.


* 4002 = x * (<.x) * (x - <.x)*

*0*

A closer look - as a decimal fraction:

* x * (<.x) * (x-<.x)*

*4002.0000187231198652*


Yep. Not close enough.


How to design an iterative solution? There should be multiple solutions
with (<.x) = 63, 64, 65. 66 ... with the fraction

*(x-<.x) *getting smaller & smaller.

Skip Cave
Cave Consulting LLC


On Mon, Oct 18, 2021 at 6:25 PM Skip Cave <[email protected]> wrote:

How to solve this problem?

4002x = n * (<.n) * (>.n)


What is n, where n is a rational fraction greater than 1, and the answer
is a rational fraction? There are likely many answers, so find some answers
near 64. The result in J should be a 1:

4002x = n * (<.n) * (>.n)
1


Skip

Skip Cave
Cave Consulting LLC

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to