Results 1 to 2 of 2
  1. #1
    Developer Extraordinar
    Join Date
    Jul 2002

    My first day of summer project.

    So... today was my first day of summer vacation, as I had my last exam Wednesday afternoon.

    So, last evening, there I was, sitting there, realizing I didn't have any homework to do, and no one to do anything with (some of my friends still had exams they were studying for), so I decided I'd start a mini-project to get up to speed on my PHP, before I started a summer PHP project for Unerror.

    So, I decided (for some reason) that I would code a quadratic calculator (originally that would just give the roots of the equation, now it does much more). For example:

    Your a value: 32
    Your b value: 64
    Your c value: 54354
    General form: 32x^2+64x+54354
    This graph has a minimum
    Domain: {x|xER}
    Range: {y|y>=54322,yER}
    Your discriminant is 6953216i^2, therefore, your roots will be complex roots.
    Your vertex would be at (-1,54322)
    The y-intercept would be: 54354
    Your roots would be x=-64+sqrt(6953216)i/64 and x=-64-sqrt(6953216)i/64
    You can enter your information in different forms, ax^2+bx+c=0, a(x-h)^2+k=0, or a(x-h)(x-j)+k=0.

    The graphing is done by JpGraph (which is a very nice product), but may have some bugs with very large, or very small numbers.

    You can find the calculator at:

    Along with the souces at:

    Let me know if you find any bugs... any suggestions on a next project?
    Come to UnError.com

  2. #2
    Join Date
    Aug 2001
    Nice nice

    You could add some more explanation, maybe...

    Something like this, based on your example:

    Your a value: 32

    Your b value: 64

    Your c value: 54354

    General form: 32x^2+64x+54354

    Because the a-value is positive/negative, this graph has a minimum/maximum

    Domain: {x|xER}

    Range: {y|y>=54322,yER}

    The discriminant is b^2 - 4ac = 64^2 - 4*32*54354 = -6953216, therefore the quadratic equation has no real solutions (and then show the complex roots solutions) (and if the discriminant is positive, show the formula's and calculations for both solutions, and if the discriminant is negative, show the formula and calculation for the one solution)

    And so on... I wanna see formula's!

    Oh, and for the graph in your example, you might want to indicate that it's not a "real" graph (since it's supposed to be with imaginary numbers and stuff)...

Posting Permissions

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