 HomePage MathVideos MathLessons DeductiveReasoning SymbolicReasoning ScienceApplications Math andMoney All MathApplications How MathHelped Me

# Mathematics And Computer Programming

Here is a comparison of a solution of a quadratic-form equation using substitution as compared to the code in PHP needed to set up a formula for solving a quadratic formula. Notice the similarities.  Clearly the same type of symbolic reasoning used in Algebra is used in computer programming.

 ALGEBRASolve a quadratic form equation using substitution Solve 2x4 + 4x2 + 1 = 0 Let u=x2 Then u2 = x4 Replace x2 with u Replace x4 with u2 Resulting equation is 2u2 + 4u + 1 = 0 Solve for u. u = (-b +/- sqrt(b2 - 4ac)/(2a) u = (-4 + sqrt(42 - 4*2*1))/(2*1) u = (-4 - sqrt(42 - 4*2*1))/(2*1) u=(-4+sqrt(8))/2 u=(-4-sqrt(8))/2 x=+/-sqrt(u) x=sqrt((-4+sqrt(8))/2) x=sqrt((-4-sqrt(8))/2) x=-sqrt((-4+sqrt(8))/2) x=-sqrt((-4-sqrt(8))/2) PHP COMPUTER PROGRAMMINGSolve a quadratic equation with a computer program. "; print "The Coefficients are
"; print "a = ".\$a."
"; print "b = ".\$b."
"; print "c = ".\$c."
"; print "
"; print "The equation is ".\$a."x^2 + (".\$b."x) + (".\$c.")= 0
"; print "The Solutions Are Given Below
"; print "The first solution is " . \$d . "
"; print "The second solution is " . \$f . "
"; \$a = 10; \$b = 200; \$c = 1; \$e = sqrt(\$b*\$b-4*\$a*\$c); \$f = ((-1)*\$b - \$e)/(2*\$a); \$d = ((-1)*\$b + \$e)/(2*\$a); print "
"; print "The Coefficients are
"; print "a = ".\$a."
"; print "b = ".\$b."
"; print "c = ".\$c."
"; print "
"; print "The equation is ".\$a."x^2 + (".\$b."x) + (".\$c.")= 0
"; print "The Solutions Are Given Below
"; print "The first solution is " . \$d . "
"; print "The second solution is " . \$f . "
"; ?>

PHP programming is used to create database-driven ecommerce sites as mentioned here.