6
$\begingroup$

This is a continuation question to Sums as rational vector dot products with a basis constants vector.

Consider the following FindInstance query. Looks easy, doesn't it?

FindInstance[(x + y Sinh[1] + z Cosh[1])/d ==
  (1 + Sinh[1] + Cosh[1])/2 && d > 0, {x, y, z, d}, Integers]

FindInstance::nsmet: The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist.

So, no. Many of queries of the same form (varying expected x, y, z and d) succeed trivially, while others fail mysteriously. What gives?

TrigExpand resolves the problem for these specific constants (Sinh[1] and Cosh[1]), but that's not what I'm looking for. I'm looking for a general solution to the problem of reliable extraction of multipliers to non-rational constants.

EDIT:

It is not that this specific case would be hard to work out by finding a suitable method. I'd naively expect that any integer combination of x, y, z and (non-zero) d should be trivially recoverable for any such, even structurally obvious linear combination of basis constants (1, Sinh[1] and Cosh[1]). I would expect this process to have $O(1)$ run time complexity on size of these integers if the form is essentially exactly the same on both sides, and to never fail.

FindInstance works fine, after all, with many combinations of above variables even when they're like hundred digits long. What is the technical approach FindInstance takes here? What would be a more robust method for these kind of problems?

$\endgroup$
  • $\begingroup$ maybe FindInstance[ Rationalize[ N[(x + y Sinh[1] + z Cosh[1])/d == (1 + Sinh[1] + Cosh[1])/2]] && d > 0, {x, y, z, d}, Integers]? $\endgroup$ – kglr Aug 11 '18 at 20:38
  • $\begingroup$ @kglr That's not a result of practical value to me, though. Also, my root question is... what on Earth is going behind the scenes if FindInstance fails to find the symbolic result? $\endgroup$ – kirma Aug 11 '18 at 20:41
  • 1
    $\begingroup$ Funny, FindInstance[(x + y Sinh[1] + z Cosh[1])/-minusd == (1 + Sinh[1] + Cosh[1])/2 && minusd < 0, {x, y, z, minusd}, Integers] works… $\endgroup$ – xzczd Aug 12 '18 at 15:05
4
$\begingroup$

FindInstance works in this case if you require all variables to be positive

FindInstance[(x + y Sinh[1] + z Cosh[1])/d == (1 + Sinh[1] + Cosh[1])/
    2 && (And @@ Thread[{x, y, z, d} > 0]), {x, y, z, d}, Integers]

(* {{x -> 1, y -> 1, z -> 1, d -> 2}} *)

Finding other solutions by brute force

max = 10;

Thread[{x, y, z, d} -> #] & /@ (Most /@ 
   Select[Flatten[
     Table[{x, y, z, 
       d, (x + y Sinh[1] + z Cosh[1])/d == (1 + Sinh[1] + Cosh[1])/2 && 
        d > 0}, {x, max}, {y, max}, {z, max}, {d, max}], 3], #[[5]] &])

(* {{x -> 1, y -> 1, z -> 1, d -> 2}, {x -> 2, y -> 2, z -> 2, d -> 4}, {x -> 3, 
  y -> 3, z -> 3, d -> 6}, {x -> 4, y -> 4, z -> 4, d -> 8}, {x -> 5, y -> 5, 
  z -> 5, d -> 10}} *)

Generalizing,

(x + y Sinh[1] + z Cosh[1])/d == (1 + Sinh[1] + Cosh[1])/2 && 
   d > 0 /. {x -> n, y -> n, z -> n, d -> 2 n} // Simplify[#, n > 0] &

(* True *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.