Explore calculusLesson 30 of 48 · 8 min
Keep the remainder in a series
Interpret a Taylor polynomial as a local approximation with an order term.
Maths refresher: Local approximation and big O
A Taylor polynomial matches a function’s derivatives at a chosen point. O(x⁷) describes remainder scaling near zero, not an exact equality everywhere.
At small , the first omitted powers can be small. Farther from zero, the same polynomial may be much less accurate.
A Taylor expansion approximates a sufficiently smooth function near a chosen point using powers of the displacement from that point. The expansion point and retained order are part of the statement, not optional annotations.
SymPy series includes an Order term describing asymptotic remainder behaviour. removeO extracts a polynomial when you need to evaluate or plot it, but removing the notation does not eliminate the mathematical approximation error.
The sine example expands around zero through powers below seven. Compare its errors at a nearby and a farther input. A small error at one point is a useful check, not a global error bound. Keep the original function available when using a truncated approximation in a model.
Does removeO make a Taylor polynomial exact for every x?
Write a prediction (optional)
Exact symbolic investigation
Select Run Python with the code unchanged.
Your saved draft is open. To use the published code, select Restore example in Tools. Use Recover draft to bring back your code.
Tools
About Python
Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗
Ctrl+Enter or ⌘+Enter runs Python.
Execution error
Technical error details
Your result
Python text output
Compare with the worked example
Executed from the published Python during the site build. Your own run appears above. Build environment ↗
Worked text output
Series: x - x**3/6 + x**5/120 + O(x**7) Polynomial only: x**5/120 - x**3/6 + x Error at center + 1/10: -1.983851436E-11 Error at center + 2: -0.02403590651
Read the starter result
For the starter, the absolute error is larger at the point two units from the centre. This comparison illustrates locality rather than proving a universal monotonic error law.
Edit and compare
Replace function = sp.sin(x) with function = sp.exp(x) and center = 0 with center = 1. Select Run Python. Find the powers of x−1 and the order term in Series. Compare that result with Polynomial only before using it as an approximation.
Scope. An asymptotic order term is not by itself a numerical error bound throughout an arbitrary interval.
Try a fresh case
Which details belong beside a truncated series used in a calculation?
Need a hint?
Hint 1
Ask where the polynomial was constructed.
Hint 2
Track what was omitted and where its error is acceptable.