曲線下的面積(3)
Author: 藍邦偉  老師

曲線下的面積(3)

$ R_1 $

R_2

x=g(y)

1

$ 控制點 $

u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
O = (0, 0)
Q_2: 0.8 * Corner[1] + 0.2 * Corner[2]
Q_3: (x(Q_2), y(Corner[4]))
poly1, q_1, q_2, q_4, q_3 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
A_1 = (-3.4052775372132467, 0.7292888954887102)
A_2 = (0.7390083326604628, -0.6075775141479696)
A_3 = (2.9925831374765814, 1.3022316424758587)
A_4 = (4.195762906149594, -1.1614221695688798)
f_1 = Polynomial({A_1, A_2, A_3, A_4})
a = Mirror(f_1, L)
A, B, C = Intersect(f_1, xAxis)
P: (y(A), x(A))
Q: (y(B), x(B))
R: (y(C), x(C))
I_1 = Integral(f_1, x(A), x(B))
I_2 = Integral(f_1, x(B), x(C))
text2: "$R_1=\int_{" + (LaTeX[y(P)]) + "}^{" + (LaTeX[y(Q)]) + "}{ g(y)dy}$
       $=" + (LaTeX[I_1]) + "$"
text5: "$R_2=\int_{" + (LaTeX[y(Q)]) + "}^{" + (LaTeX[y(R)]) + "}{g(y)dy }$
       $=" + (LaTeX[I_2]) + "$"
text6: "$R=|R_1|+|R_2|$
   $=" + (LaTeX[abs(I_1)]) + "+" + (LaTeX[abs(I_2)]) + "$
   $=" + (LaTeX[abs(I_1) + abs(I_2)]) + "$"
n = 5 (slider from 5 to 150, step 1)
list_1 = Sequence(Segment[(0, x(A) + t * (x(B) - x(A)) / n), (f_1(x(A) + t * (x(B) - x(A)) / n), x(A) + t * (x(B) - x(A)) / n)], t, 1, n, 1)
list_2 = Sequence(Segment[(0, x(B) + t * (x(C) - x(B)) / n), (f_1(x(B) + t * (x(C) - x(B)) / n), x(B) + t * (x(C) - x(B)) / n)], t, 1, n, 1)
b = false