Numerical Integration (Trapezoid, Simpson's, Maclaurin)
Loading the math board and drawing, please wait…
This example demonstrates numerical integration using the trapezoidal method, Simpson's method, and Maclaurin series, showing the errors of different methods. It covers core concepts in calculus such as integration and error analysis. Using GeoGebra commands like Point, TrapezoidalSum, and Integral, the construction process of these methods can be visually understood. Suitable for university mathematics and engineering courses.
GeoGebra Commands & Parameters
Point(xAxis) → BPoint(xAxis) → ALowerSum(f_1, a, b, n) → cLowerSum(g, a, b, n) → dSegment(A, (a, f_1(a))) → LASegment(B, (b, f_1(b))) → LBSequence(f_1(a + ((i - 1 + p) * (b - a) / n)), i, 1, n) → LIntegral(f_1, a, b) → actualareaTrapezoidalSum(f_1, a, b, n) → trapezoidsumSequence(a + (i * Δx), i, 0, n) → XSequence(Determinant[{{Element[X, (2 * i) - 1]^(2), Element[X, (2 * i) - 1], 1}, {Element[X, (2 * i)]^(2), Element[X, (2 * i)], 1}, {Element[X, (2 * i) + 1]^(2), Element[X, (2 * i) + 1], 1}}], i, 1, n / 2, 1) → SSequence(Determinant[{{Element[X, (2 * i) - 1], f_1(Element[X, (2 * i) - 1]), 1}, {Element[X, (2 * i)], f_1(Element[X, (2 * i)]), 1}, {Element[X, (2 * i) + 1], f_1(Element[X, (2 * i) + 1]), 1}}], i, 1, n / 2, 1) → PSequence(Determinant[{{Element[X, (2 * i) - 1]^(2), f_1(Element[X, (2 * i) - 1]), 1}, {Element[X, (2 * i)]^(2), f_1(Element[X, (2 * i)]), 1}, {Element[X, (2 * i) + 1]^(2), f_1(Element[X, (2 * i) + 1]), 1}}], i, 1, n / 2, 1) → QSequence(Determinant[{{Element[X, (2 * i) - 1]^(2), Element[X, (2 * i) - 1], f_1(Element[X, (2 * i) - 1])}, {Element[X, (2 * i)]^(2), Element[X, (2 * i)], f_1(Element[X, (2 * i)])}, {Element[X, (2 * i) + 1]^(2), Element[X, (2 * i) + 1], f_1(Element[X, (2 * i) + 1])}}], i, 1, n / 2, 1) → RSequence(If[Element[X, (2 * i) - 1] ≤ x ≤ Element[X, (2 * i) + 1], (-1 / Element[S, i] * ((Element[P, i] * x^(2)) - (Element[Q, i] * x) - Element[R, i]))], i, 1, n / 2) → simpSequence(Integral[Element[simp, i], Element[X, (2 * i) - 1], Element[X, (2 * i) + 1]], i, 1, n / 2) → simpsonpiecesIf(Mod[n, 2] ≟ 0, Sum[simpsonpieces], "undefined") → simpareaIntegral(Element[simp, 1], Element[X, 1], Element[X, 3]) → simpsonpiece1Integral(Element[simp, 2], Element[X, 3], Element[X, 5]) → simpsonpiece2Integral(Element[simp, 3], Element[X, 5], Element[X, 7]) → simpsonpiece3Integral(Element[simp, 4], Element[X, 7], Element[X, 9]) → simpsonpiece4Integral(Element[simp, 5], Element[X, 9], Element[X, 11]) → simpsonpiece5Integral(Element[simp, 6], Element[X, 11], Element[X, 13]) → simpsonpiece6Integral(Element[simp, 7], Element[X, 13], Element[X, 15]) → simpsonpiece7Integral(Element[simp, 8], Element[X, 15], Element[X, 17]) → simpsonpiece8Integral(Element[simp, 9], Element[X, 17], Element[X, 19]) → simpsonpiece9Integral(Element[simp, 10], Element[X, 19], Element[X, 21]) → simpsonpiece10Textfield(f_1) → inputBox1TaylorSeries(f_1, 0, order) → hIntegral(h, x(A), x(B)) → f
AI Drawing Prompt Reference
Draw the graph of a function f(x) and perform numerical integration using the trapezoidal method, Simpson's method, and Maclaurin series. First, create two points A and B on the x-axis, then use the trapezoidal method and Simpson's method to calculate the integral of f(x) between A and B, and display the actual area, trapezoidal area, and Simpson's area. Finally, use the Maclaurin series to calculate the Taylor series of f(x) at x=0, and compute the integral of this series between A and B.
The prompt above was compiled from the original drawing commands and is for reference only.