
June 17th, 2005, 04:04 AM
#1
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 miniproject 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: {xxER}
Range: {yy>=54322,yER}
Your discriminant is 6953216i^2, therefore, your roots will be complex roots.
Your vertex would be at (1,54322)
The yintercept would be: 54354
Your roots would be x=64+sqrt(6953216)i/64 and x=64sqrt(6953216)i/64
You can enter your information in different forms, ax^2+bx+c=0, a(xh)^2+k=0, or a(xh)(xj)+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:
http://www.unerror.com/~enmand/php/quadratic.php
Along with the souces at:
http://www.unerror.com/~enmand/php/quadratic.phps
http://www.unerror.com/~enmand/php/quadratic2.phps
http://www.unerror.com/~enmand/php/quadratic3.phps
http://www.unerror.com/~enmand/php/quadratic4.phps
Let me know if you find any bugs... any suggestions on a next project?

June 17th, 2005, 05:30 AM
#2
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 avalue is positive/negative, this graph has a minimum/maximum
Domain: {xxER}
Range: {yy>=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

Forum Rules

