Laël Cellier on Sun, 19 Jan 2025 21:56:16 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Is it possible to have several solutions in this way to this equation using Pari/ɢᴘ ?


So yes, I want to solve a system of equations where alpha and beta can be set to any values as long as they’re valid for solving the first equation.

Are you meaning this/your code allows to get more than 2 solutions for the second equation ?

Cordialement,

Le 19/01/2025 à 21:39, Bill Allombert a écrit :
On Sun, Jan 19, 2025 at 08:05:09PM +0100, Laël Cellier wrote:
first,
beta=-(V\W);
alpha=W*(V+W*beta);

is just 1 way to find a suitable solution alpha == w (v + w beta). I’m
needing to find other ways in order to get different results.

Let’s give a numerical example :
V=25 c=60 W=3 b=85 f=-1
give :
alpha=3
beta=-8
nfr=[-4, -1/9]~
So you want this system of equation to have solutions:

alpha^2*x^2+(2*alpha*beta-f*b)*x+(beta^2-c) = 0
alpha=W*(V+W*beta);

you can eliminate alpha and obtain

Q = subst(P,alpha,W*(V+W*beta))
Q=(W^4*beta^2+2*V*W^3*beta+V^2*W^2)*x^2+(2*W^2*beta^2+2*V*W*beta-b*f)*x+(beta^2-c)
To have rational solution the discriminant of Q needs to be a square
? poldisc(Q)
%3 = (-4*W^2*b*f+4*W^4*c)*beta^2+(-4*V*W*b*f+8*V*W^3*c)*beta+(b^2*f^2+4*V^2*W^2*c)

so we need to solve for (beta, D)

D^2= (-4*W^2*b*f+4*W^4*c)*beta^2+(-4*V*W*b*f+8*V*W^3*c)*beta+(b^2*f^2+4*V^2*W^2*c)

This is in general a conic which can be solved with qfsolve/qfparam
(or hyperellratpoints).

fun(V,W,b,c,f)=
{
   my(A= (-4*W^2*b*f+4*W^4*c), B = (-4*V*W*b*f+8*V*W^3*c)/2, C = b^2*f^2+4*V^2*W^2*c);
   my(M=[A, B, 0; B, C, 0; 0, 0, -1]);
   my(S=qfsolve(M));
   my(beta =S[1]/S[2]);
   my(alpha= W*(V+W*beta));
   my(X=nfroots(,alpha^2*x^2+(2*alpha*beta-f*b)*x+(beta^2-c)));
   [alpha,beta,X];
}

However in your example " V=25 c=60 W=3 b=85 f=-1 ",
the conic degenerates to
D^2 = 25*(30*beta+233)^2
so you can pick whatever value you want for beta...
Maybe this is the actual mistery ?

Cheers,
Bill.