of (2 - x)/[(1 + x)(1 - 2x)] up to and including the term in x^3.
-
Write out the binomial expansion for 1/(1 + x) AND 1 / (1 - 2x)
1/(1 - x) = 1 + x + x² + x³ + ...
So:
1/(1 + x) = 1 / (1 - (-x)) = 1 - x + x² - x³ + ...
and
1/(1 - (2x)) = 1 + (2x) + (2x)² + (2x)³ + ...
--> multiply out
1 + 2x + 4x² + 8x³ + ...
So now it's a matter of multiplying out the three polynomials:
(2 - x) * (1 - x + x² - x³) * (1 + 2x + 4x² + 8x³)
Notice that it's NOT necessary to write any more terms because the next terms would be x⁴ and thus DON'T contribute if we are ONLY writing up to x³, furthermore when multiplying this out we DON'T need to keep any terms ABOVE x³:
(2 - x) * (1 - x + x² - x³)
-->
(2 - 2x + 2x² - 2x³) + (-x + x² - x³ + x⁴)
--> but we DON'T even need to write down the x⁴ term, so let's drop it to save us some trouble
--> collect like terms
2 - 3x + 3x² - 3x³ + O(x⁴)
--> now multiply by the next one
(2 - 3x + 3x² - 3x³) * (1 + 2x + 4x² + 8x³)
-->
(2 + 4x + 8x² + 16x³) + (-3x - 6x² - 12x³ + O(x⁴)) + (3x² + 6x³ + O(x⁴)) + (-3x³ + O(x⁴))
(notice that I stopped once I started generating values that involved x⁴
--> collect like terms:
2 + (4x - 3x) + (8x² - 6x² + 3x²) + (16x³ - 12x³ + 6x³ - 3x³)
-->
2 + x + 5x² + 7x³ + O(x⁴)
Edit:
I actually shouldn't even write O(x⁴) because it's possible that those terms completely cancel (although I doubt it), so the error could be (potentially) higher order.
1/(1 - x) = 1 + x + x² + x³ + ...
So:
1/(1 + x) = 1 / (1 - (-x)) = 1 - x + x² - x³ + ...
and
1/(1 - (2x)) = 1 + (2x) + (2x)² + (2x)³ + ...
--> multiply out
1 + 2x + 4x² + 8x³ + ...
So now it's a matter of multiplying out the three polynomials:
(2 - x) * (1 - x + x² - x³) * (1 + 2x + 4x² + 8x³)
Notice that it's NOT necessary to write any more terms because the next terms would be x⁴ and thus DON'T contribute if we are ONLY writing up to x³, furthermore when multiplying this out we DON'T need to keep any terms ABOVE x³:
(2 - x) * (1 - x + x² - x³)
-->
(2 - 2x + 2x² - 2x³) + (-x + x² - x³ + x⁴)
--> but we DON'T even need to write down the x⁴ term, so let's drop it to save us some trouble
--> collect like terms
2 - 3x + 3x² - 3x³ + O(x⁴)
--> now multiply by the next one
(2 - 3x + 3x² - 3x³) * (1 + 2x + 4x² + 8x³)
-->
(2 + 4x + 8x² + 16x³) + (-3x - 6x² - 12x³ + O(x⁴)) + (3x² + 6x³ + O(x⁴)) + (-3x³ + O(x⁴))
(notice that I stopped once I started generating values that involved x⁴
--> collect like terms:
2 + (4x - 3x) + (8x² - 6x² + 3x²) + (16x³ - 12x³ + 6x³ - 3x³)
-->
2 + x + 5x² + 7x³ + O(x⁴)
Edit:
I actually shouldn't even write O(x⁴) because it's possible that those terms completely cancel (although I doubt it), so the error could be (potentially) higher order.