Results 1 to 12 of 12

Thread: Solving for a < 100

  1. #1

    Thread Starter
    Registered User
    Join Date
    Feb 2003
    Posts
    57

    Solving for a < 100

    (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

    Attached Images Attached Images  

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well you'd check for which values the square root would give even whole number results.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Fanatic Member bugzpodder's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    787
    well just say any value of a works.
    Massey RuleZ! ^-^__Cheers!__^-^ Massey RuleZ!


    Did you know that...
    The probability that a random rational number has an even denominator is 1/3 (Salamin and Gosper 1972)? This result is independently verified by me (2002)!

  4. #4

    Thread Starter
    Registered User
    Join Date
    Feb 2003
    Posts
    57
    1 < a < 99

    A can be from 2 to 98 - I think.

    How can I prove / reason this?

    s.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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]
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    But 1,98 doesn't sound likea natuaral number!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Sorry
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  9. #9

    Thread Starter
    Registered User
    Join Date
    Feb 2003
    Posts
    57
    OK, I now think 9 < a < 100

    VB Code:
    1. For a = 99 To 1 Step -1
    2.     For b = 11000 To 1 Step -1
    3.     x = ((b + Sqr((b ^ 2) + (4 * a))) / 2)
    4.     If InStr(1, x, ".") = 0 Then List1.AddItem "a: " & a & " b: " & b & " x: " & x
    5.     Next
    6. Next

    How could I explain this or is there a fault in my reasoning?

    s.

  10. #10
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810
    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]
    WRONG, that's not the equation for solving quadratics.

    x = -b +- sqrt(b^2 + 4ac)/2a

    is the Equation for solving quadratics.

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    with polynomals ax^2+bx+c=0 yes, but we have the same roots for all n for nx^2+nbx +nc=0.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  12. #12

    Thread Starter
    Registered User
    Join Date
    Feb 2003
    Posts
    57
    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.
    Yes, that's the quadratic formula, but there are other ways in which you can solve quadratics.

    Anyway, I proved it - don't worry

    Thanks for the help.

    s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width