(See Attached Image)
If a and b, and x are natural numbers, find the possible values of a if a < 100
How would I solve this? Please help :)
http://www.vbforums.com/attachment.p...postid=1364367
Printable View
(See Attached Image)
If a and b, and x are natural numbers, find the possible values of a if a < 100
How would I solve this? Please help :)
http://www.vbforums.com/attachment.p...postid=1364367
Well you'd check for which values the square root would give even whole number results.
well just say any value of a works.
1 < a < 99
A can be from 2 to 98 - I think.
How can I prove / reason this?
s.
thats the formula to solve quadratic polynominals
x^2+bx-a=0
so in other words
a=x^2+bx
put for instance x=1 and for any b in [1,98] you get a in [2,99]
But 1,98 doesn't sound likea natuaral number!
we use commas as decimal delimiter here in Finland, but in math i think its better to stay to . because , is used in other contexts, like [a,b] which means from and including a to and including b
Sorry
OK, I now think 9 < a < 100
VB Code:
For a = 99 To 1 Step -1 For b = 11000 To 1 Step -1 x = ((b + Sqr((b ^ 2) + (4 * a))) / 2) If InStr(1, x, ".") = 0 Then List1.AddItem "a: " & a & " b: " & b & " x: " & x Next Next
How could I explain this or is there a fault in my reasoning?
s.
WRONG, that's not the equation for solving quadratics.Quote:
Originally posted by kedaman
thats the formula to solve quadratic polynominals
x^2+bx-a=0
so in other words
a=x^2+bx
put for instance x=1 and for any b in [1,98] you get a in [2,99]
x = -b +- sqrt(b^2 + 4ac)/2a
is the Equation for solving quadratics.
with polynomals ax^2+bx+c=0 yes, but we have the same roots for all n for nx^2+nbx +nc=0.
Yes, that's the quadratic formula, but there are other ways in which you can solve quadratics.Quote:
Originally posted by prog_tom
WRONG, that's not the equation for solving quadratics.
x = -b +- sqrt(b^2 + 4ac)/2a
is the Equation for solving quadratics.
Anyway, I proved it - don't worry :p
Thanks for the help.
s.