Bill Allombert on Sat, 25 Jan 2025 12:26:25 +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/ɢᴘ ?


On Sat, Jan 25, 2025 at 11:34:34AM +0100, Laël Cellier wrote:
> Oui,
> 
> Though I’d like to find other nfroots values given such initial inputs…

You can use the function I provided.

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];
}

Then one get

[alpha, beta,X] = fun(V,W,b,c,f);

? alpha
%12 = -4180572546532158292278454142928666898146832680251024517983166235549996866457463625641813260586575779196664910573656996328431370516487393422559951029010876416586647166710244772350178099099618887593929936011318605706333374790648799565747747747561947250858017026766816415725437778202649010183207102576212750748135057263603141004437390038337911000152260109200201058346971040459320496802802301131571820036166693387212506103166741562118958988034328700974427922415964682112189387592813583381733167516458481948652743252684612101923172981549774492120807150063338763749210936339908775337732314066796727025818787181846214184221923610775161865542769994173571543693201424049580560482622721565114959862604847790194010517550442220655090091817011313539885397132610770833607380656525772796225889856348233175585529525872015832633185556927483750069081231848276531038569943395243141588370577330303878534658346065270579066123937284487619885028558513613850687309241680694943195370410619768514844951355759869316467650570612713838336564935958755899222980761665982884365037955185720294076412106450194271889/25
? beta
%13 = -672225628067123147116558149881995710798276995011447987050592328976012714865450985916447995662328919412047497279423045117446686729257128275949500746711043539189609725096112283848011986679159419553919508258509140939280500687680096737399531725624206572451821801127194059612210107252008495654751179194156314087179604128231565028033956354284599827623105506753176633926911713425185713779171315276262107447531504708473972729375105320057836498161030991644012650913993856801096153646999371792888290083986221329352989125748813940274976373895395812973914959320432965507828213792019827258803534256546308413647072827145489240887133613964672582561783150543532894610277494904922885667981168421365684201818690509788680019717332275925513478852164737660971344539051206444984192470274604219167707476386543960680385929829179479402230347862231026387872217799903692210388580045747193829740200677896152713759174914475170921132879055170900968153557141/621900203143507540299291235115041475720508671983046645926801396672339663042813373324041813111683010979449390037318880936304666091135011937935140396872157900

Though beta is not an integer, one can find other solutions using qfparam.

Cheers,
Bill.