Show Function

Show Roots

Show Positive

Show Negative

Show Solution

\fgcolor{009999}{ f( } \fgcolor{990099}{ x } \fgcolor{009999}{ ) } \,=\, \fgcolor{ff0000}{a} \fgcolor{990099}{ x }²  \,+\,  \fgcolor{0000bb}{b}  \fgcolor{990099}{ x } \,+\, \fgcolor{999900}{c}

discriminant \,=\, \fgcolor{0000bb}{x}^2  \,-\, 4  \, \fgcolor{ff0000}{a} \, \fgcolor{009999}{c}

Solution

a = 1 (slider from -10 to 10, step 0.5)
b = 2 (slider from -10 to 10, step 1)
c = -3 (slider from -20 to 20, step 1)
f(x) = a * x^(2.0) + b * x + c
d: b^(2.0) - 4.0 * a * c
Root1: (-(b) + sqrt(d)) / (2.0 * a)
Root2: (-(b) - sqrt(d)) / (2.0 * a)
X_2 = If(Root1 < Root2, (Root1, 0.0), (Root2, 0.0))
X_1 = If(Root1 < Root2, (Root2, 0.0), (Root1, 0.0))
sgn4ac = If(4.0 * a * c < 0.0, "+", "-")
bsqr: b^(2.0)
abs4ac: abs(4.0 * a * c)
showFunction = true
showRoots = true
showPos = false
showNeg = false
showSolution = false
inner = If(Root1 ≠ Root2, Segment[(x(X_1), 0.0), (x(X_2), 0.0)])
shadeInner = Integral(f(x), x(X_2), x(X_1))
outerLeft = Vector(If[Defined[Root2], (x(X_2), 0.0), (x(Corner[2.0]), 0.0)], (x(Corner[1.0]), 0.0))
shadeLeft = Integral(f(x), x(Corner[1.0]), If[Defined[Root2], x(X_2), x(Corner[2.0])])
outerRight = Vector((x(X_1), 0.0), (x(Corner[2.0]), 0.0))
shadeRight = Integral(f(x), x(X_1), x(Corner[2.0]))
bShow: If[b > 0.0, "+" + b + "x", If[b < 0.0, b + "x", ""]] + ""
cShow: If[c > 0.0, "+" + c, If[c < 0.0, "" + c, ""]] + ""
aCoef: If[a ≠ 0.0, " \fgcolor{ff0000}{" + (If[abs(a) ≠ 1.0, Text[a], If[a ≟ 1.0, "", "-"]]) + "} \fgcolor{990099}{ x }^2 ", ""] + ""
bCoef: If[b ≠ 0.0, "\fgcolor{0000bb}{" + (If[b > 0.0, "+", "-"]) + (Text[abs(b)]) + " } \fgcolor{990099}{x}", ""] + ""
cCoef: If[c ≠ 0.0, "\fgcolor{999900}{" + (If[c > 0.0, "+", "-"]) + (Text[abs(c)]) + " }", ""] + ""
ftxt: aCoef + bCoef + cCoef + ""
text2: "\fgcolor{009999}{ f( } \fgcolor{990099}{ x } \fgcolor{009999}{ ) } \,=\, " + ftxt + ""
text4 = If(d > 0.0, "2 \,\, solutions", If[d < 0.0, "no \,\, solutions", "1 \,\,  solution"])
text5: "The\,\,equation\:\:" + ftxt + " \,=\, 0\,\, has" + "\:" + text4 + "."
ineq1 = If(a > 0.0, "≤", "≥")
ineq2 = If(a < 0.0, "≤", "≥")
text6: "The solutions are:    x_1 = " + (x(X_1)) + " and   x_2 = " + (x(X_2)) + "."
w: x(Corner[1.0]) + 0.6 * x(Corner[2.0] - Corner[1.0])
B: (w, y(Corner[2.0]))
C: (x(Corner[2.0]), y(Corner[2.0]))
D: (x(Corner[2.0]), y(Corner[3.0]))
A: (w, y(Corner[3.0]))
poly1, a_1, b_1, c_1, d_1 = Polygon(A, B, C, D)
text9: ftxt + ineq2 + "0 \,\,in\,\, (-∞,∞)" + ""
text7: ftxt + ineq1 + "0 \,\,in\,\, [" + (x(X_2)) + "," + (x(X_1)) + "]"
text8: ftxt + ineq2 + "0 \,\,in\,\, (-∞," + (x(X_2)) + "] \,\,,\,\,[" + (x(X_1)) + ",∞)"