Print

Print


----- Original Message ----- 
From: "Volker Loose" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, November 20, 2003 4:53 PM
Subject: selecting one of two solutions of a quadratic equation


> Hello Derivers,
>
> is it possible to select one of two solutions of a
> quadratic equation?
> Example: With L:=solve(x^2-4x-12=0,x) I get
> L=(x=6 v x= - 2).
> With sub 1 I get the first element of a vector. I'm
> looking for something like that in this context.
>
>
> Meanwhile I found out LHS and RHS does what I
> want: LHS(L)=(x=6).


With

RHS(LHS(SOLVE(x^2 - 4·x - 12 = 0, x)))

you get directly the first solution: 6

And with

RHS(RHS(SOLVE(x^2 - 4·x - 12 = 0, x)))

the second one: -2


Saludos,

Ignacio Larrosa Caņestro
A Coruņa (Espaņa)
[log in to unmask]