new file: Files/flashplayer_32_sa.exe new file: favicon.ico new file: globe.gif new file: imgs/download.png new file: imgs/zuck.jpg new file: index.html new file: other.ico new file: script.js new file: site.webmanifest new file: sitemap.html new file: styles/backround.css new file: styles/border.css new file: styles/fonts/Titillium_Web/OFL.txt new file: styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf new file: styles/fonts/webfontkit-20221027-163353/generator_config.txt new file: styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2 new file: styles/fonts/webfontkit-20221027-165950/generator_config.txt new file: styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2 new file: styles/style.css new file: tools/2048/.gitignore new file: tools/2048/.jshintrc new file: tools/2048/CONTRIBUTING.md new file: tools/2048/LICENSE.txt new file: tools/2048/README.md new file: tools/2048/Rakefile new file: tools/2048/favicon.ico new file: tools/2048/index.html new file: tools/2048/js/animframe_polyfill.js new file: tools/2048/js/application.js new file: tools/2048/js/bind_polyfill.js new file: tools/2048/js/classlist_polyfill.js new file: tools/2048/js/game_manager.js new file: tools/2048/js/grid.js new file: tools/2048/js/html_actuator.js new file: tools/2048/js/keyboard_input_manager.js new file: tools/2048/js/local_storage_manager.js new file: tools/2048/js/tile.js new file: tools/2048/meta/apple-touch-icon.png new file: tools/webretro/cores/neocd_libretro.js new file: tools/webretro/cores/neocd_libretro.wasm new file: tools/webretro/cores/nestopia_libretro.js new file: tools/webretro/cores/nestopia_libretro.wasm new file: tools/webretro/cores/o2em_libretro.js new file: tools/webretro/cores/o2em_libretro.wasm new file: tools/webretro/cores/opera_libretro.js new file: tools/webretro/cores/opera_libretro.wasm
253 lines
9.2 KiB
HTML
253 lines
9.2 KiB
HTML
<!doctype html>
|
|
<html lang="en"><!-- #BeginTemplate "/Templates/Main.dwt" --><!-- DW6 -->
|
|
|
|
<!-- Mirrored from www.mathsisfun.com/quadratic-equation-solver-old.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:37:02 GMT -->
|
|
<head>
|
|
<!-- #BeginEditable "doctitle" -->
|
|
<title>Quadratic Equation Solver</title>
|
|
<script language="JavaScript" type="text/javascript">
|
|
<!-- Begin
|
|
function calculate() {
|
|
a = parseFloat(document.calculator.a.value);
|
|
b = parseFloat(document.calculator.b.value);
|
|
c = parseFloat(document.calculator.c.value);
|
|
if (a == 0) {
|
|
note = "Not a quadratic equation. 'a' shouldn't be zero.";
|
|
ans1 = "NA";
|
|
ans2 = "NA";
|
|
} else {
|
|
disc = b * b - 4 * a * c;
|
|
if (disc < 0) {
|
|
real = -b / (2 * a);
|
|
imag = Math.sqrt(-disc) / (2 * a);
|
|
note = "It has Complex Roots !";
|
|
ans1 = real + " + " + Math.abs(imag) + "i";
|
|
ans2 = real + " - " + Math.abs(imag) + "i";
|
|
} else if (disc == 0) {
|
|
note = "Only one answer !";
|
|
ans1 = -b / (2 * a);
|
|
ans2 = "NA";
|
|
} else {
|
|
note = "";
|
|
ans1 = (-b + Math.sqrt(disc)) / (2 * a);
|
|
ans2 = (-b - Math.sqrt(disc)) / (2 * a);
|
|
}
|
|
}
|
|
formula = "";
|
|
formula += NeatAdd(formula, a, "x²");
|
|
formula += NeatAdd(formula, b, "x");
|
|
formula += NeatAdd(formula, c, "");
|
|
document.calculator.equn.value = formula + " = 0";
|
|
document.calculator.disc.value = disc;
|
|
document.calculator.ans1.value = ans1;
|
|
document.calculator.ans2.value = ans2;
|
|
document.calculator.note.value = note;
|
|
}
|
|
|
|
function NeatAdd(formula, x, varname) {
|
|
s = "";
|
|
if (formula.length == 0) {
|
|
plus = "";
|
|
} else {
|
|
plus = " + ";
|
|
}
|
|
minus = " - ";
|
|
if (x == 1) {
|
|
if (varname.length == 0) {
|
|
s = s + plus + "1";
|
|
} else {
|
|
s = s + plus + varname;
|
|
}
|
|
} else if (x == -1) {
|
|
if (varname.length == 0) {
|
|
s = s + minus + "1";
|
|
} else {
|
|
s = s + minus + varname;
|
|
}
|
|
} else if (x == 0) {} else if (x > 0) {
|
|
s = s + plus + x + varname;
|
|
} else {
|
|
s = s + minus + Math.abs(x) + varname;
|
|
}
|
|
return s;
|
|
}
|
|
// End -->
|
|
</script>
|
|
<!-- #EndEditable -->
|
|
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
|
<meta name="HandheldFriendly" content="true">
|
|
<meta http-equiv="pics-label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://www.mathsisfun.com" r (SS~~000 1))'>
|
|
<link rel="stylesheet" type="text/css" href="style3.css" />
|
|
<script src="main3.js" type="text/javascript"></script>
|
|
</head>
|
|
|
|
<body id="bodybg">
|
|
<div class="bg">
|
|
<div id="stt"></div>
|
|
<div id="hdr"></div>
|
|
<div id="logo"><a href="index.html"><img src="images/style/logo.svg" alt="Math is Fun" /></a></div>
|
|
<div id="gtran"><script type="text/javascript">document.write(getTrans());</script></div>
|
|
<div id="gplus"><script type="text/javascript">document.write(getGPlus());</script></div>
|
|
<div id="adTopOuter" class="centerfull noprint">
|
|
<div id="adTop">
|
|
<script type="text/javascript">document.write(getAdTop());</script>
|
|
</div>
|
|
</div>
|
|
<div id="adHide">
|
|
<div id="showAds1"><a href="javascript:showAds()">Show Ads</a></div>
|
|
<div id="hideAds1"><a href="javascript:hideAds()">Hide Ads</a><br>
|
|
<a href="about-ads.html">About Ads</a></div>
|
|
</div>
|
|
<div id="menuWide" class="menu">
|
|
<script type="text/javascript">document.write(getMenu(0));</script>
|
|
</div>
|
|
<div id="linkto">
|
|
<div id="linktort"><script type="text/javascript">document.write(getLinks());</script></div>
|
|
</div>
|
|
<div id="search" role="search"><script type="text/javascript">document.write(getSearch());</script></div>
|
|
<div id="menuSlim" class="menu">
|
|
<script type="text/javascript">document.write(getMenu(1));</script>
|
|
</div>
|
|
<div id="menuTiny" class="menu">
|
|
<script type="text/javascript">document.write(getMenu(2));</script>
|
|
</div>
|
|
<div id="extra"></div>
|
|
</div>
|
|
<div id="content" role="main"><!-- #BeginEditable "Body" -->
|
|
<h1 align="center">Quadratic Equation Solver</h1>
|
|
<table border="0" align="center" cellpadding="3" width="570">
|
|
<tr>
|
|
<td>
|
|
<p><i>If you have an equation of the form "<b>ax<sup>2</sup> + bx + c = 0</b>", we can solve it for you. </i><i>Just enter the
|
|
factors a, b and c below, and press "Get Results"</i></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<form name="calculator" id="calculator">
|
|
<div class="simple">
|
|
<table align="center" cellspacing="5">
|
|
<tr>
|
|
<td align="center" bgcolor="#FFFFFF" colspan="4"><img src="algebra/images/quadratic-equation.svg" alt="Quadratic Equation" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="large"> <font color="2222bb">a</font></td>
|
|
<td class="large"> <font color="bb0000">b</font></td>
|
|
<td class="large"> <font color="aa00aa">c</font></td>
|
|
<td class="large"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="large">
|
|
<input type="text" name="a" size="6" value="1" /> <b>x<sup>2</sup></b> + </td>
|
|
<td class="large">
|
|
<input type="text" name="b" size="6" value="0" /> <b>x</b> + </td>
|
|
<td class="large">
|
|
<input type="text" name="c" size="6" value="0" /> </td>
|
|
<td class="large"><b>= 0</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" align="center">
|
|
<input type="button" value="Get Results" onClick="calculate();" name="button" /> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
<div class="simple">
|
|
<table align="center">
|
|
<tr>
|
|
<td>
|
|
<div align="right">Your Equation:</div>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="equn" size="50" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div align="right">Solution 1:</div>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="ans1" size="50" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div align="right">Solution 2:</div>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="ans2" size="50" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div align="right">Discriminant<b></b>:</div>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="disc" size="50" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div align="right">Note<b></b>:</div>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="note" size="50" /> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
<h2><br />
|
|
Is it Quadratic?</h2>
|
|
<p>Only if it can be put in the form <i><b>ax<sup>2</sup> + bx + c = 0</b></i>, and <i><b>a</b></i> is <i>not zero</i>.</p>
|
|
<p>The name comes from "quad" meaning square, So, the biggest clue is that highest power must be a square (in other words <i><b>x<sup>2</sup></b></i>). </p>
|
|
<p>These are all quadratic equations in disguise:</p>
|
|
<div class="beach">
|
|
<table width="500" border="0" align="center">
|
|
<tr>
|
|
<th width="176">In disguise</th>
|
|
<th width="158">In standard form</th>
|
|
<th width="152">a, b and c</th>
|
|
</tr>
|
|
<tr>
|
|
<td width="176"><b>x<sup>2</sup> = 3x -1</b></td>
|
|
<td width="158"><b>x<sup>2</sup> - 3x + 1 = 0</b></td>
|
|
<td width="152">a=1, b=-3, c=1</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="176"><b>2(x<sup>2</sup> - 2x) = 5</b></td>
|
|
<td width="158"><b>2x<sup>2</sup> - 4x - 5 = 0</b></td>
|
|
<td width="152">a=2, b=-4, c=-5</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="176"><b>x(x-1) = 3</b></td>
|
|
<td width="158"><b>x<sup>2</sup> - x - 3 = 0</b></td>
|
|
<td width="152">a=1, b=-1, c=-3</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="176"><b>5 + 1/x - 1/x<sup>2</sup> = 0</b></td>
|
|
<td width="158"><b>5x<sup>2</sup> + x - 1 = 0</b></td>
|
|
<td width="152">a=5, b=1, c=-1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<h2>How does this work?</h2>
|
|
<p>The solution(s) to a quadratic equation can be calculated using the <b>Quadratic Formula</b>:</p>
|
|
<div align="center"><img src="algebra/images/quadratic-formula.svg" alt="x = [ -b plus minus square root of (b^2-4ac) ] / 2a" /></div>
|
|
<p>The "±" means you need to do a plus AND a minus, so there are normally TWO solutions !</p>
|
|
<p>The blue part (<b>b<sup>2</sup> - 4ac</b>) is called the "discriminant", because it can "discriminate" between the possible types of answer. If it is positive, you will get two normal solutions, if it is zero you get just ONE solution, and if it is negative you get <i>imaginary</i> solutions.</p>
|
|
<div class="related"> <a href="algebra/quadratic-equation.html">Quadratic Equations</a> <a href="algebra/index.html">Algebra Index</a> </div>
|
|
<!-- #EndEditable --></div>
|
|
<div id="adend" class="centerfull noprint">
|
|
<script type="text/javascript">document.write(getAdEnd());</script>
|
|
</div>
|
|
<div id="footer" class="centerfull noprint">
|
|
<script type="text/javascript">document.write(getFooter());</script>
|
|
</div>
|
|
<div id="copyrt">
|
|
Copyright © 2017 MathsIsFun.com
|
|
</div>
|
|
|
|
<script type="text/javascript">document.write(getBodyEnd());</script>
|
|
</body>
|
|
<!-- #EndTemplate -->
|
|
<!-- Mirrored from www.mathsisfun.com/quadratic-equation-solver-old.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:37:02 GMT -->
|
|
</html>
|