ALGEBRA Solve 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 PROGRAMMING Solve a quadratic
equation with a computer program.
<?php
$a = 1;
$b = 2;
$c = 1;
$e = sqrt($b*$b-4*$a*$c);
$f = ((-1)*$b - $e)/(2*$a);
$d = ((-1)*$b + $e)/(2*$a);
print "<br>";
print "The Coefficients are<br>";
print "a = ".$a."<br>";
print "b = ".$b."<br>";
print "c = ".$c."<br>";
print "<br>";
print "The equation is ".$a."x^2 + (".$b."x) + (".$c.")= 0<br>";
print "The Solutions Are Given Below<br>";
print "The first solution is " . $d . "<br>";
print "The second solution is " . $f . "<br>";
$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 "<br>";
print "The Coefficients are<br>";
print "a = ".$a."<br>";
print "b = ".$b."<br>";
print "c = ".$c."<br>";
print "<br>";
print "The equation is ".$a."x^2 + (".$b."x) + (".$c.")= 0<br>";
print "The Solutions Are Given Below<br>";
print "The first solution is " . $d . "<br>";
print "The second solution is " . $f . "<br>";
?> |