1
$\begingroup$

My problem is quite simple and I cannot spot if this is my mistake or some malfunction of mathematica.

I am using

$Version
"12.0.0 for Linux x86 (64-bit) (April 7, 2019)"

Here is the code

W := 1/2 (D[h1[x, y], x] D[h2[x, y], x] + 
    D[h1[x, y], y] D[h2[x, y], y])
N1 := 1/2 (D[h1[x, y], x]^2 + D[h1[x, y], y]^2) h1[x, y] h2[x, y] - 
  1/2 (D[h1[x, y], x] D[h2[x, y], x] + 
     D[h1[x, y], y] D[h2[x, y], y]) h1[x, y]^2
N2 := 1/2 (D[h2[x, y], x]^2 + D[h2[x, y], y]^2) h1[x, y] h2[x, y] - 
  1/2 (D[h1[x, y], x] D[h2[x, y], x] + 
     D[h1[x, y], y] D[h2[x, y], y]) h2[x, y]^2
lsq := 2 Sqrt[N2/W]

I am making an ansatz for the two functions

h1[x, y] = a x + b y + e;
h2[x, y] = c x + d y + f;

Then I am using

sltn = SolveAlways[lsq == 1, {x, y}]

which gives me some solutions. However, when I run the command

Table[{lsq} /. sltn[[i]], {i, 1, 14}] // TableForm

to make sure that lsq is indeed one, the results are Indeterminate and ComplexInfinity

What is happening?

$\endgroup$
10
  • 2
    $\begingroup$ lsq is an ode depending on unknown functions h1[x,y], h2[x,y] . You really want to solve for x,y? $\endgroup$ – Ulrich Neumann Dec 11 '20 at 13:50
  • $\begingroup$ @UlrichNeumann thanks for pointing that out. there was some code missing as I copied from my notebook. now it should be well formulated as a question. $\endgroup$ – DiSp0sablE_H3r0 Dec 11 '20 at 13:52
  • $\begingroup$ Up to the documentation, SolveAlways works primarily with linear and polynomial equations. $\endgroup$ – user64494 Dec 11 '20 at 14:01
  • $\begingroup$ @user64494 I know. However, this statement does not exclude all other cases, at least naively. And to be honest if SolveAlways is unable to find solutions, shouldn't it return the input as output rather than giving faulty solutions? $\endgroup$ – DiSp0sablE_H3r0 Dec 11 '20 at 14:03
  • 3
    $\begingroup$ It's easily convertible to a polynomial system, which it probably does with generically valid transformations (squaring, multiplying both sides) that can introduce spurious solutions. Try ClearAll[h1, h2]; h1[x_, y_] = a x + b y + e; h2[x_, y_] = c x + d y + f; sltn = SolveAlways[lsq == 1 && (lsq^2 // Denominator) != 0, {x, y}]. $\endgroup$ – Michael E2 Dec 11 '20 at 14:24

Your Answer

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

Browse other questions tagged or ask your own question.