P(x)

Q(x)

P+Q

P-Q

P+Q

P-Q

n = 1 (slider from -1 to 1, step 2)
b_0 = 1 (slider from -5 to 5, step 0.5)
a_0 = -1 (slider from -5 to 5, step 0.5)
a_3 = 0 (slider from -5 to 5, step 0.5)
a_2 = -1 (slider from -5 to 5, step 0.5)
a_1 = 1 (slider from -5 to 5, step 0.5)
b_3 = -1 (slider from -5 to 5, step 0.5)
b_2 = 0 (slider from -5 to 5, step 0.5)
b_1 = 3 (slider from -5 to 5, step 0.5)
P(x) = (a_3 * x^(3)) + (a_2 * x^(2)) + (a_1 * x) + a_0
Q(x) = (b_3 * x^(3)) + (b_2 * x^(2)) + (b_1 * x) + b_0
c_3: a_3 + (b_3 * n)
c_2: a_2 + (b_2 * n)
c_1: a_1 + (b_1 * n)
c_0: a_0 + (b_0 * n)
S(x) = (c_3 * x^(3)) + (c_2 * x^(2)) + (c_1 * x) + c_0
texto3: "S(x) =  " + S + ""
texto1: "P(x) = " + P + ""
texto2: "Q(x) = " + Q + ""
a = 1 (slider from -8 to 8, step 0.1)
A: (a, 0)
b = OrthogonalLine(A, xAxis)
AQ = Intersect(Q, b, 1)
AP = Intersect(P, b, 1)
AS = Intersect(S, b, 1)
c = Segment(A, AQ)
d = Segment(A, AS)
e = Segment(A, AP)
pp: P(a)
pq: y(AQ)
ps: y(AS)
texto6: "P(" + a + ")=" + pp + ""
texto7: "Q(" + a + ")=" + pq + ""
texto8: "S(" + a + ")=" + ps + ""
R(x) = (-Q(x))
texto9b: "(" + P + ") + (" + Q + ") =
=  " + S + ""
texto9c: "( " + P + " ) - ( " + Q + " ) =
=  " + S + ""
texto9e: "( " + pp + " ) - ( " + pq + " ) = " + ps + ""
texto9d: "( " + pp + " ) + ( " + pq + " ) = " + ps + ""
AQ2 = Intersect(R, b, 1)
f = Segment(A, AQ2)