|
-
May 21st, 2001, 07:02 AM
#1
Thread Starter
Frenzied Member
Signs of X^2 + p*X + q = 0
How can i find wheather the roots of the square equation (X^2 + p*X + q = 0) are positive or negative. (without solving the equation).
-
May 21st, 2001, 09:17 AM
#2
Member
the equation solves always like:
x = -p/2 +- Sqrt((p/2)^2-q)
so just check the expression in the root. If it is negative, you'll have to deal with imaginary numbers or in other words, there are no real solutions to your equation.
WIN 2000 Prof. / WIN 98 / WIN 95, IE6.0, Mathematica 4.0
Visual Studio Enterprise 6.0 sp5
-
May 21st, 2001, 09:23 AM
#3
Frenzied Member
Real or Complex?
If the roots are complex, it is not clear what you mean by positive or negative.
For real roots, it helps to know that q is the product of the roots, and -p is their sum.
If q is negative, one root is positive and one is negative.
If q is positive, both roots have the same sign, which is the opposite of the sign of p.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
May 21st, 2001, 10:15 AM
#4
Member
ok, let's try it again.
you never can say whether a squareroot is positive or negative. it is always both. think about
(-2)^2=2^2
sqareroot just undos the operation of ^2, but because the result of ^2 is always positive then information about the sign is lost. thus you usually have in quadratic equations the following two solutions:
x1 = -p/2 + Sqrt((p/2)^2-q)
x2 = -p/2 - Sqrt((p/2)^2-q)
let's use s= (p/2)^2-q, means the expression in the squareroot
in case of s=0 you will have one solution (x1=x2)
in case of s<0 there are only imaginary results (=no real solutions)
in case of s>0 you will always have two solutions which you have to check for sign
you can also write the quadratic equation as follows:
x^2+px+q=0=(x-x1)*(x-x2)
from this you get
q=x1*x2
-p=x1+x2
deducting further:
if q has a positive sign, both solutions x1 and x2 must have the same sign, else there will be one positive and one negative solution.
in case q is positive (x1 and x2 have the same sign) you can check the sign of them by taking a look at p: if p is positive, both have negative sign, else positive.
(which is somewhat the same as guv wrote, just with the mathematical background)
hope i didn't mix up the signs, i am close to braindead!
... and next time we'll show algebraic La Place transformations in visual basic (just kidding! but i could really use that)
WIN 2000 Prof. / WIN 98 / WIN 95, IE6.0, Mathematica 4.0
Visual Studio Enterprise 6.0 sp5
-
May 21st, 2001, 11:13 AM
#5
Thread Starter
Frenzied Member
OK, thanks for the replies.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|